summaryrefslogtreecommitdiff
path: root/.github/run_test.sh
blob: 93c3a5e9ed9dfc109a443638bd084400c126b026 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
#!/usr/bin/env bash

TARGETS=$@

TEST_TARGET="tests"
LTESTS=""  # all tests by default

set -ex

for TARGET in $TARGETS; do
    case $TARGET in
    --without-openssl)
        # When built without OpenSSL we can't do the file-based RSA key tests.
        TEST_TARGET=t-exec
        ;;
    esac
done

if [ -z "$LTESTS" ]; then
    make $TEST_TARGET
    result=$?
else
    make $TEST_TARGET LTESTS="$LTESTS"
    result=$?
fi

if [ "$result" -ne "0" ]; then
    for i in regress/failed*; do
        echo -------------------------------------------------------------------------
        echo LOGFILE $i
        cat $i
        echo -------------------------------------------------------------------------
    done
fi