Use general script set_testenv instead of test_valgrind, test_ddd, ...
authorPeter Verthez <Peter.Verthez@advalvas.be>
Sun, 12 Jan 2003 08:31:39 +0000 (08:31 +0000)
committerPeter Verthez <Peter.Verthez@advalvas.be>
Sun, 12 Jan 2003 08:31:39 +0000 (08:31 +0000)
t/Makefile.am
t/set_testenv [new file with mode: 0755]
t/test_ddd [deleted file]
t/test_valgrind [deleted file]
t/untest_ddd [deleted file]
t/untest_valgrind [deleted file]

index c1f50b45b5522a01040d1b282aebb9978fcd4c95..6e2fb3e1bb0bb1165b17abe5f23511d87cdf3f09 100644 (file)
@@ -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 (executable)
index 0000000..a36af0b
--- /dev/null
@@ -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 (executable)
index ec0f852..0000000
+++ /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 (executable)
index a857276..0000000
+++ /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 (executable)
index cb36a6f..0000000
+++ /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 (executable)
index 992b560..0000000
+++ /dev/null
@@ -1 +0,0 @@
-unset GEDCOM_TESTENV