]> git.proxmox.com Git - swtpm.git/blob - run_tests
tests: Use SOCK_STREAM for CMD_SET_DATAFD socketpair
[swtpm.git] / run_tests
1 #!/bin/bash
2
3 if [ $(uname -p) != "x86_64" ]; then
4 echo "This test only runs on x86_64 host"
5 exit 1
6 fi
7
8 unset SWTPM
9
10 # Comment the following to compile and test with CUSE interface
11 WITHOUT_CUSE="--without-cuse"
12
13 # FIXME:
14 # Due to some bug in glib2 for i686 we don't seem to be able to run a
15 # 32bit swtpm with cuse interface correctly. The g_cond_wait_until()
16 # doesn't behave as it does with 64bit. test_hashing2 gets stuck.
17
18
19 CFLAGS='-m64' ./configure --with-openssl --with-gnutls --prefix=/usr --libdir=/lib64 ${WITHOUT_CUSE} && \
20 make clean && \
21 make -j$(nproc) &&
22 sudo make -j$(nproc) install &&
23 cp /usr/bin/swtpm /tmp/swtpm64 &&
24 make -j$(nproc) check ||
25 exit 1
26 if [ -z "${WITHOUT_CUSE}" ]; then
27 sudo make -j$(nproc) check ||
28 exit 1
29 fi
30
31 PKG_CONFIG_PATH=/usr/lib/pkgconfig \
32 CFLAGS='-m32' ./configure --with-openssl --with-gnutls --prefix=/usr --libdir=/lib ${WITHOUT_CUSE} && \
33 make clean && \
34 make -j$(nproc) &&
35 sudo make -j$(nproc) install &&
36 cp /usr/bin/swtpm /tmp/swtpm32 &&
37 make -j$(nproc) check &&
38 SWTPM_EXE=/tmp/swtpm64 make -j$(nproc) check ||
39 exit 1
40 if [ -z "${WITHOUT_CUSE}" ]; then
41 sudo SWTPM_EXE=/tmp/swtpm64 make -j$(nproc) check ||
42 exit 1
43 fi
44
45 CFLAGS='-m64' ./configure --with-openssl --with-gnutls --prefix=/usr --libdir=/lib64 ${WITHOUT_CUSE} && \
46 make clean && \
47 make -j$(nproc) &&
48 SWTPM_EXE=/tmp/swtpm32 make -j$(nproc) check ||
49 exit 1
50
51 echo "*** All tests succeeded ***"
52
53 exit 0