From: Daniel Kahn Gillmor Date: Sun, 1 Mar 2009 18:19:37 +0000 (-0500) Subject: tests no longer prompt for bash for inspection unless MONKEYSPHERE_TEST_ALLOW_EXAMINA... X-Git-Tag: monkeysphere_0.24~45 X-Git-Url: https://codewiz.org/gitweb?a=commitdiff_plain;h=d506b0de7c385ffaf5801d93966c2515b9d1c101;p=monkeysphere.git tests no longer prompt for bash for inspection unless MONKEYSPHERE_TEST_ALLOW_EXAMINATION=prompt (makes running them in an automated environment cleaner). prune extra PATH in tests --- diff --git a/tests/basic b/tests/basic index b1fe9ed..f6d1f3b 100755 --- a/tests/basic +++ b/tests/basic @@ -112,7 +112,7 @@ TEMPDIR=$(mktemp -d "${TMPDIR:-$TESTDIR/tmp}/monkeyspheretest.XXXXXXX") # Use the local copy of executables first, instead of system ones. # This should help us test without installing. -export PATH="$TESTDIR"/../src:"$TESTDIR"/../src/keytrans:"$PATH" +export PATH="$TESTDIR"/../src:"$PATH" export MONKEYSPHERE_SYSDATADIR="$TEMPDIR" export MONKEYSPHERE_SYSCONFIGDIR="$TEMPDIR" diff --git a/tests/common b/tests/common index 30c6a82..e53c31e 100644 --- a/tests/common +++ b/tests/common @@ -3,11 +3,13 @@ failed_cleanup() { # FIXME: can we be more verbose here? echo 'FAILED!' - read -p "press enter to cleanup and remove tmp (or type bash for a subshell to examine): " XX - if [ "$XX" = bash ] ; then - echo "Entering subshell..." - cd "$TEMPDIR" - bash + if [ "$MONKEYSPHERE_TEST_ALLOW_EXAMINATION" = prompt ] ; then + read -p "press enter to cleanup and remove tmp (or type bash for a subshell to examine): " XX + if [ "$XX" = bash ] ; then + echo "Entering subshell..." + cd "$TEMPDIR" + bash + fi fi cleanup