01-known-values.sh 622 B

12345678910111213141516171819202122232425
  1. #!/bin/sh
  2. ### Constants
  3. # The scenario command requires a lot of memory, so valgrind is only enabled
  4. # if $USE_VALGRIND > 1.
  5. c_valgrind_min=2
  6. test_output="${s_basename}-stdout.txt"
  7. reference="${scriptdir}/verify-strings/test_scrypt.good"
  8. ### Actual command
  9. scenario_cmd() {
  10. # Run the binary which tests known input/output strings.
  11. setup_check_variables
  12. (
  13. ${c_valgrind_cmd} ${bindir}/tests/verify-strings/test_scrypt \
  14. 1> ${test_output}
  15. echo $? > ${c_exitfile}
  16. )
  17. # The generated values should match the known good values.
  18. setup_check_variables
  19. cmp -s ${test_output} ${reference}
  20. echo $? > ${c_exitfile}
  21. }