diff options
author | Dave Wallace <dwallacelf@gmail.com> | 2017-10-17 04:00:50 -0400 |
---|---|---|
committer | Keith Burns <alagalah@gmail.com> | 2017-10-17 16:09:25 +0000 |
commit | 80b48a61b8781b41b5c2eeca482c2778562422f4 (patch) | |
tree | f95c26598652be0f08c568e9c6d0d13c409a2f35 /extras/vcl-ldpreload/test/curl_test.sh | |
parent | 68a40c868d84284ce5a4d048a2a1a1415a5a24f8 (diff) |
VCL_LDPRELOAD: Add unit test scripts.
Change-Id: I5fbb3339a6dbd7b40fecf66bfda3fd3249b4a90c
Signed-off-by: Dave Wallace <dwallacelf@gmail.com>
Diffstat (limited to 'extras/vcl-ldpreload/test/curl_test.sh')
-rwxr-xr-x | extras/vcl-ldpreload/test/curl_test.sh | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/extras/vcl-ldpreload/test/curl_test.sh b/extras/vcl-ldpreload/test/curl_test.sh new file mode 100755 index 00000000000..c0d88d7af4a --- /dev/null +++ b/extras/vcl-ldpreload/test/curl_test.sh @@ -0,0 +1,24 @@ +#! /bin/bash +# +# curl_test.sh - VCL-LDPRELOAD curl test. +# +# Run curl using LD_PRELOAD to fetch a page from +# nginx running in vpp1 net-namespace. +# +# + +# Verify Environment. +if [ -z "$WS_ROOT" ] ; then + echo "ERROR: WS_ROOT environment variable not set!" >&2 + echo " Please set WS_ROOT to VPP workspace root directory." >&2 + exit 1 +fi +if [ -z "$LDP_DIR" ] ; then + echo "WARNING: LDP_DIR environment variable is not set!" + echo " Sourcing $WS_ROOT/extras/vcl-ldpreload/env.sh" + source $WS_ROOT/extras/vcl-ldpreload/env.sh +fi + +TEST_APP="${TEST_APP:-curl}" +LDP_TEST_DIR="${LDP_TEST_DIR:-${LDP_DIR}/test}" +source $LDP_TEST_DIR/common/nginx_test.sh |