bogo.sh (1777B)
1 #!/bin/bash 2 # 3 # This Source Code Form is subject to the terms of the Mozilla Public 4 # License, v. 2.0. If a copy of the MPL was not distributed with this 5 # file, You can obtain one at http://mozilla.org/MPL/2.0/. 6 7 ######################################################################## 8 # 9 # tests/bogo/bogo.sh 10 # 11 # Script to drive the ssl bogo interop unit tests 12 # 13 ######################################################################## 14 15 # Currently used BorringSSL version 16 BOGO_VERSION=73030794f7aaf4f614486b511908841852807936 17 18 bogo_init() 19 { 20 SCRIPTNAME="bogo.sh" 21 if [ -z "${INIT_SOURCED}" -o "${INIT_SOURCED}" != "TRUE" ] ; then 22 cd ../common 23 . ./init.sh 24 fi 25 26 mkdir -p "${HOSTDIR}/bogo" 27 cd "${HOSTDIR}/bogo" 28 BORING=${BORING:=boringssl} 29 if [ ! -d "$BORING" ]; then 30 git clone -q https://boringssl.googlesource.com/boringssl "$BORING" 31 git -C "$BORING" checkout -q $BOGO_VERSION 32 fi 33 34 SCRIPTNAME="bogo.sh" 35 html_head "bogo test " 36 html_msg $? 0 "Bogo" "Checking out BoringSSL revision $BOGO_VERSION" 37 } 38 39 bogo_cleanup() 40 { 41 html "</TABLE><BR>" 42 cd ${QADIR} 43 . common/cleanup.sh 44 } 45 46 cd "$(dirname "$0")" 47 cwd=$(pwd -P) 48 SOURCE_DIR="$(cd "$cwd"/../..; pwd -P)" 49 bogo_init 50 (cd "$BORING"/ssl/test/runner; 51 git apply ${SOURCE_DIR}/gtests/nss_bogo_shim/nss_loose_local_errors.patch) 52 html_msg $? 0 "Bogo" "NSS -loose-local-errors patch application" 53 html_head "bogo log " 54 echo "" 55 (cd "$BORING"/ssl/test/runner; 56 GOPATH="$cwd" go test -pipe -shim-path "${BINDIR}"/nss_bogo_shim \ 57 -loose-errors -loose-local-errors -allow-unimplemented \ 58 -shim-config "${SOURCE_DIR}/gtests/nss_bogo_shim/config.json") \ 59 2>bogo.errors | tee bogo.log | grep -v 'UNIMPLEMENTED' 60 RES="${PIPESTATUS[0]}" 61 html_head "bogo result" 62 html_msg $RES 0 "Bogo" "Test Run" 63 bogo_cleanup