forked from stefanberger/swtpm
-
Notifications
You must be signed in to change notification settings - Fork 0
/
run_tests
executable file
·53 lines (43 loc) · 1.39 KB
/
run_tests
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
48
49
50
51
52
53
#!/bin/bash
if [ $(uname -p) != "x86_64" ]; then
echo "This test only runs on x86_64 host"
exit 1
fi
unset SWTPM
# Comment the following to compile and test with CUSE interface
WITHOUT_CUSE="--without-cuse"
# FIXME:
# Due to some bug in glib2 for i686 we don't seem to be able to run a
# 32bit swtpm with cuse interface correctly. The g_cond_wait_until()
# doesn't behave as it does with 64bit. test_hashing2 gets stuck.
CFLAGS='-m64' ./configure --with-openssl --with-gnutls --prefix=/usr --libdir=/lib64 ${WITHOUT_CUSE} && \
make clean && \
make -j$(nproc) &&
sudo make -j$(nproc) install &&
cp /usr/bin/swtpm /tmp/swtpm64 &&
make -j$(nproc) check ||
exit 1
if [ -z "${WITHOUT_CUSE}" ]; then
sudo make -j$(nproc) check ||
exit 1
fi
PKG_CONFIG_PATH=/usr/lib/pkgconfig \
CFLAGS='-m32' ./configure --with-openssl --with-gnutls --prefix=/usr --libdir=/lib ${WITHOUT_CUSE} && \
make clean && \
make -j$(nproc) &&
sudo make -j$(nproc) install &&
cp /usr/bin/swtpm /tmp/swtpm32 &&
make -j$(nproc) check &&
SWTPM_EXE=/tmp/swtpm64 make -j$(nproc) check ||
exit 1
if [ -z "${WITHOUT_CUSE}" ]; then
sudo SWTPM_EXE=/tmp/swtpm64 make -j$(nproc) check ||
exit 1
fi
CFLAGS='-m64' ./configure --with-openssl --with-gnutls --prefix=/usr --libdir=/lib64 ${WITHOUT_CUSE} && \
make clean && \
make -j$(nproc) &&
SWTPM_EXE=/tmp/swtpm32 make -j$(nproc) check ||
exit 1
echo "*** All tests succeeded ***"
exit 0