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