Bug 1378639 - Handle absolute paths for interop tests, r=ekr
authorMartin Thomson <martin.thomson@gmail.com>
Fri, 07 Jul 2017 09:25:09 +1000
changeset 13455 8d372f660ce9a611940d2ae4182568668de3935d
parent 13454 a6a5cf93a21e41c6d506708fde4f0791bee51b2e
child 13458 4c1358d767de5da9a5f34afc2821b281fb37ca57
push id2266
push usermartin.thomson@gmail.com
push dateThu, 06 Jul 2017 23:25:42 +0000
reviewersekr
bugs1378639
Bug 1378639 - Handle absolute paths for interop tests, r=ekr
tests/interop/interop.sh
--- a/tests/interop/interop.sh
+++ b/tests/interop/interop.sh
@@ -21,23 +21,25 @@ interop_init()
   fi
 
   mkdir -p "${HOSTDIR}/interop"
   cd "${HOSTDIR}/interop"
   INTEROP=${INTEROP:=tls_interop}
   if [ ! -d "$INTEROP" ]; then
     git clone -q https://github.com/mozilla/tls-interop "$INTEROP"
   fi
+  INTEROP=$(cd "$INTEROP";pwd -P)
 
   # We use the BoringSSL keyfiles
   BORING=${BORING:=boringssl}
   if [ ! -d "$BORING" ]; then
     git clone -q https://boringssl.googlesource.com/boringssl "$BORING"
     git -C "$BORING" checkout -q ea80f9d5df4c302de391e999395e1c87f9c786b3
   fi
+  BORING=$(cd "$BORING";pwd -P)
 
   SCRIPTNAME="interop.sh"
   html_head "interop test"
 }
 
 interop_cleanup()
 {
   html "</TABLE><BR>"
@@ -48,21 +50,21 @@ interop_cleanup()
 # Function so we can easily add other stacks
 interop_run()
 {
   test_name=$1
   client=$2
   server=$3
 
   (cd "$INTEROP";
-   cargo run -- --client ${client} --server ${server} --rootdir ../${BORING}/ssl/test/runner/ --test-cases cases.json) 2>interop-${test_name}.errors | tee interop-${test_name}.log
+   cargo run -- --client "$client" --server "$server" --rootdir "$BORING"/ssl/test/runner/ --test-cases cases.json) 2>interop-${test_name}.errors | tee interop-${test_name}.log
   html_msg "${PIPESTATUS[0]}" 0 "Interop" "Run successfully"
   grep -i 'FAILED\|Assertion failure' interop-${test_name}.errors
   html_msg $? 1 "Interop" "No failures"
 }
 
 cd "$(dirname "$0")"
 SOURCE_DIR="$PWD"/../..
 interop_init
-NSS_SHIM="${BINDIR}"/nss_bogo_shim
-BORING_SHIM="../${BORING}"/build/ssl/test/bssl_shim
+NSS_SHIM="$BINDIR"/nss_bogo_shim
+BORING_SHIM="$BORING"/build/ssl/test/bssl_shim
 interop_run "nss_nss" ${NSS_SHIM} ${NSS_SHIM}
 interop_cleanup