From: Peter Verthez Date: Sun, 12 Jan 2003 08:31:39 +0000 (+0000) Subject: Use general script set_testenv instead of test_valgrind, test_ddd, ... X-Git-Url: https://git.dlugolecki.net.pl/?a=commitdiff_plain;h=f85c3005b5ae59af8089a88297aeb2bd5c317433;p=gedcom-parse.git Use general script set_testenv instead of test_valgrind, test_ddd, ... --- diff --git a/t/Makefile.am b/t/Makefile.am index c1f50b4..6e2fb3e 100644 --- a/t/Makefile.am +++ b/t/Makefile.am @@ -6,7 +6,7 @@ SUBDIRS=src input output . TESTS := $(wildcard $(srcdir)/*.test) -EXTRA_DIST=$(TESTS) test_valgrind untest_valgrind +EXTRA_DIST=$(TESTS) set_testenv TESTS_ENVIRONMENT=ICONV_PATH=@ICONV_PATH@ diff --git a/t/set_testenv b/t/set_testenv new file mode 100755 index 0000000..a36af0b --- /dev/null +++ b/t/set_testenv @@ -0,0 +1,27 @@ +# Use this script to set certain test environments, as follows: +# . set_testenv valgrind +# . set_testenv ddd +# To clear the test environment: +# . set_testenv + +testenv=$1 + +case "$testenv" in + valgrind) + echo "Setting test environment for valgrind" + export GEDCOM_TESTENV='valgrind --leak-check=yes --show-reachable=yes --num-callers=20' + unset GEDCOM_NOOPTS ;; + + ddd) + echo "Setting test environment for ddd" + export GEDCOM_TESTENV='ddd' + export GEDCOM_NOOPTS=1 ;; + + "") + echo "Clearing test environment" + unset GEDCOM_TESTENV + unset GEDCOM_NOOPTS ;; + + *) + echo "Unknown test environment: $testenv" ;; +esac diff --git a/t/test_ddd b/t/test_ddd deleted file mode 100755 index ec0f852..0000000 --- a/t/test_ddd +++ /dev/null @@ -1,2 +0,0 @@ -export GEDCOM_TESTENV='ddd' -export GEDCOM_NOOPTS=1 diff --git a/t/test_valgrind b/t/test_valgrind deleted file mode 100755 index a857276..0000000 --- a/t/test_valgrind +++ /dev/null @@ -1 +0,0 @@ -export GEDCOM_TESTENV='valgrind --leak-check=yes --show-reachable=yes --num-callers=20' diff --git a/t/untest_ddd b/t/untest_ddd deleted file mode 100755 index cb36a6f..0000000 --- a/t/untest_ddd +++ /dev/null @@ -1,2 +0,0 @@ -unset GEDCOM_TESTENV -unset GEDCOM_NOOPTS diff --git a/t/untest_valgrind b/t/untest_valgrind deleted file mode 100755 index 992b560..0000000 --- a/t/untest_valgrind +++ /dev/null @@ -1 +0,0 @@ -unset GEDCOM_TESTENV