Commit 585be5a82e3d0d2b6756018c7d53f18f90228488

Authored by Jay Berkenbilt
Committed by Jay Berkenbilt
1 parent ab467e1f

Convert test-sanitizers to use cmake

Showing 1 changed file with 17 additions and 12 deletions
build-scripts/test-sanitizers
... ... @@ -2,16 +2,21 @@
2 2 set -e
3 3 sudo apt-get update
4 4 sudo apt-get -y install \
5   - autoconf build-essential zlib1g-dev libjpeg-dev libgnutls28-dev libssl-dev
6   -./configure \
7   - CFLAGS="-fsanitize=address -fsanitize=undefined -g" \
8   - CXXFLAGS="-fsanitize=address -fsanitize=undefined -g" \
9   - LDFLAGS="-fsanitize=address -fsanitize=undefined" \
10   - CC=clang CXX="clang++ --std=c++14" \
11   - --enable-crypto-native --enable-crypto-openssl --enable-crypto-gnutls \
12   - --enable-werror --disable-shared --enable-show-failed-test-output
13   -make -j$(nproc) -k
14   -for i in $(./qpdf/build/qpdf --show-crypto); do
15   - echo "*** Running tests with crypto provider $i"
16   - env QPDF_CRYPTO_PROVIDER=$i make -k check
  5 + build-essential cmake \
  6 + zlib1g-dev libjpeg-dev libgnutls28-dev libssl-dev
  7 +env CFLAGS="-fsanitize=address -fsanitize=undefined" \
  8 + CXXFLAGS="-fsanitize=address -fsanitize=undefined" \
  9 + LDFLAGS="-fsanitize=address -fsanitize=undefined" \
  10 + CC=clang CXX=clang++ \
  11 + cmake -S . -B build \
  12 + -DCI_MODE=1 -DBUILD_SHARED_LIBS=0 -DCMAKE_BUILD_TYPE=Debug \
  13 + -DREQUIRE_CRYPTO_OPENSSL=1 -DREQUIRE_CRYPTO_GNUTLS=1
  14 +cmake --build build -j$(nproc) -- -k
  15 +cd build
  16 +# libtests automatically runs with all crypto providers.
  17 +ctest --verbose
  18 +# Run just qpdf tests with remaining crypto providers.
  19 +for i in $(./qpdf/qpdf --show-crypto | tail -n +2); do
  20 + echo "*** Running qpdf tests with crypto provider $i"
  21 + env QPDF_CRYPTO_PROVIDER=$i ctest --verbose -R '^qpdf$'
17 22 done
... ...