summaryrefslogtreecommitdiffstats
path: root/build-scripts/test-sanitizers
blob: 476f198afb4a2453229446433a04afcf08914fb5 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
#!/bin/bash
set -e
sudo apt-get update
sudo apt-get -y install \
   autoconf build-essential zlib1g-dev libjpeg-dev libgnutls28-dev libssl-dev
./configure \
   CFLAGS="-fsanitize=address -fsanitize=undefined -g" \
   CXXFLAGS="-fsanitize=address -fsanitize=undefined -g" \
   LDFLAGS="-fsanitize=address -fsanitize=undefined" \
   CC=clang CXX="clang++ --std=c++11" \
   --enable-crypto-native --enable-crypto-openssl --enable-crypto-gnutls \
   --enable-werror --disable-shared --enable-show-failed-test-output
make -j$(nproc) -k
for i in $(./qpdf/build/qpdf --show-crypto); do
    echo "*** Running tests with crypto provider $i"
    env QPDF_CRYPTO_PROVIDER=$i make -k check
done