mirror of
https://github.com/qpdf/qpdf.git
synced 2024-12-22 02:49:00 +00:00
Fix pkg-test tests and run from CI
This commit is contained in:
parent
6b8aa1db6f
commit
2f37633b92
1
.github/workflows/main.yml
vendored
1
.github/workflows/main.yml
vendored
@ -132,6 +132,7 @@ jobs:
|
|||||||
matrix:
|
matrix:
|
||||||
script:
|
script:
|
||||||
- build-fuzzer
|
- build-fuzzer
|
||||||
|
- pkg-test
|
||||||
- build-linux32
|
- build-linux32
|
||||||
- test-alt-zlib
|
- test-alt-zlib
|
||||||
- test-unsigned-char
|
- test-unsigned-char
|
||||||
|
@ -532,22 +532,6 @@ When done, the following should happen:
|
|||||||
* /tmp/check-abi/new contains new sizes and library
|
* /tmp/check-abi/new contains new sizes and library
|
||||||
* run check_abi manually to compare
|
* run check_abi manually to compare
|
||||||
|
|
||||||
* Run package tests:
|
|
||||||
|
|
||||||
(Note: can't use DESTDIR because pkg-config won't know about it.)
|
|
||||||
|
|
||||||
```
|
|
||||||
\rm -rf /tmp/inst build.tmp
|
|
||||||
cmake -S . -B build.tmp \
|
|
||||||
-DCMAKE_BUILD_TYPE=RelWithDebInfo -DCMAKE_INSTALL_PREFIX=/tmp/inst
|
|
||||||
cmake --build build.tmp -j$(nproc)
|
|
||||||
cmake --install build.tmp
|
|
||||||
env PKG_CONFIG_PATH=/tmp/inst/lib/pkgconfig \
|
|
||||||
LD_LIBRARY_PATH=/tmp/inst/lib \
|
|
||||||
CMAKE_PREFIX_PATH=/tmp/inst \
|
|
||||||
./pkg-test/run-all
|
|
||||||
```
|
|
||||||
|
|
||||||
## CREATING A RELEASE
|
## CREATING A RELEASE
|
||||||
|
|
||||||
* Push to main. This will create an artifact called distribution
|
* Push to main. This will create an artifact called distribution
|
||||||
|
16
build-scripts/pkg-test
Executable file
16
build-scripts/pkg-test
Executable file
@ -0,0 +1,16 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
set -e
|
||||||
|
sudo apt-get update
|
||||||
|
sudo apt-get -y install \
|
||||||
|
build-essential cmake \
|
||||||
|
zlib1g-dev libjpeg-dev libgnutls28-dev libssl-dev
|
||||||
|
|
||||||
|
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
|
@ -2,13 +2,16 @@
|
|||||||
|
|
||||||
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.
|
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. For example:
|
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
|
cmake -S . -B build \
|
||||||
|
-DCMAKE_BUILD_TYPE=RelWithDebInfo -DCMAKE_INSTALL_PREFIX=/tmp/inst
|
||||||
cmake --build build -j$(nproc)
|
cmake --build build -j$(nproc)
|
||||||
DESTDIR=/tmp/inst cmake --install build
|
cmake --install build
|
||||||
env PKG_CONFIG_PATH=/tmp/inst/usr/local/lib/pkgconfig \
|
env PKG_CONFIG_PATH=/tmp/inst/lib/pkgconfig \
|
||||||
CMAKE_PREFIX_PATH=/tmp/inst/usr/local \
|
LD_LIBRARY_PATH=/tmp/inst/lib \
|
||||||
|
CMAKE_PREFIX_PATH=/tmp/inst \
|
||||||
|
PATH=/tmp/inst/bin:$PATH \
|
||||||
./pkg-test/run-all
|
./pkg-test/run-all
|
||||||
```
|
```
|
||||||
|
@ -11,7 +11,7 @@ if [ ! -d "$TMP" ]; then
|
|||||||
exit 2
|
exit 2
|
||||||
fi
|
fi
|
||||||
|
|
||||||
WANTED_VERSION=$(awk -F'"' '/#define QPDF_VERSION / {print $2}' include/qpdf/DLL.h)
|
WANTED_VERSION=$(awk -F'"' '/# *define QPDF_VERSION / {print $2}' include/qpdf/DLL.h | tail -n 1)
|
||||||
|
|
||||||
qpdf --version | grep -F $WANTED_VERSION
|
qpdf --version | grep -F $WANTED_VERSION
|
||||||
qpdf --help
|
qpdf --help
|
||||||
|
@ -13,7 +13,7 @@ if [ ! -d "$TMP" ]; then
|
|||||||
exit 2
|
exit 2
|
||||||
fi
|
fi
|
||||||
|
|
||||||
WANTED_VERSION=$(awk -F'"' '/#define QPDF_VERSION / {print $2}' include/qpdf/DLL.h)
|
WANTED_VERSION=$(awk -F'"' '/# *define QPDF_VERSION / {print $2}' include/qpdf/DLL.h | tail -n 1)
|
||||||
|
|
||||||
cp pkg-test/qpdf-version.cc pkg-test/CMakeLists.txt $TMP
|
cp pkg-test/qpdf-version.cc pkg-test/CMakeLists.txt $TMP
|
||||||
cd $TMP
|
cd $TMP
|
||||||
|
@ -12,7 +12,7 @@ if [ ! -d "$TMP" ]; then
|
|||||||
exit 2
|
exit 2
|
||||||
fi
|
fi
|
||||||
|
|
||||||
WANTED_VERSION=$(awk -F'"' '/#define QPDF_VERSION / {print $2}' include/qpdf/DLL.h)
|
WANTED_VERSION=$(awk -F'"' '/# *define QPDF_VERSION / {print $2}' include/qpdf/DLL.h | tail -n 1)
|
||||||
|
|
||||||
cp pkg-test/qpdf-version.cc $TMP
|
cp pkg-test/qpdf-version.cc $TMP
|
||||||
cd $TMP
|
cd $TMP
|
||||||
|
Loading…
Reference in New Issue
Block a user