mirror of
https://github.com/OpenVPN/openvpn.git
synced 2026-05-28 04:03:29 -04:00
tests: Allow to override openvpn binary used
Some checks are pending
Build / Check code style with Uncrustify (push) Waiting to run
Build / gcc-mingw - x64 - OSSL (push) Waiting to run
Build / gcc-mingw - x86 - OSSL (push) Waiting to run
Build / mingw unittest argv - x64 - OSSL (push) Blocked by required conditions
Build / mingw unittest auth_token - x64 - OSSL (push) Blocked by required conditions
Build / mingw unittest buffer - x64 - OSSL (push) Blocked by required conditions
Build / mingw unittest crypto - x64 - OSSL (push) Blocked by required conditions
Build / mingw unittest cryptoapi - x64 - OSSL (push) Blocked by required conditions
Build / mingw unittest misc - x64 - OSSL (push) Blocked by required conditions
Build / mingw unittest ncp - x64 - OSSL (push) Blocked by required conditions
Build / mingw unittest packet_id - x64 - OSSL (push) Blocked by required conditions
Build / mingw unittest pkt - x64 - OSSL (push) Blocked by required conditions
Build / mingw unittest provider - x64 - OSSL (push) Blocked by required conditions
Build / mingw unittest tls_crypt - x64 - OSSL (push) Blocked by required conditions
Build / mingw unittest argv - x86 - OSSL (push) Blocked by required conditions
Build / mingw unittest auth_token - x86 - OSSL (push) Blocked by required conditions
Build / mingw unittest buffer - x86 - OSSL (push) Blocked by required conditions
Build / mingw unittest crypto - x86 - OSSL (push) Blocked by required conditions
Build / mingw unittest cryptoapi - x86 - OSSL (push) Blocked by required conditions
Build / mingw unittest misc - x86 - OSSL (push) Blocked by required conditions
Build / mingw unittest ncp - x86 - OSSL (push) Blocked by required conditions
Build / mingw unittest packet_id - x86 - OSSL (push) Blocked by required conditions
Build / mingw unittest pkt - x86 - OSSL (push) Blocked by required conditions
Build / mingw unittest provider - x86 - OSSL (push) Blocked by required conditions
Build / mingw unittest tls_crypt - x86 - OSSL (push) Blocked by required conditions
Build / gcc - ubuntu-24.04 - OpenSSL 3.0.13 --enable-pkcs11 (push) Waiting to run
Build / gcc - ubuntu-22.04 - OpenSSL 3.0.2 --enable-pkcs11 (push) Waiting to run
Build / gcc - ubuntu-22.04 - mbed TLS 2.28.0 (push) Waiting to run
Build / clang-asan - ubuntu-22.04 - mbedtls (push) Waiting to run
Build / clang-asan - ubuntu-22.04 - openssl (push) Waiting to run
Build / clang-asan - ubuntu-24.04 - mbedtls (push) Waiting to run
Build / clang-asan - ubuntu-24.04 - openssl (push) Waiting to run
Build / macos-13 - libressl - asan (push) Waiting to run
Build / macos-13 - openssl@1.1 - asan (push) Waiting to run
Build / macos-13 - openssl@3 - asan (push) Waiting to run
Build / macos-14 - libressl - asan (push) Waiting to run
Build / macos-14 - openssl@1.1 - asan (push) Waiting to run
Build / macos-14 - openssl@3 - asan (push) Waiting to run
Build / macos-15 - libressl - asan (push) Waiting to run
Build / macos-15 - openssl@1.1 - asan (push) Waiting to run
Build / macos-15 - openssl@3 - asan (push) Waiting to run
Build / macos-13 - libressl - normal (push) Waiting to run
Build / macos-13 - openssl@1.1 - normal (push) Waiting to run
Build / macos-13 - openssl@3 - normal (push) Waiting to run
Build / macos-14 - libressl - normal (push) Waiting to run
Build / macos-14 - openssl@1.1 - normal (push) Waiting to run
Build / macos-14 - openssl@3 - normal (push) Waiting to run
Build / macos-15 - libressl - normal (push) Waiting to run
Build / macos-15 - openssl@1.1 - normal (push) Waiting to run
Build / macos-15 - openssl@3 - normal (push) Waiting to run
Build / msbuild - amd64 - openssl (push) Waiting to run
Build / msbuild - arm64 - openssl (push) Waiting to run
Build / msbuild - x86 - openssl (push) Waiting to run
Build / clang asan - ubuntu-22.04 - libressl (push) Waiting to run
Build / gcc normal - ubuntu-22.04 - libressl (push) Waiting to run
Some checks are pending
Build / Check code style with Uncrustify (push) Waiting to run
Build / gcc-mingw - x64 - OSSL (push) Waiting to run
Build / gcc-mingw - x86 - OSSL (push) Waiting to run
Build / mingw unittest argv - x64 - OSSL (push) Blocked by required conditions
Build / mingw unittest auth_token - x64 - OSSL (push) Blocked by required conditions
Build / mingw unittest buffer - x64 - OSSL (push) Blocked by required conditions
Build / mingw unittest crypto - x64 - OSSL (push) Blocked by required conditions
Build / mingw unittest cryptoapi - x64 - OSSL (push) Blocked by required conditions
Build / mingw unittest misc - x64 - OSSL (push) Blocked by required conditions
Build / mingw unittest ncp - x64 - OSSL (push) Blocked by required conditions
Build / mingw unittest packet_id - x64 - OSSL (push) Blocked by required conditions
Build / mingw unittest pkt - x64 - OSSL (push) Blocked by required conditions
Build / mingw unittest provider - x64 - OSSL (push) Blocked by required conditions
Build / mingw unittest tls_crypt - x64 - OSSL (push) Blocked by required conditions
Build / mingw unittest argv - x86 - OSSL (push) Blocked by required conditions
Build / mingw unittest auth_token - x86 - OSSL (push) Blocked by required conditions
Build / mingw unittest buffer - x86 - OSSL (push) Blocked by required conditions
Build / mingw unittest crypto - x86 - OSSL (push) Blocked by required conditions
Build / mingw unittest cryptoapi - x86 - OSSL (push) Blocked by required conditions
Build / mingw unittest misc - x86 - OSSL (push) Blocked by required conditions
Build / mingw unittest ncp - x86 - OSSL (push) Blocked by required conditions
Build / mingw unittest packet_id - x86 - OSSL (push) Blocked by required conditions
Build / mingw unittest pkt - x86 - OSSL (push) Blocked by required conditions
Build / mingw unittest provider - x86 - OSSL (push) Blocked by required conditions
Build / mingw unittest tls_crypt - x86 - OSSL (push) Blocked by required conditions
Build / gcc - ubuntu-24.04 - OpenSSL 3.0.13 --enable-pkcs11 (push) Waiting to run
Build / gcc - ubuntu-22.04 - OpenSSL 3.0.2 --enable-pkcs11 (push) Waiting to run
Build / gcc - ubuntu-22.04 - mbed TLS 2.28.0 (push) Waiting to run
Build / clang-asan - ubuntu-22.04 - mbedtls (push) Waiting to run
Build / clang-asan - ubuntu-22.04 - openssl (push) Waiting to run
Build / clang-asan - ubuntu-24.04 - mbedtls (push) Waiting to run
Build / clang-asan - ubuntu-24.04 - openssl (push) Waiting to run
Build / macos-13 - libressl - asan (push) Waiting to run
Build / macos-13 - openssl@1.1 - asan (push) Waiting to run
Build / macos-13 - openssl@3 - asan (push) Waiting to run
Build / macos-14 - libressl - asan (push) Waiting to run
Build / macos-14 - openssl@1.1 - asan (push) Waiting to run
Build / macos-14 - openssl@3 - asan (push) Waiting to run
Build / macos-15 - libressl - asan (push) Waiting to run
Build / macos-15 - openssl@1.1 - asan (push) Waiting to run
Build / macos-15 - openssl@3 - asan (push) Waiting to run
Build / macos-13 - libressl - normal (push) Waiting to run
Build / macos-13 - openssl@1.1 - normal (push) Waiting to run
Build / macos-13 - openssl@3 - normal (push) Waiting to run
Build / macos-14 - libressl - normal (push) Waiting to run
Build / macos-14 - openssl@1.1 - normal (push) Waiting to run
Build / macos-14 - openssl@3 - normal (push) Waiting to run
Build / macos-15 - libressl - normal (push) Waiting to run
Build / macos-15 - openssl@1.1 - normal (push) Waiting to run
Build / macos-15 - openssl@3 - normal (push) Waiting to run
Build / msbuild - amd64 - openssl (push) Waiting to run
Build / msbuild - arm64 - openssl (push) Waiting to run
Build / msbuild - x86 - openssl (push) Waiting to run
Build / clang asan - ubuntu-22.04 - libressl (push) Waiting to run
Build / gcc normal - ubuntu-22.04 - libressl (push) Waiting to run
This makes it easy to test an installed binary for
example.
Change-Id: Ida7a64a299cd5bf7ae4f0cc725756b5f5cc408f9
Signed-off-by: Frank Lichtenheld <frank@lichtenheld.com>
Acked-by: Gert Doering <gert@greenie.muc.de>
Message-Id: <20230511101253.369196-1-frank@lichtenheld.com>
URL: https://www.mail-archive.com/openvpn-devel@lists.sourceforge.net/msg26648.html
Signed-off-by: Gert Doering <gert@greenie.muc.de>
Acked-by: Gert Doering <gert@greenie.muc.de>
Gerrit URL: https://gerrit.openvpn.net/c/openvpn/+/1424
(cherry picked from commit d623aa6c29)
Message-Id: <20251208193950.16969-1-gert@greenie.muc.de>
URL: https://www.mail-archive.com/openvpn-devel@lists.sourceforge.net/msg34907.html
Signed-off-by: Gert Doering <gert@greenie.muc.de>
This commit is contained in:
parent
3118c424c7
commit
966cdeb33d
4 changed files with 15 additions and 12 deletions
|
|
@ -18,6 +18,7 @@ TCLIENT_SKIP_RC="${TCLIENT_SKIP_RC:-77}"
|
|||
|
||||
srcdir="${srcdir:-.}"
|
||||
top_builddir="${top_builddir:-..}"
|
||||
openvpn="${openvpn:-${top_builddir}/src/openvpn/openvpn}"
|
||||
if [ -r "${top_builddir}"/t_client.rc ] ; then
|
||||
. "${top_builddir}"/t_client.rc
|
||||
elif [ -r "${srcdir}"/t_client.rc ] ; then
|
||||
|
|
@ -49,7 +50,7 @@ if [ $? -ne 0 ]; then
|
|||
exit "${TCLIENT_SKIP_RC}"
|
||||
fi
|
||||
|
||||
if [ ! -x "${top_builddir}/src/openvpn/openvpn" ]
|
||||
if [ ! -x "${openvpn}" ]
|
||||
then
|
||||
echo "no (executable) openvpn binary in current build tree. FAIL." >&2
|
||||
exit 1
|
||||
|
|
@ -352,9 +353,9 @@ do
|
|||
pidfile="${top_builddir}/tests/$LOGDIR/openvpn-$SUF.pid"
|
||||
openvpn_conf="$openvpn_conf --writepid $pidfile $up"
|
||||
output " run openvpn $openvpn_conf"
|
||||
echo "# src/openvpn/openvpn $openvpn_conf" >$LOGDIR/$SUF:openvpn.log
|
||||
echo "# ${openvpn} $openvpn_conf" >$LOGDIR/$SUF:openvpn.log
|
||||
umask 022
|
||||
$RUN_SUDO "${top_builddir}/src/openvpn/openvpn" $openvpn_conf >>$LOGDIR/$SUF:openvpn.log &
|
||||
$RUN_SUDO "${openvpn}" $openvpn_conf >>$LOGDIR/$SUF:openvpn.log &
|
||||
sudopid=$!
|
||||
|
||||
# Check if OpenVPN has initialized before continuing. It will check every 3rd second up
|
||||
|
|
|
|||
|
|
@ -22,6 +22,7 @@ set -e
|
|||
srcdir="${srcdir:-.}"
|
||||
top_srcdir="${top_srcdir:-..}"
|
||||
top_builddir="${top_builddir:-..}"
|
||||
openvpn="${openvpn:-${top_builddir}/src/openvpn/openvpn}"
|
||||
trap "rm -f log.$$ log.$$.signal ; trap 0 ; exit 77" 1 2 15
|
||||
trap "rm -f log.$$ log.$$.signal ; exit 1" 0 3
|
||||
addopts=
|
||||
|
|
@ -55,8 +56,8 @@ success=0
|
|||
for i in 1 2 3 ; do
|
||||
set +e
|
||||
(
|
||||
"${top_builddir}/src/openvpn/openvpn" --script-security 2 --cd "${root}" ${addopts} --setenv role srv --down "${downscript}" --tls-exit --ping-exit 180 --config "sample-config-files/loopback-server" &
|
||||
"${top_builddir}/src/openvpn/openvpn" --script-security 2 --cd "${top_srcdir}/sample" ${addopts} --setenv role clt --down "${downscript}" --tls-exit --ping-exit 180 --config "sample-config-files/loopback-client"
|
||||
"${openvpn}" --script-security 2 --cd "${root}" ${addopts} --setenv role srv --down "${downscript}" --tls-exit --ping-exit 180 --config "sample-config-files/loopback-server" &
|
||||
"${openvpn}" --script-security 2 --cd "${top_srcdir}/sample" ${addopts} --setenv role clt --down "${downscript}" --tls-exit --ping-exit 180 --config "sample-config-files/loopback-client"
|
||||
) 3>log.$$.signal >log.$$ 2>&1
|
||||
e1=$?
|
||||
wait $!
|
||||
|
|
|
|||
|
|
@ -21,6 +21,7 @@
|
|||
|
||||
set -eu
|
||||
top_builddir="${top_builddir:-..}"
|
||||
openvpn="${openvpn:-${top_builddir}/src/openvpn/openvpn}"
|
||||
trap "rm -f key.$$ tc-server-key.$$ tc-client-key.$$ log.$$ ; trap 0 ; exit 77" 1 2 15
|
||||
trap "rm -f key.$$ tc-server-key.$$ tc-client-key.$$ log.$$ ; exit 1" 0 3
|
||||
|
||||
|
|
@ -71,7 +72,7 @@ fi
|
|||
|
||||
|
||||
# Get list of supported ciphers from openvpn --show-ciphers output
|
||||
CIPHERS=$(${top_builddir}/src/openvpn/openvpn --show-ciphers | \
|
||||
CIPHERS=$(${openvpn} --show-ciphers | \
|
||||
sed -e '/The following/,/^$/d' -e s'/ .*//' -e '/^[[:space:]]*$/d')
|
||||
|
||||
# SK, 2014-06-04: currently the DES-EDE3-CFB1 implementation of OpenSSL is
|
||||
|
|
@ -90,23 +91,23 @@ fi
|
|||
# Also test cipher 'none'
|
||||
CIPHERS=${CIPHERS}$(printf "\nnone")
|
||||
|
||||
"${top_builddir}/src/openvpn/openvpn" --genkey secret key.$$
|
||||
"${openvpn}" --genkey secret key.$$
|
||||
set +e
|
||||
|
||||
for cipher in ${CIPHERS}
|
||||
do
|
||||
test_start "Testing cipher ${cipher}... "
|
||||
( "${top_builddir}/src/openvpn/openvpn" --test-crypto --secret key.$$ --cipher ${cipher} ) >log.$$ 2>&1
|
||||
( "${openvpn}" --test-crypto --secret key.$$ --cipher ${cipher} ) >log.$$ 2>&1
|
||||
test_end $? log.$$
|
||||
done
|
||||
|
||||
test_start "Testing tls-crypt-v2 server key generation... "
|
||||
"${top_builddir}/src/openvpn/openvpn" \
|
||||
"${openvpn}" \
|
||||
--genkey tls-crypt-v2-server tc-server-key.$$ >log.$$ 2>&1
|
||||
test_end $? log.$$
|
||||
|
||||
test_start "Testing tls-crypt-v2 key generation (no metadata)... "
|
||||
"${top_builddir}/src/openvpn/openvpn" --tls-crypt-v2 tc-server-key.$$ \
|
||||
"${openvpn}" --tls-crypt-v2 tc-server-key.$$ \
|
||||
--genkey tls-crypt-v2-client tc-client-key.$$ >log.$$ 2>&1
|
||||
test_end $? log.$$
|
||||
|
||||
|
|
@ -118,7 +119,7 @@ while [ $i -lt 732 ]; do
|
|||
i=$(expr $i + 1)
|
||||
done
|
||||
test_start "Testing tls-crypt-v2 key generation (max length metadata)... "
|
||||
"${top_builddir}/src/openvpn/openvpn" --tls-crypt-v2 tc-server-key.$$ \
|
||||
"${openvpn}" --tls-crypt-v2 tc-server-key.$$ \
|
||||
--genkey tls-crypt-v2-client tc-client-key.$$ "${METADATA}" \
|
||||
>log.$$ 2>&1
|
||||
test_end $? log.$$
|
||||
|
|
|
|||
|
|
@ -7,7 +7,7 @@ LAST_TEST=8
|
|||
|
||||
srcdir="${srcdir:-.}"
|
||||
top_builddir="${top_builddir:-..}"
|
||||
openvpn="${top_builddir}/src/openvpn/openvpn"
|
||||
openvpn="${openvpn:-${top_builddir}/src/openvpn/openvpn}"
|
||||
|
||||
|
||||
# bail out right away on non-linux. NetLink (the object of this test) is only
|
||||
|
|
|
|||
Loading…
Reference in a new issue