mirror of
https://github.com/stefanberger/swtpm.git
synced 2026-08-08 20:53:34 +00:00
tests: Skip CUSE tests if not compiled with CUSE interface
Check for a '#define WITH_CUSE 1' line in config.h to determine whether the swtpm was compiled with the CUSE interface and skip the tests with the CUSE interface if no such line can be found. Signed-off-by: Stefan Berger <stefanb@linux.vnet.ibm.com>
This commit is contained in:
parent
c85b2cc35f
commit
03e5abef60
@ -11,6 +11,12 @@ if [ "$(id -u)" -ne 0 ]; then
|
||||
exit 77
|
||||
fi
|
||||
|
||||
if [ -z "$(grep -E '#[[:blank:]]*define[[:blank:]]+WITH_CUSE[[:blank:]]+1[[:blank:]]*$' \
|
||||
${PWD}/../config.h)" ]; then
|
||||
echo "Skipping test: swtpm was not compiled with CUSE interface"
|
||||
exit 77
|
||||
fi
|
||||
|
||||
if [ ! -c /dev/cuse ]; then
|
||||
modprobe cuse
|
||||
if [ $? -ne 0 ]; then
|
||||
|
||||
Loading…
Reference in New Issue
Block a user