X-Git-Url: https://tinc-vpn.org/git/browse?a=blobdiff_plain;f=.github%2Fworkflows%2Ftest%2Frun.sh;h=9f397f98fea7e1d4c5d42eba5eb4bb974ac8df7e;hb=7208397398f7e08d741bfa83594a88e5d01b6220;hp=74bb8bd62a9f28c525cb8d35b4a62cb211472bd3;hpb=4ca3ecb6d5c0667eba68313a5ca24e73dcc8e9e4;p=tinc diff --git a/.github/workflows/test/run.sh b/.github/workflows/test/run.sh index 74bb8bd6..9f397f98 100644 --- a/.github/workflows/test/run.sh +++ b/.github/workflows/test/run.sh @@ -20,14 +20,24 @@ run_tests() { header "Cleaning up leftovers from previous runs" for name in tinc tincd; do - pkill -TERM -x "$name" || true - pkill -KILL -x "$name" || true + sudo pkill -TERM -x "$name" || true + sudo pkill -KILL -x "$name" || true done - git clean -dfx + sudo git clean -dfx + sudo chown -R build:build . header "Running test flavor $flavor" + # CentOS 7 has OpenSSL 1.1 installed in a non-default location. + if test -d /usr/include/openssl11; then + set -- "$@" --with-openssl-include=/usr/include/openssl11 + fi + + if test -d /usr/lib64/openssl11; then + set -- "$@" --with-openssl-lib=/usr/lib64/openssl11 + fi + autoreconf -fsi ./configure "$@" make -j"$(nproc)" @@ -35,7 +45,7 @@ run_tests() { code=0 make check -j2 VERBOSE=1 || code=$? - tar -c -z -f "/tmp/tests.$flavor.tar.gz" test/ + sudo tar -c -z -f "/tmp/tests.$flavor.tar.gz" test/ return $code }