diff options
author | Tim Taubert <ttaubert@mozilla.com> | 2016-09-16 13:30:48 -0700 |
---|---|---|
committer | Tim Taubert <ttaubert@mozilla.com> | 2016-09-16 13:30:48 -0700 |
commit | d70e758cb85ff6bbffba175e6d46f533b8f5f699 (patch) | |
tree | 8b9a6d9cef012bb33853db4eefcdd30ef43e8331 /tests/bogo | |
parent | 0c56b4fe813ae76208934c231582d7ed5272b06d (diff) | |
download | nss-hg-d70e758cb85ff6bbffba175e6d46f533b8f5f699.tar.gz |
Bug 1298110 - Add BoGo TLS tests to Taskcluster r=franziskus
Diffstat (limited to 'tests/bogo')
-rw-r--r-- | tests/bogo/bogo.sh | 60 |
1 files changed, 60 insertions, 0 deletions
diff --git a/tests/bogo/bogo.sh b/tests/bogo/bogo.sh new file mode 100644 index 000000000..804462d8a --- /dev/null +++ b/tests/bogo/bogo.sh @@ -0,0 +1,60 @@ +#!/bin/bash +# +# This Source Code Form is subject to the terms of the Mozilla Public +# License, v. 2.0. If a copy of the MPL was not distributed with this +# file, You can obtain one at http://mozilla.org/MPL/2.0/. + +######################################################################## +# +# tests/bogo/bogo.sh +# +# Script to drive the ssl bogo interop unit tests +# +######################################################################## + +bogo_init() +{ + mkdir -p "${HOSTDIR}/bogo" + cd "${HOSTDIR}/bogo" + + SCRIPTNAME="bogo.sh" + if [ -z "${INIT_SOURCED}" -o "${INIT_SOURCED}" != "TRUE" ] ; then + cd ../common + . ./init.sh + fi + + if [ ! -d "boringssl" ]; then + git clone https://boringssl.googlesource.com/boringssl + cd boringssl + git checkout 5013fb41f2bdb1a2ab99371effce3b23e70719a3 + cd ssl/test/runner + else + cd boringssl/ssl/test/runner + fi + + SCRIPTNAME="bogo.sh" + html_head "bogo test" +} + +bogo_cleanup() +{ + html "</TABLE><BR>" + cd ${QADIR} + . common/cleanup.sh +} + +# Need to add go to the PATH. +export PATH=$PATH:/usr/lib/go-1.6/bin + +SOURCE_DIR=$(echo $PWD/../../) +bogo_init +exec 3>&1 +BOGO_OUT=$(GOPATH=$PWD go test -pipe -shim-path "${BINDIR}"/nss_bogo_shim -loose-errors -allow-unimplemented -shim-config "${SOURCE_DIR}external_tests/nss_bogo_shim/config.json" 2>&1 1>&3) +exec 3>&- +BOGO_OUT=`echo $BOGO_OUT | grep -i 'FAILED\|Assertion failure'` +if [ -n "$BOGO_OUT" ] ; then + html_failed "Bogo test" +else + html_passed "Bogo test" +fi +bogo_cleanup |