2
1
mirror of https://github.com/qpdf/qpdf.git synced 2024-11-05 21:07:50 +00:00
qpdf/pkg-test
2023-12-23 11:10:55 -05:00
..
CMakeLists.txt Add installed package smoke tests in pkg-test directory 2022-03-18 19:53:18 -04:00
qpdf-version.cc Strengthen pkg-test 2022-09-10 09:44:29 -04:00
README.md Fix pkg-test tests and run from CI 2023-12-23 11:10:55 -05:00
run-all Add installed package smoke tests in pkg-test directory 2022-03-18 19:53:18 -04:00
test-cli Fix pkg-test tests and run from CI 2023-12-23 11:10:55 -05:00
test-cmake Fix pkg-test tests and run from CI 2023-12-23 11:10:55 -05:00
test-pkg-config Fix pkg-test tests and run from CI 2023-12-23 11:10:55 -05:00

Tests for installed packages

The files in this directory are called by autopkgtest in the debian package but can be used by any packager to verify installed packages. Each test-* script should be run from the top of the source tree and takes an empty directory as its single argument. The test passes if the script exits with a zero exit status. Note that these tests write to stderr because they use set -x in the shell.

On a GNU/Linux system, you can run ./pkg-test/run-all from the top-level directory to run all the tests. Note that you have to specify an altrenative install prefix rather than using DESTDIR since, otherwise, pkg-config won't find the packages. For example:

cmake -S . -B build \
    -DCMAKE_BUILD_TYPE=RelWithDebInfo -DCMAKE_INSTALL_PREFIX=/tmp/inst
cmake --build build -j$(nproc)
cmake --install build
env PKG_CONFIG_PATH=/tmp/inst/lib/pkgconfig \
    LD_LIBRARY_PATH=/tmp/inst/lib \
    CMAKE_PREFIX_PATH=/tmp/inst \
    PATH=/tmp/inst/bin:$PATH \
   ./pkg-test/run-all