2019-06-15 19:34:29 +00:00
|
|
|
#!/bin/bash
|
|
|
|
set -e
|
|
|
|
sudo apt-get update
|
|
|
|
sudo apt-get -y install \
|
2022-03-12 12:59:12 +00:00
|
|
|
build-essential cmake \
|
|
|
|
zlib1g-dev libjpeg-dev libgnutls28-dev libssl-dev
|
|
|
|
env CFLAGS="-fsanitize=address -fsanitize=undefined" \
|
|
|
|
CXXFLAGS="-fsanitize=address -fsanitize=undefined" \
|
|
|
|
LDFLAGS="-fsanitize=address -fsanitize=undefined" \
|
|
|
|
CC=clang CXX=clang++ \
|
|
|
|
cmake -S . -B build \
|
|
|
|
-DCI_MODE=1 -DBUILD_SHARED_LIBS=0 -DCMAKE_BUILD_TYPE=Debug \
|
2022-08-07 19:49:54 +00:00
|
|
|
-DREQUIRE_CRYPTO_OPENSSL=1 -DREQUIRE_CRYPTO_GNUTLS=1 \
|
|
|
|
-DENABLE_QTC=1
|
2022-10-06 11:14:23 +00:00
|
|
|
cmake --build build --verbose -j$(nproc) -- -k
|
2022-03-12 12:59:12 +00:00
|
|
|
cd build
|
|
|
|
# libtests automatically runs with all crypto providers.
|
|
|
|
ctest --verbose
|
|
|
|
# Run just qpdf tests with remaining crypto providers.
|
|
|
|
for i in $(./qpdf/qpdf --show-crypto | tail -n +2); do
|
|
|
|
echo "*** Running qpdf tests with crypto provider $i"
|
|
|
|
env QPDF_CRYPTO_PROVIDER=$i ctest --verbose -R '^qpdf$'
|
2019-11-06 02:31:56 +00:00
|
|
|
done
|