summaryrefslogtreecommitdiff
path: root/tests/common
blob: 0f9050015cde858c58224dd387a57568ede5a00b (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. bash
  8. fi
  9. cleanup
  10. }
  11. get_gpg_prng_arg() {
  12. if (gpg --quick-random --version >/dev/null 2>&1) ; then
  13. echo quick-random
  14. elif (gpg --debug-quick-random --version >/dev/null 2>&1) ; then
  15. echo debug-quick-random
  16. fi
  17. }
  18. cleanup() {
  19. echo "### removing temp dir..."
  20. rm -rf "$TEMPDIR"
  21. if [ "$SSHD_PID" ] ; then
  22. echo "### killing off lingering sshd..."
  23. kill "$SSHD_PID"
  24. fi
  25. wait
  26. }