run-testsuite 1009 B

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. #!/bin/sh
  2. set -eu
  3. # emulate substitution
  4. sed -e '
  5. s:@SOCAT@:/usr/bin/socat: ;
  6. s:@TANGD_KEYGEN@:/usr/libexec/tangd-keygen: ;
  7. s:@TANGD_UPDATE@:: ;
  8. s:@TANGD@:/usr/libexec/tangd:
  9. ' \
  10. <src/pins/tang/tests/tang-common-test-functions.in \
  11. >src/pins/tang/tests/tang-common-test-functions
  12. # patch out luksv2 detection switch - we're on the bright side already
  13. sed -e 's/@OLD_CRYPTSETUP@/0/' \
  14. <src/luks/tests/tests-common-functions.in \
  15. >src/luks/tests/tests-common-functions
  16. src_dir="$PWD"
  17. export PATH="$src_dir/src/pins/tang/tests:$PATH"
  18. exit=0
  19. cd "$src_dir/src/luks/tests"
  20. for f in $(find . -type f -not -name 'tests-common-functions*' -executable | sort); do
  21. echo "I: Running test $f"
  22. # test are very noisy, keep them silent as long as they pass
  23. t0="$(date +%s)"
  24. chronic "$f" || exit=$?
  25. delta="$(($(date +%s) - t0))"
  26. echo "I: ... run time: $delta"
  27. done
  28. cd "$src_dir/src/pins/tang/tests"
  29. echo "I: Running test pin-tang"
  30. chronic bash pin-tang || exit=$?
  31. exit $exit