summaryrefslogtreecommitdiff
path: root/tests/gtests/gtests.sh
diff options
context:
space:
mode:
authorMartin Thomson <mt@lowentropy.net>2019-03-21 11:13:27 +1100
committerMartin Thomson <mt@lowentropy.net>2019-03-21 11:13:27 +1100
commit255dde6d38934d8bf639600d7e5e71375f42d8eb (patch)
treee7788467f8e494cd213d8c035de97ccae320a90d /tests/gtests/gtests.sh
parent421f4e82340bc7a97049c7a8398807286774ec3b (diff)
downloadnss-hg-255dde6d38934d8bf639600d7e5e71375f42d8eb.tar.gz
Bug 1531236 - Fixup gtests.sh paths, a=bustage
Diffstat (limited to 'tests/gtests/gtests.sh')
-rwxr-xr-xtests/gtests/gtests.sh29
1 files changed, 17 insertions, 12 deletions
diff --git a/tests/gtests/gtests.sh b/tests/gtests/gtests.sh
index f9f3ca81c..e96070a1f 100755
--- a/tests/gtests/gtests.sh
+++ b/tests/gtests/gtests.sh
@@ -23,6 +23,7 @@
gtest_init()
{
cd "$(dirname "$1")"
+ pwd
SOURCE_DIR="$PWD"/../..
if [ -z "${INIT_SOURCED}" -o "${INIT_SOURCED}" != "TRUE" ]; then
cd ../common
@@ -30,11 +31,14 @@ gtest_init()
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 #############################
@@ -48,20 +52,22 @@ gtest_start()
html_unknown "Skipping $i (not built)"
continue
fi
- GTESTDIR="${HOSTDIR}/$i"
+ DIR="${GTESTDIR}/$i"
html_head "$i"
- if [ ! -d "$GTESTDIR" ]; then
- mkdir -p "$GTESTDIR"
- echo "${BINDIR}/certutil" -N -d "$GTESTDIR" --empty-password 2>&1
- "${BINDIR}/certutil" -N -d "$GTESTDIR" --empty-password 2>&1
+ 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
- cd "$GTESTDIR"
- GTESTREPORT="$GTESTDIR/report.xml"
- PARSED_REPORT="$GTESTDIR/report.parsed"
+ cd "$DIR"
+ GTESTREPORT="$DIR/report.xml"
+ PARSED_REPORT="$DIR/report.parsed"
echo "executing $i"
"${BINDIR}/$i" "${SOURCE_DIR}/gtests/freebl_gtest/kat/Hash_DRBG.rsp" \
- -d "$GTESTDIR" -w --gtest_output=xml:"${GTESTREPORT}" \
- --gtest_filter="${GTESTFILTER:-*}"
+ -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"
@@ -82,8 +88,7 @@ gtest_start()
gtest_cleanup()
{
html "</TABLE><BR>"
- cd "${QADIR}"
- . common/cleanup.sh
+ . "${QADIR}"/common/cleanup.sh
}
################## main #################################################