X-Git-Url: https://tinc-vpn.org/git/browse?a=blobdiff_plain;f=.ci%2Ftest%2Frun.sh;h=b17d2de7875ee9d6207679ba3fd85191100cc1bf;hb=63106cf58402a3af96640727b499258d0eb529f1;hp=a6a38b781f01b5cdb599a2716d6828cdf3e79d6c;hpb=7619f84393f824a84e20e03167304b27d3581ac0;p=tinc diff --git a/.ci/test/run.sh b/.ci/test/run.sh index a6a38b78..b17d2de7 100644 --- a/.ci/test/run.sh +++ b/.ci/test/run.sh @@ -27,6 +27,8 @@ run_tests() { sudo git clean -dfx sudo chown -R "${USER:-$(whoami)}" . + mkdir -p sanitizer /tmp/logs + header "Running test flavor $flavor" autoreconf -fsi @@ -37,21 +39,16 @@ run_tests() { code=0 make check -j2 VERBOSE=1 || code=$? - mkdir -p /tmp/logs - sudo tar -c -z -f "/tmp/logs/tests.$flavor.tar.gz" test/ + sudo tar -c -z -f "/tmp/logs/tests.$flavor.tar.gz" test/ sanitizer/ return $code } -echo "system name $(uname -s)" -echo "full $(uname -a)" -echo "o $(uname -o)" - case "$(uname -s)" in Linux) if [ -n "${HOST:-}" ]; then # Needed for cross-compilation for 32-bit targets. - export CPPFLAGS='-D_FILE_OFFSET_BITS=64' + export CPPFLAGS="${CPPFLAGS:-} -D_FILE_OFFSET_BITS=64" fi ;; @@ -64,7 +61,7 @@ Darwin) nproc() { sysctl -n hw.ncpu; } gcrypt=$(brew --prefix libgcrypt) openssl=$(brew --prefix openssl) - export CPPFLAGS="-I/usr/local/include -I$gcrypt/include -I$openssl/include -I$gcrypt/include" + export CPPFLAGS="${CPPFLAGS:-} -I/usr/local/include -I$gcrypt/include -I$openssl/include -I$gcrypt/include" ;; esac @@ -75,6 +72,9 @@ default) nolegacy) run_tests nolegacy --disable-legacy-protocol ;; +gcrypt) + run_tests gcrypt --with-libgcrypt + ;; *) bail "unknown test flavor $1" ;;