summaryrefslogtreecommitdiff
path: root/meta-openbmc-mods/meta-common/recipes-core/expat/expat/run-ptest
diff options
context:
space:
mode:
authordheerajpdsk <p.dheeraj.srujan.kumar@intel.com>2022-05-06 12:32:30 +0300
committerGitHub <noreply@github.com>2022-05-06 12:32:30 +0300
commit0945170f93cc0c101bf01739f41136c2f05af570 (patch)
tree4899512512abc7e1529391ae48337ec8b40acced /meta-openbmc-mods/meta-common/recipes-core/expat/expat/run-ptest
parentca8d06bc610af08c2d3efc487aa9519989b743e6 (diff)
parent9cc183a531e1e309a99784f65b15c0fb1a18ddef (diff)
downloadopenbmc-0945170f93cc0c101bf01739f41136c2f05af570.tar.xz
Merge pull request #81 from Intel-BMC/update1-0.91-67
Update to internal 1-0.91-67
Diffstat (limited to 'meta-openbmc-mods/meta-common/recipes-core/expat/expat/run-ptest')
-rw-r--r--meta-openbmc-mods/meta-common/recipes-core/expat/expat/run-ptest23
1 files changed, 23 insertions, 0 deletions
diff --git a/meta-openbmc-mods/meta-common/recipes-core/expat/expat/run-ptest b/meta-openbmc-mods/meta-common/recipes-core/expat/expat/run-ptest
new file mode 100644
index 000000000..2cd3637d8
--- /dev/null
+++ b/meta-openbmc-mods/meta-common/recipes-core/expat/expat/run-ptest
@@ -0,0 +1,23 @@
+#!/bin/bash
+
+output=${1:-"expat_tests.log"} # default log file
+
+# logging function
+function testCheck() {
+ testExec="$1"
+ shift
+ echo && echo ${testExec} && ./${testExec} "$@"
+ error=$?
+ result=$([[ ${error} -eq 0 ]] && echo "PASS" || echo "FAIL")
+ echo "${result}: ${testExec}" && echo "============================"
+}
+
+export output
+export -f testCheck
+TIME=$(which time)
+
+echo "runtests"
+${TIME} -f 'Execution time: %e s' bash -c "./runtests -v"
+echo "runtestspp"
+${TIME} -f 'Execution time: %e s' bash -c "./runtestspp -v"
+echo