summaryrefslogtreecommitdiffstats
path: root/meta/recipes-core/expat/expat/run-ptest
diff options
context:
space:
mode:
Diffstat (limited to 'meta/recipes-core/expat/expat/run-ptest')
-rw-r--r--meta/recipes-core/expat/expat/run-ptest23
1 files changed, 23 insertions, 0 deletions
diff --git a/meta/recipes-core/expat/expat/run-ptest b/meta/recipes-core/expat/expat/run-ptest
new file mode 100644
index 0000000000..1b39cec8e5
--- /dev/null
+++ b/meta/recipes-core/expat/expat/run-ptest
@@ -0,0 +1,23 @@
1#!/bin/bash
2
3output=${1:-"expat_tests.log"} # default log file
4
5# logging function
6function testCheck() {
7 testExec="$1"
8 shift
9 echo && echo ${testExec} && ./${testExec} "$@"
10 error=$?
11 result=$([[ ${error} -eq 0 ]] && echo "PASS" || echo "FAIL")
12 echo "${result}: ${testExec}" && echo "============================"
13}
14
15export output
16export -f testCheck
17TIME=$(which time)
18
19echo "Architecture: $(uname -m)" > ${output}
20echo "Image: $(uname -sr)" >> ${output}
21${TIME} -f 'Execution time: %e s' bash -c "testCheck runtests -vv" |& tee -a ${output}
22${TIME} -f 'Execution time: %e s' bash -c "testCheck runtestspp -vv" |& tee -a ${output}
23echo