swtpm/run_tests
Stefan Berger a115055450 build-sys: Remove checking for GnuTLS and certtool
Remove the checks for GnuTLS and certtool from the build system now that
certtool is not used anymore.

Signed-off-by: Stefan Berger <stefanb@linux.ibm.com>
2026-05-06 08:09:04 -04:00

54 lines
1.4 KiB
Bash
Executable File

#!/bin/bash
if [ $(uname -m) != "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 --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 --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 --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