test_scrypt.sh 981 B

1234567891011121314151617181920212223242526272829303132333435
  1. #!/bin/sh
  2. # Build directory (allowing flexible out-of-tree builds).
  3. bindir=$1
  4. # Constants used in multiple scenarios.
  5. password="hunter2"
  6. # Find script directory and load helper functions.
  7. scriptdir=$(CDPATH= cd -- "$(dirname -- "$0")" && pwd -P)
  8. . ${scriptdir}/shared_test_functions.sh
  9. # We need a ${bindir}.
  10. if [ -z ${bindir} ]; then
  11. printf "Warning: Scrypt binary directory not given.\n"
  12. printf "Attempting to use default values for in-source-tree build.\n"
  13. bindir=".."
  14. fi
  15. # Find system scrypt, and ensure it supports -P.
  16. system_scrypt=$( find_system scrypt enc -P )
  17. # Check for optional valgrind.
  18. check_optional_valgrind
  19. # Clean up previous directories, and create new ones.
  20. prepare_directories
  21. # Generate valgrind suppression file if it is required. Must be
  22. # done after preparing directories.
  23. ensure_valgrind_suppression ${bindir}/tests/valgrind/potential-memleaks
  24. # Run the test scenarios; this will exit on the first failure.
  25. run_scenarios ${scriptdir}/??-*.sh