[S] Change in openvpn[master]: t_client.sh.in: Allow to override the location of t_client_ips.rc
"cron2 \(Code Review\) via Openvpn-devel" <[email protected]>
| Newsgroups | gmane.network.openvpn.devel |
|---|---|
| Message-ID | <7d7cf830c339118d3569275362be91297895ce14-EmailReplacePatchSet-HTML@gerrit.openvpn.net> |
cron2 has uploaded a new patch set (#7) to the change originally created by flichtenheld. ( http://gerrit.openvpn.net/c/openvpn/+/1756?usp=email ) The following approvals got outdated and were removed: Code-Review+2 by razvanc Change subject: t_client.sh.in: Allow to override the location of t_client_ips.rc ...................................................................... t_client.sh.in: Allow to override the location of t_client_ips.rc Makes it easier to use t_client.sh in other contexts. This is based on work by Gert Doering for the t_server test infrastructure. Change-Id: Ia4a9a6bafb6bcb3fe331a92cfbb64be78f6aa33a Signed-off-by: Frank Lichtenheld <[email protected]> Acked-by: Razvan Cojocaru <[email protected]> Gerrit URL: https://gerrit.openvpn.net/c/openvpn/+/1756 Message-Id: <[email protected]> URL: https://www.mail-archive.com/[email protected]/msg38649.html Signed-off-by: Gert Doering <[email protected]> --- M tests/t_client.rc-sample M tests/t_client.sh.in M tests/update_t_client_ips.sh 3 files changed, 12 insertions(+), 5 deletions(-) git pull ssh://gerrit.openvpn.net:29418/openvpn refs/changes/56/1756/7 diff --git a/tests/t_client.rc-sample b/tests/t_client.rc-sample index 04714ef..4c87436 100644 --- a/tests/t_client.rc-sample +++ b/tests/t_client.rc-sample @@ -18,8 +18,8 @@ #FPING_EXTRA_ARGS="-t 1000" # Load EXPECT_IFCONFIG* parameters from cache -if [ -r "${top_builddir}/t_client_ips.rc" ]; then - . "${top_builddir}/t_client_ips.rc" +if [ -r "${t_client_ips_rc}" ]; then + . "${t_client_ips_rc}" else echo "NOTICE: missing t_client_ips.rc will be auto-generated" fi @@ -67,6 +67,12 @@ # PING6_HOSTS_x = "these hosts musts ping when openvpn is up (IPv6 fping6)" # EXPECT_FAIL_x = "instead of waiting for connection wait for this error message" # +# Note that the EXPECT_IFCONFIG{4,6} options are not generally required, the +# tests will remember the ip address they got on the first run in t_client_ips.rc +# and will expect to get the same address again. But it can be useful to hard-code +# the IP when the server is expected to send a very specific address, e.g. when +# using ccd on the server-side or in a P2P scenario. +# # hook test options: # # FPING_ARGS_x = "arguments to append to the fping command line" diff --git a/tests/t_client.sh.in b/tests/t_client.sh.in index dd7f743..7c23020 100755 --- a/tests/t_client.sh.in +++ b/tests/t_client.sh.in @@ -19,6 +19,9 @@ srcdir="${srcdir:-.}" top_builddir="${top_builddir:-..}" openvpn="${openvpn:-${top_builddir}/src/openvpn/openvpn}" +t_client_ips_rc="${t_client_ips_rc:-${top_builddir}/t_client_ips.rc}" +update_t_client_ips="${update_t_client_ips:-${srcdir}/update_t_client_ips.sh}" + if [ -r "${top_builddir}"/t_client.rc ]; then . "${top_builddir}"/t_client.rc elif [ -r "${srcdir}"/t_client.rc ]; then @@ -327,7 +330,7 @@ # If EXCEPT_IFCONFIG* variables for this test are missing, run an --up # script to generate them dynamically. if [ -z "$expect_ifconfig4" ] || [ -z "$expect_ifconfig6" ]; then - up="--setenv TESTNUM $SUF --setenv TOP_BUILDDIR ${top_builddir} --script-security 2 --up ${srcdir}/update_t_client_ips.sh" + up="--setenv TESTNUM $SUF --setenv RC ${t_client_ips_rc} --script-security 2 --up ${update_t_client_ips}" else up="" fi diff --git a/tests/update_t_client_ips.sh b/tests/update_t_client_ips.sh index 777a286..f02dc7f 100755 --- a/tests/update_t_client_ips.sh +++ b/tests/update_t_client_ips.sh @@ -3,8 +3,6 @@ # This --up script caches the IPs handed out by the test VPN server to a file # for later use. -RC="$TOP_BUILDDIR/t_client_ips.rc" - grep EXPECT_IFCONFIG4_$TESTNUM= $RC >/dev/null 2>&1 if [ $? -ne 0 ]; then echo "EXPECT_IFCONFIG4_$TESTNUM=$ifconfig_local" >>$RC -- To view, visit http://gerrit.openvpn.net/c/openvpn/+/1756?usp=email To unsubscribe, or for help writing mail filters, visit http://gerrit.openvpn.net/settings?usp=email Gerrit-MessageType: newpatchset Gerrit-Project: openvpn Gerrit-Branch: master Gerrit-Change-Id: Ia4a9a6bafb6bcb3fe331a92cfbb64be78f6aa33a Gerrit-Change-Number: 1756 Gerrit-PatchSet: 7 Gerrit-Owner: flichtenheld <[email protected]> Gerrit-Reviewer: plaisthos <[email protected]> Gerrit-Reviewer: razvanc <[email protected]> Gerrit-CC: openvpn-devel <[email protected]> _______________________________________________ Openvpn-devel mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/openvpn-devel