run-testsuite 1.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  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. if [ "$f" = './unbind-unbound-slot-luks2' ]; then
  22. echo "W: Skipping test $f"
  23. continue
  24. fi
  25. echo "I: Running test $f"
  26. # test are very noisy, keep them silent as long as they pass
  27. t0="$(date +%s)"
  28. chronic "$f" || exit=$?
  29. delta="$(($(date +%s) - t0))"
  30. echo "I: ... run time: $delta"
  31. done
  32. cd "$src_dir/src/pins/tang/tests"
  33. echo "I: Running test pin-tang"
  34. chronic bash pin-tang || exit=$?
  35. exit $exit