summaryrefslogtreecommitdiff
path: root/tests/common
blob: a000c565a2d4b2045c2ad425307945598484596d (plain)
  1. # -*-shell-script-*-
  2. failed_cleanup() {
  3. # FIXME: can we be more verbose here?
  4. echo 'FAILED!'
  5. if [ -z "$MONKEYSPHERE_TEST_NO_EXAMINE" ] ; then
  6. read -p "press enter to cleanup and remove tmp (or type bash for a subshell to examine): " XX
  7. if [ "$XX" = bash ] ; then
  8. echo "Entering subshell..."
  9. cd "$TEMPDIR"
  10. bash
  11. fi
  12. fi
  13. cleanup
  14. }
  15. get_gpg_prng_arg() {
  16. if (gpg --quick-random --version >/dev/null 2>&1) ; then
  17. echo quick-random
  18. elif (gpg --debug-quick-random --version >/dev/null 2>&1) ; then
  19. echo debug-quick-random
  20. fi
  21. }
  22. cleanup() {
  23. echo "### removing temp dir..."
  24. rm -rf "$TEMPDIR"
  25. if [ "$SSHD_PID" ] ; then
  26. echo "### killing off lingering sshd..."
  27. kill "$SSHD_PID"
  28. fi
  29. wait
  30. }