From 774c2a43ba3670f264a27fbd64bdb5cd340736cc Mon Sep 17 00:00:00 2001 From: Jonathan Lebon Date: Fri, 26 Feb 2016 12:52:42 -0500 Subject: [PATCH] libtest.sh: add include guard --- tests/libtest.sh | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/tests/libtest.sh b/tests/libtest.sh index a72f3095..13735073 100644 --- a/tests/libtest.sh +++ b/tests/libtest.sh @@ -17,6 +17,14 @@ # Free Software Foundation, Inc., 59 Temple Place - Suite 330, # Boston, MA 02111-1307, USA. +# Have we already been sourced? +if test -n "${LIBTEST_SH:-}"; then + # would be good to know when it happens + echo "INFO: Skipping subsequent sourcing of libtest.sh" + return +fi +LIBTEST_SH=1 + SRCDIR=$(dirname $0) _cleanup_tmpdir () { if test -f ${test_tmpdir}/.test; then