File: run_tests.sh

package info (click to toggle)
freespace2 24.2.0%2Brepack-3
  • links: PTS, VCS
  • area: non-free
  • in suites: forky, sid
  • size: 43,740 kB
  • sloc: cpp: 595,005; ansic: 21,741; python: 1,174; sh: 457; makefile: 243; xml: 181
file content (20 lines) | stat: -rwxr-xr-x 669 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
#!/usr/bin/env bash

SCRIPT=$(readlink -f "$0")
HERE=$(dirname "$SCRIPT")

export LD_LIBRARY_PATH=$(pwd)/bin/lib:$LD_LIBRARY_PATH

# if on mac and building for architecture that doesn't match host
# then unittests will fail so we just need to skip it (for now)
if [ "$RUNNER_OS" = "macOS" ] && [ "$ARCH" != "$(uname -m)" ]; then
    echo "Skipping tests due to architecture mismatch!"
    exit 0
fi

if [ "$CONFIGURATION" = "Debug"] && [[ "$RUNNER_OS" != "macOS" ]] ; then
    valgrind --leak-check=full --error-exitcode=1 --gen-suppressions=all \
        --suppressions="$HERE/valgrind.supp" ./bin/unittests --gtest_shuffle
else
    ./bin/unittests --gtest_shuffle
fi