]> git.proxmox.com Git - swtpm.git/blame - run_tests
packaging: track dbgsym package for swtpm-libs and swtpm-tools
[swtpm.git] / run_tests
CommitLineData
2a312e9f
SB
1#!/bin/bash
2
c85b2cc3
SB
3if [ $(uname -p) != "x86_64" ]; then
4 echo "This test only runs on x86_64 host"
5 exit 1
6fi
7
2a312e9f
SB
8unset SWTPM
9
80b0943a
SB
10# Comment the following to compile and test with CUSE interface
11WITHOUT_CUSE="--without-cuse"
12
2a312e9f
SB
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
80b0943a 19CFLAGS='-m64' ./configure --with-openssl --with-gnutls --prefix=/usr --libdir=/lib64 ${WITHOUT_CUSE} && \
2a312e9f 20 make clean && \
b8e9b4ae
SB
21 make -j$(nproc) &&
22 sudo make -j$(nproc) install &&
2a312e9f 23 cp /usr/bin/swtpm /tmp/swtpm64 &&
80b0943a
SB
24 make -j$(nproc) check ||
25 exit 1
b5b48d41 26if [ -z "${WITHOUT_CUSE}" ]; then
b8e9b4ae 27 sudo make -j$(nproc) check ||
2a312e9f 28 exit 1
b5b48d41 29fi
2a312e9f 30
c85b2cc3 31PKG_CONFIG_PATH=/usr/lib/pkgconfig \
80b0943a 32 CFLAGS='-m32' ./configure --with-openssl --with-gnutls --prefix=/usr --libdir=/lib ${WITHOUT_CUSE} && \
2a312e9f 33 make clean && \
b8e9b4ae
SB
34 make -j$(nproc) &&
35 sudo make -j$(nproc) install &&
2a312e9f 36 cp /usr/bin/swtpm /tmp/swtpm32 &&
b8e9b4ae 37 make -j$(nproc) check &&
80b0943a
SB
38 SWTPM_EXE=/tmp/swtpm64 make -j$(nproc) check ||
39 exit 1
b5b48d41 40if [ -z "${WITHOUT_CUSE}" ]; then
b8e9b4ae 41 sudo SWTPM_EXE=/tmp/swtpm64 make -j$(nproc) check ||
2a312e9f 42 exit 1
b5b48d41 43fi
2a312e9f 44
80b0943a 45CFLAGS='-m64' ./configure --with-openssl --with-gnutls --prefix=/usr --libdir=/lib64 ${WITHOUT_CUSE} && \
2a312e9f 46 make clean && \
b8e9b4ae 47 make -j$(nproc) &&
b5b48d41 48 SWTPM_EXE=/tmp/swtpm32 make -j$(nproc) check ||
2a312e9f 49 exit 1
b5b48d41
SB
50
51echo "*** All tests succeeded ***"
52
53exit 0