File: run-testsuite

package info (click to toggle)
clevis 16-2
  • links: PTS, VCS
  • area: main
  • in suites: bullseye
  • size: 844 kB
  • sloc: sh: 4,328; ansic: 1,280; makefile: 8
file content (47 lines) | stat: -rwxr-xr-x 1,112 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
#!/bin/sh

set -eu

# emulate substitution
sed -e '
s:@SOCAT@:/usr/bin/socat: ;
s:@TANGD_KEYGEN@:/usr/libexec/tangd-keygen: ;
s:@TANGD_UPDATE@:: ;
s:@TANGD@:/usr/libexec/tangd:
' \
    <src/pins/tang/tests/tang-common-test-functions.in \
    >src/pins/tang/tests/tang-common-test-functions

# patch out luksv2 detection switch - we're on the bright side already
sed -e 's/@OLD_CRYPTSETUP@/0/' \
    <src/luks/tests/tests-common-functions.in \
    >src/luks/tests/tests-common-functions

SRC="$PWD"

export PATH="$SRC/src/pins/tang/tests:$PATH"

EXIT=0

cd "$SRC/src/luks/tests"

for f in $(find . -type f -not -name 'tests-common-functions*' -executable | sort) ; do
    if [ "$f" = './unbind-unbound-slot-luks2' ] ; then
        echo "W: Skipping test $f"
        continue
    fi
    echo "I: Running test $f"
    # test are very noisy, keep them silent as long as they pass
    T0="$(date +%s)"
    chronic "$f" || EXIT=$?
    DELTA="$(( $(date +%s) - $T0 ))"
    echo "I: ... run time: $DELTA"
done


cd "$SRC/src/pins/tang/tests"

echo "I: Running test pin-tang"
chronic bash pin-tang || EXIT=$?

exit $EXIT