]>
Commit | Line | Data |
---|---|---|
96038cdf SB |
1 | |
2 | # For the license, see the LICENSE file in the root directory. | |
3 | ||
415bf556 | 4 | if ! [[ "$(uname -s)" =~ Linux ]]; then |
01aa2ed3 SB |
5 | echo "Need Linux to run test with CUSE interface." |
6 | exit 77 | |
7 | fi | |
8 | ||
9 | if [ "$(id -u)" -ne 0 ]; then | |
10 | echo "Need to be root to run test with CUSE interface." | |
11 | exit 77 | |
12 | fi | |
13 | ||
03e5abef SB |
14 | if [ -z "$(grep -E '#[[:blank:]]*define[[:blank:]]+WITH_CUSE[[:blank:]]+1[[:blank:]]*$' \ |
15 | ${PWD}/../config.h)" ]; then | |
16 | echo "Skipping test: swtpm was not compiled with CUSE interface" | |
17 | exit 77 | |
18 | fi | |
19 | ||
96038cdf SB |
20 | if [ ! -c /dev/cuse ]; then |
21 | modprobe cuse | |
22 | if [ $? -ne 0 ]; then | |
cde5f608 SB |
23 | echo "Skipping test using CUSE module: module not availabe" |
24 | exit 77 | |
96038cdf SB |
25 | fi |
26 | fi |