aboutsummaryrefslogtreecommitdiffstats
path: root/build-scripts/test-pikepdf
blob: cdab79cfb7f9be3f7568e5889a854de34cbda49e (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
#!/bin/bash
set -ex
cmake_extra=
future=0
if [ "$1" = "future" ]; then
    future=1
    cmake_extra=-DFUTURE=ON
fi
sudo apt-get update
sudo apt-get -y install \
   build-essential cmake zlib1g-dev libjpeg-dev libgnutls28-dev
cmake -S . -B build -DBUILD_STATIC_LIBS=0 -DCMAKE_BUILD_TYPE=RelWithDebInfo $cmake_extra
cmake --build build --verbose -j$(nproc) --target libqpdf -- -k
if [ "$future" = "1" ]; then
    # Run qpdf's test suite in FUTURE mode as well
    ctest --verbose
fi
export QPDF_SOURCE_TREE=$PWD
export QPDF_BUILD_LIBDIR=$QPDF_SOURCE_TREE/build/libqpdf
export LD_LIBRARY_PATH=$QPDF_BUILD_LIBDIR
git clone https://github.com/pikepdf/pikepdf
python3 -m venv v
source v/bin/activate
cd pikepdf
python3 -m pip install --upgrade pip
python3 -m pip install '.[test]'
python3 -m pip install .
pytest -n auto