File: test-unsigned-char

package info (click to toggle)
qpdf 12.3.0-1
  • links: PTS
  • area: main
  • in suites: forky, sid
  • size: 72,644 kB
  • sloc: cpp: 59,031; perl: 12,172; ansic: 6,809; sh: 1,231; python: 1,041; xml: 43; makefile: 42
file content (22 lines) | stat: -rwxr-xr-x 815 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
#!/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 --verbose -j$(nproc) -- -k
cd build
# Make sure char is unsigned by default. ./build-linux verifies that
# that build has char signed by default. That way we can be sure we
# are testing both ways.
./qpdf/test_char_sign | grep 'char is unsigned'
ctest --verbose