projects
/
tinc
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Extract common logic in OpenSSL-specific code
[tinc]
/
.ci
/
test
/
run.sh
diff --git
a/.ci/test/run.sh
b/.ci/test/run.sh
index
3e17788
..
2d1eb07
100644
(file)
--- a/
.ci/test/run.sh
+++ b/
.ci/test/run.sh
@@
-27,31
+27,39
@@
run_tests() {
sudo git clean -dfx
sudo chown -R "${USER:-$(whoami)}" .
sudo git clean -dfx
sudo chown -R "${USER:-$(whoami)}" .
+ mkdir -p sanitizer /tmp/logs
+
header "Running test flavor $flavor"
autoreconf -fsi
header "Running test flavor $flavor"
autoreconf -fsi
- # shellcheck disable=SC2046
- ./configure $(sh .ci/conf.sh "$@")
+
+ DISTCHECK_CONFIGURE_FLAGS=$(sh .ci/conf.sh "$@")
+ export DISTCHECK_CONFIGURE_FLAGS
+
+ # shellcheck disable=SC2086
+ ./configure $DISTCHECK_CONFIGURE_FLAGS
+
make -j"$(nproc)" all extra
make -j"$(nproc)" all extra
+ if [ "$(uname -s)" = Linux ]; then
+ cmd=distcheck
+ else
+ cmd=check
+ fi
+
code=0
code=0
- make
check
-j2 VERBOSE=1 || code=$?
+ make
$cmd
-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
}
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.
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
;;
fi
;;
@@
-64,7
+72,7
@@
Darwin)
nproc() { sysctl -n hw.ncpu; }
gcrypt=$(brew --prefix libgcrypt)
openssl=$(brew --prefix openssl)
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
;;
esac
@@
-78,6
+86,13
@@
nolegacy)
gcrypt)
run_tests gcrypt --with-libgcrypt
;;
gcrypt)
run_tests gcrypt --with-libgcrypt
;;
+openssl3)
+ if [ -d /opt/ssl3 ]; then
+ run_tests openssl3 --with-openssl=/opt/ssl3 --with-openssl-include=/opt/ssl3/include --with-openssl-lib=/opt/ssl3/lib64
+ else
+ echo >&2 "OpenSSL 3 not installed, skipping test"
+ fi
+ ;;
*)
bail "unknown test flavor $1"
;;
*)
bail "unknown test flavor $1"
;;