-l Use local daemons for integration tests
-e Exit on the first test failure
-V <dir> Use <dir> as $TEST_VAR_DIR
+ -C Clean up - kill daemons and remove $TEST_VAR_DIR when done
-v Verbose - print test output for non-failures (only some tests)
-A Use "cat -A" to print test output (only some tests)
-D Show diff between failed/expected test output (some tests only)
export TEST_DIFF_RESULTS=false
export TEST_LOCAL_DAEMONS # No default, developer can "override"!
export TEST_VAR_DIR=""
+export TEST_CLEANUP=false
-temp=$(getopt -n "$prog" -o "xdehlqsvV:XADH" -l help -- "$@")
+temp=$(getopt -n "$prog" -o "xdehlqsvV:XACDH" -l help -- "$@")
[ $? != 0 ] && usage
-V) TEST_VAR_DIR="$2" ; shift 2 ;;
-X) TEST_COMMAND_TRACE=true ; shift ;;
-A) TEST_CAT_RESULTS_OPTS="-A" ; shift ;;
+ -C) TEST_CLEANUP=true ; shift ;;
-D) TEST_DIFF_RESULTS=true ; shift ;;
-H) no_header=true ; shift ;;
--) shift ; break ;;
rm -f "$sf"
+echo
+if $TEST_CLEANUP ; then
+ echo "Removing TEST_VAR_DIR=$TEST_VAR_DIR"
+ rm -rf "$TEST_VAR_DIR"
+else
+ echo "Not cleaning up TEST_VAR_DIR=$TEST_VAR_DIR"
+fi
+
if [ $tests_failed -gt 0 ] ; then
if $no_header ; then
exit $status