tests no longer prompt for bash for inspection unless MONKEYSPHERE_TEST_ALLOW_EXAMINA...
[monkeysphere.git] / tests / common
index adc96a24924961de855342b2ed4ac5d88f1de121..e53c31ed72e426726353a0ed0b10206e8815e261 100644 (file)
@@ -3,7 +3,14 @@
 failed_cleanup() {
     # FIXME: can we be more verbose here?
     echo 'FAILED!'
-    read -p "press enter to cleanup and remove tmp:"
+    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
 }