diff options
author | wolfbeast <mcwerewolf@wolfbeast.com> | 2020-01-02 21:06:40 +0100 |
---|---|---|
committer | wolfbeast <mcwerewolf@wolfbeast.com> | 2020-01-02 21:06:40 +0100 |
commit | f4a12fc67689a830e9da1c87fd11afe5bc09deb3 (patch) | |
tree | 211ae0cd022a6c11b0026ecc7761a550c584583c /security/nss/tests/gtests | |
parent | f7d30133221896638f7bf4f66c504255c4b14f48 (diff) | |
download | UXP-f4a12fc67689a830e9da1c87fd11afe5bc09deb3.tar UXP-f4a12fc67689a830e9da1c87fd11afe5bc09deb3.tar.gz UXP-f4a12fc67689a830e9da1c87fd11afe5bc09deb3.tar.lz UXP-f4a12fc67689a830e9da1c87fd11afe5bc09deb3.tar.xz UXP-f4a12fc67689a830e9da1c87fd11afe5bc09deb3.zip |
Issue #1338 - Part 2: Update NSS to 3.48-RTM
Diffstat (limited to 'security/nss/tests/gtests')
-rwxr-xr-x | security/nss/tests/gtests/gtests.sh | 47 |
1 files changed, 31 insertions, 16 deletions
diff --git a/security/nss/tests/gtests/gtests.sh b/security/nss/tests/gtests/gtests.sh index 6606b59e7..50c0410f0 100755 --- a/security/nss/tests/gtests/gtests.sh +++ b/security/nss/tests/gtests/gtests.sh @@ -23,16 +23,21 @@ gtest_init() { cd "$(dirname "$1")" + pwd if [ -z "${INIT_SOURCED}" -o "${INIT_SOURCED}" != "TRUE" ]; then cd ../common . ./init.sh fi SCRIPTNAME=gtests.sh + . "${QADIR}"/common/certsetup.sh if [ -z "${CLEANUP}" ] ; then # if nobody else is responsible for CLEANUP="${SCRIPTNAME}" # cleaning this script will do it fi + + mkdir -p "${GTESTDIR}" + cd "${GTESTDIR}" } ########################## gtest_start ############################# @@ -42,28 +47,38 @@ gtest_start() { echo "gtests: ${GTESTS}" for i in ${GTESTS}; do - if [ ! -f ${BINDIR}/$i ]; then + if [ ! -f "${BINDIR}/$i" ]; then html_unknown "Skipping $i (not built)" continue fi - GTESTDIR="${HOSTDIR}/$i" + DIR="${GTESTDIR}/$i" html_head "$i" - if [ ! -d "$GTESTDIR" ]; then - mkdir -p "$GTESTDIR" + if [ ! -d "$DIR" ]; then + mkdir -p "$DIR" + echo "${BINDIR}/certutil" -N -d "$DIR" --empty-password 2>&1 + "${BINDIR}/certutil" -N -d "$DIR" --empty-password 2>&1 + + PROFILEDIR="$DIR" make_cert dummy p256 sign + fi + pushd "$DIR" + GTESTREPORT="$DIR/report.xml" + PARSED_REPORT="$DIR/report.parsed" + # The mozilla::pkix gtests cause an ODR violation that we ignore. + # See bug 1588567. + if [ "$i" = "mozpkix_gtest" ]; then + EXTRA_ASAN_OPTIONS="detect_odr_violation=0" fi - cd "$GTESTDIR" - GTESTREPORT="$GTESTDIR/report.xml" - PARSED_REPORT="$GTESTDIR/report.parsed" echo "executing $i" - ${BINDIR}/$i "${SOURCE_DIR}/gtests/freebl_gtest/kat/Hash_DRBG.rsp" \ - -d "$GTESTDIR" --gtest_output=xml:"${GTESTREPORT}" \ - --gtest_filter="${GTESTFILTER-*}" + ASAN_OPTIONS="$ASAN_OPTIONS:$EXTRA_ASAN_OPTIONS" "${BINDIR}/$i" \ + "${SOURCE_DIR}/gtests/freebl_gtest/kat/Hash_DRBG.rsp" \ + -d "$DIR" -w --gtest_output=xml:"${GTESTREPORT}" \ + --gtest_filter="${GTESTFILTER:-*}" html_msg $? 0 "$i run successfully" echo "test output dir: ${GTESTREPORT}" echo "executing sed to parse the xml report" - sed -f ${COMMON}/parsegtestreport.sed "${GTESTREPORT}" > "${PARSED_REPORT}" + sed -f "${COMMON}/parsegtestreport.sed" "$GTESTREPORT" > "$PARSED_REPORT" echo "processing the parsed report" - cat "${PARSED_REPORT}" | while read result name; do + cat "$PARSED_REPORT" | while read result name; do if [ "$result" = "notrun" ]; then echo "$name" SKIPPED elif [ "$result" = "run" ]; then @@ -72,19 +87,19 @@ gtest_start() html_failed_ignore_core "$name" fi done + popd done } gtest_cleanup() { html "</TABLE><BR>" - cd ${QADIR} - . common/cleanup.sh + . "${QADIR}"/common/cleanup.sh } ################## main ################################################# -GTESTS="prng_gtest certhigh_gtest certdb_gtest der_gtest pk11_gtest util_gtest freebl_gtest softoken_gtest blake2b_gtest" +GTESTS="${GTESTS:-prng_gtest certhigh_gtest certdb_gtest der_gtest pk11_gtest util_gtest freebl_gtest softoken_gtest sysinit_gtest blake2b_gtest smime_gtest mozpkix_gtest}" SOURCE_DIR="$PWD"/../.. -gtest_init $0 +gtest_init "$0" gtest_start gtest_cleanup |