run-testsuite 1.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  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="$PWD"
  17. export PATH="$SRC/src/pins/tang/tests:$PATH"
  18. EXIT=0
  19. cd "$SRC/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/src/pins/tang/tests"
  33. echo "I: Running test pin-tang"
  34. chronic bash pin-tang || EXIT=$?
  35. exit $EXIT