summaryrefslogtreecommitdiffstats
path: root/build-scripts/test-unsigned-char
diff options
context:
space:
mode:
authorJay Berkenbilt <ejb@ql.org>2022-09-23 23:24:46 +0200
committerJay Berkenbilt <ejb@ql.org>2022-09-23 23:27:18 +0200
commita085479ad9bd2a513018264a93db7aa8a27b8e06 (patch)
tree41ab8839247b446002ac2c1a4eb991e594b2fd55 /build-scripts/test-unsigned-char
parent9a9a7ab097ad8b6f3a1ab634d43ec20b85c98698 (diff)
downloadqpdf-a085479ad9bd2a513018264a93db7aa8a27b8e06.tar.zst
Run tests in CI with char as unsigned char
Diffstat (limited to 'build-scripts/test-unsigned-char')
-rwxr-xr-xbuild-scripts/test-unsigned-char18
1 files changed, 18 insertions, 0 deletions
diff --git a/build-scripts/test-unsigned-char b/build-scripts/test-unsigned-char
new file mode 100755
index 00000000..840b517d
--- /dev/null
+++ b/build-scripts/test-unsigned-char
@@ -0,0 +1,18 @@
+#!/bin/bash
+set -e
+sudo apt-get update
+sudo apt-get -y install \
+ build-essential cmake \
+ zlib1g-dev libjpeg-dev libgnutls28-dev libssl-dev
+# Some platforms have unsigned-char by default, but Intel doesn't.
+# This ensures that we catch code that would fail if char were
+# unsigned by default.
+env CFLAGS="-funsigned-char" \
+ CXXFLAGS="-funsigned-char" \
+ cmake -S . -B build \
+ -DCI_MODE=1 -DBUILD_STATIC_LIBS=0 -DCMAKE_BUILD_TYPE=Release \
+ -DREQUIRE_CRYPTO_OPENSSL=1 -DREQUIRE_CRYPTO_GNUTLS=1 \
+ -DENABLE_QTC=1
+cmake --build build -j$(nproc) -- -k
+cd build
+ctest --verbose