mirror of
https://github.com/qpdf/qpdf.git
synced 2025-01-02 22:50:20 +00:00
Convert test-sanitizers to use cmake
This commit is contained in:
parent
ab467e1f01
commit
585be5a82e
@ -2,16 +2,21 @@
|
||||
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" \
|
||||
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++ --std=c++14" \
|
||||
--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
|
||||
CC=clang CXX=clang++ \
|
||||
cmake -S . -B build \
|
||||
-DCI_MODE=1 -DBUILD_SHARED_LIBS=0 -DCMAKE_BUILD_TYPE=Debug \
|
||||
-DREQUIRE_CRYPTO_OPENSSL=1 -DREQUIRE_CRYPTO_GNUTLS=1
|
||||
cmake --build build -j$(nproc) -- -k
|
||||
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$'
|
||||
done
|
||||
|
Loading…
Reference in New Issue
Block a user