[XS] Change in openvpn[master]: t_client.sh.in: Allow to override the location of t_client_ips.rc

"flichtenheld \(Code Review\) via Openvpn-devel" <[email protected]>
Newsgroups gmane.network.openvpn.devel
Message-ID <[email protected]>
Attention is currently required from: plaisthos.

Hello plaisthos,

I'd like you to do a code review.
Please visit

    http://gerrit.openvpn.net/c/openvpn/+/1756?usp=email

to review the following change.


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]>
---
M tests/t_client.sh.in
M tests/update_t_client_ips.sh
2 files changed, 4 insertions(+), 4 deletions(-)



  git pull ssh://gerrit.openvpn.net:29418/openvpn refs/changes/56/1756/1

diff --git a/tests/t_client.sh.in b/tests/t_client.sh.in
index 46646c4..5b407ff 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
@@ -339,7 +342,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 96e3826..013504f 100755
--- a/tests/update_t_client_ips.sh
+++ b/tests/update_t_client_ips.sh
@@ -2,9 +2,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: newchange
Gerrit-Project: openvpn
Gerrit-Branch: master
Gerrit-Change-Id: Ia4a9a6bafb6bcb3fe331a92cfbb64be78f6aa33a
Gerrit-Change-Number: 1756
Gerrit-PatchSet: 1
Gerrit-Owner: flichtenheld <[email protected]>
Gerrit-Reviewer: plaisthos <[email protected]>
Gerrit-CC: openvpn-devel <[email protected]>
Gerrit-Attention: plaisthos <[email protected]>

_______________________________________________
Openvpn-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/openvpn-devel
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.