summaryrefslogtreecommitdiff
path: root/tests/ec
diff options
context:
space:
mode:
authorFranziskus Kiefer <franziskuskiefer@gmail.com>2016-04-29 22:05:13 +0200
committerFranziskus Kiefer <franziskuskiefer@gmail.com>2016-04-29 22:05:13 +0200
commitd2ec5a56bf18831b538ebc9f071c6a58fd3f6769 (patch)
treeb09d0df38ecd4c86af74fd97293557558064cf92 /tests/ec
parentcc2742adb4161ff24b5c5199352e726599d59c24 (diff)
downloadnss-hg-d2ec5a56bf18831b538ebc9f071c6a58fd3f6769.tar.gz
Bug 1265994 - enable ecperf tests, r=ttaubert
Diffstat (limited to 'tests/ec')
-rwxr-xr-xtests/ec/ec.sh37
-rwxr-xr-xtests/ec/ecperf.sh52
2 files changed, 89 insertions, 0 deletions
diff --git a/tests/ec/ec.sh b/tests/ec/ec.sh
new file mode 100755
index 000000000..6b652006c
--- /dev/null
+++ b/tests/ec/ec.sh
@@ -0,0 +1,37 @@
+#! /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/ec/ec.sh
+#
+# needs to work on all Unix and Windows platforms
+# this is a meta script to drive all ec tests
+#
+# special strings
+# ---------------
+# FIXME ... known problems, search for this string
+# NOTE .... unexpected behavior
+#
+########################################################################
+
+############################## run_tests ###############################
+# run test suites defined in ECTESTS variable
+########################################################################
+run_ec_tests()
+{
+ for ECTEST in ${ECTESTS}
+ do
+ SCRIPTNAME=${ECTEST}.sh
+ echo "Running ec tests for ${ECTEST}"
+ echo "TIMESTAMP ${ECTEST} BEGIN: `date`"
+ (cd ${QADIR}/ec; . ./${SCRIPTNAME} 2>&1)
+ echo "TIMESTAMP ${ECTEST} END: `date`"
+ done
+}
+
+ECTESTS="ecperf"
+run_ec_tests \ No newline at end of file
diff --git a/tests/ec/ecperf.sh b/tests/ec/ecperf.sh
new file mode 100755
index 000000000..9dddc3959
--- /dev/null
+++ b/tests/ec/ecperf.sh
@@ -0,0 +1,52 @@
+#! /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/ec/ecperf.sh
+#
+# needs to work on all Unix and Windows platforms
+#
+# special strings
+# ---------------
+# FIXME ... known problems, search for this string
+# NOTE .... unexpected behavior
+#
+########################################################################
+
+############################## ecperf_init #############################
+# local shell function to initialize this script
+########################################################################
+
+ecperf_init()
+{
+ SCRIPTNAME="ecperf.sh"
+ if [ -z "${INIT_SOURCED}" -o "${INIT_SOURCED}" != "TRUE" ] ; then
+ cd ../common
+ . ./init.sh
+ fi
+ SCRIPTNAME="ecperf.sh"
+ html_head "ecperf test"
+}
+
+ecperf_cleanup()
+{
+ html "</TABLE><BR>"
+ cd ${QADIR}
+ chmod a+rw $RONLY_DIR
+ . common/cleanup.sh
+}
+
+ecperf_init
+ECPERF_OUT=`ecperf`
+ECPERF_OUT=`echo $ECPERF_OUT | grep -i "failed"`
+# TODO: this is a perf test we don't check for performance here but only failed
+if [ -n "$ECPERF_OUT" ] ; then
+ html_failed "ec(perf) test"
+else
+ html_passed "ec(perf) test"
+fi
+ecperf_cleanup \ No newline at end of file