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