Commit 77111086eb38f6075fd2e8e4da74acc32719be02
1 parent
a085479a
Add code to CI to verify signed/unsigned char
Make sure that our attempt to test both signed and unsigned char is actually right.
Showing
4 changed files
with
18 additions
and
0 deletions
build-scripts/build-linux
| @@ -8,6 +8,8 @@ cmake -S . -B build -DCI_MODE=1 -DCMAKE_BUILD_TYPE=RelWithDebInfo \ | @@ -8,6 +8,8 @@ cmake -S . -B build -DCI_MODE=1 -DCMAKE_BUILD_TYPE=RelWithDebInfo \ | ||
| 8 | -DREQUIRE_CRYPTO_OPENSSL=1 -DREQUIRE_CRYPTO_GNUTLS=1 | 8 | -DREQUIRE_CRYPTO_OPENSSL=1 -DREQUIRE_CRYPTO_GNUTLS=1 |
| 9 | cmake --build build -j$(nproc) -- -k | 9 | cmake --build build -j$(nproc) -- -k |
| 10 | cd build | 10 | cd build |
| 11 | +# Make sure char is signed by default -- see also test-unsigned-char | ||
| 12 | +./qpdf/test_char_sign | grep 'char is signed' | ||
| 11 | # libtests automatically runs with all crypto providers. | 13 | # libtests automatically runs with all crypto providers. |
| 12 | env QPDF_TEST_COMPARE_IMAGES=1 ctest --verbose | 14 | env QPDF_TEST_COMPARE_IMAGES=1 ctest --verbose |
| 13 | # Run just qpdf tests with remaining crypto providers. | 15 | # Run just qpdf tests with remaining crypto providers. |
build-scripts/test-unsigned-char
| @@ -15,4 +15,8 @@ env CFLAGS="-funsigned-char" \ | @@ -15,4 +15,8 @@ env CFLAGS="-funsigned-char" \ | ||
| 15 | -DENABLE_QTC=1 | 15 | -DENABLE_QTC=1 |
| 16 | cmake --build build -j$(nproc) -- -k | 16 | cmake --build build -j$(nproc) -- -k |
| 17 | cd build | 17 | cd build |
| 18 | +# Make sure char is unsigned by default. ./build-linux verifies that | ||
| 19 | +# that build has char signed by default. That way we can be sure we | ||
| 20 | +# are testing both ways. | ||
| 21 | +./qpdf/test_char_sign | grep 'char is unsigned' | ||
| 18 | ctest --verbose | 22 | ctest --verbose |
qpdf/CMakeLists.txt