swtpm/run_tests
Stefan Berger c85b2cc35f test: Add PKG_CONFIG_PATH in front of configure for i386
More recent glib-2.0 needs a specific different include files for
32 and 64 bit x86 architectures. We get this through pkg-config but
need to set its search path accordingly.

Signed-off-by: Stefan Berger <stefanb@linux.vnet.ibm.com>
2018-06-04 16:11:24 -04:00

41 lines
1.0 KiB
Bash
Executable File

#!/bin/bash
if [ $(uname -p) != "x86_64" ]; then
echo "This test only runs on x86_64 host"
exit 1
fi
unset SWTPM
# 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 && \
make clean && \
make -j8 &&
sudo make -j8 install &&
cp /usr/bin/swtpm /tmp/swtpm64 &&
make -j8 check &&
sudo make -j8 check ||
exit 1
PKG_CONFIG_PATH=/usr/lib/pkgconfig \
CFLAGS='-m32' ./configure --with-openssl --with-gnutls --prefix=/usr --libdir=/lib && \
make clean && \
make -j8 &&
sudo make -j8 install &&
cp /usr/bin/swtpm /tmp/swtpm32 &&
make -j8 check &&
SWTPM_EXE=/tmp/swtpm64 make -j8 check &&
sudo SWTPM_EXE=/tmp/swtpm64 make -j8 check ||
exit 1
CFLAGS='-m64' ./configure --with-openssl --with-gnutls --prefix=/usr --libdir=/lib64 && \
make clean && \
make -j8 &&
SWTPM_EXE=/tmp/swtpm32 make -j8 check &&
exit 1