break out default variables into their own file: defaultenv
[monkeysphere.git] / tests / common
index 0f9050015cde858c58224dd387a57568ede5a00b..e53c31ed72e426726353a0ed0b10206e8815e261 100644 (file)
@@ -3,9 +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
-       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