mirror of
https://git.yoctoproject.org/poky
synced 2026-06-01 13:09:50 +00:00
expat: Simplify ptest-runner
Upstream mentioned our ptest-runner could likely be simplified. I had a look at the output and yes, most of the code in the runner is now obsolete as upstream output is compatible with what we need. Simplify accordingly. (From OE-Core rev: 9a9f0a4a062a3c2adf2ac75b4fcdedbb7168335b) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
@@ -1,23 +1,9 @@
|
|||||||
#!/bin/bash
|
#!/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)
|
TIME=$(which time)
|
||||||
|
|
||||||
echo "Architecture: $(uname -m)" > ${output}
|
echo "runtests"
|
||||||
echo "Image: $(uname -sr)" >> ${output}
|
${TIME} -f 'Execution time: %e s' bash -c "./runtests -v"
|
||||||
${TIME} -f 'Execution time: %e s' bash -c "testCheck runtests -v" |& tee -a ${output}
|
echo "runtestspp"
|
||||||
${TIME} -f 'Execution time: %e s' bash -c "testCheck runtestspp -v" |& tee -a ${output}
|
${TIME} -f 'Execution time: %e s' bash -c "./runtestspp -v"
|
||||||
echo
|
echo
|
||||||
|
|||||||
Reference in New Issue
Block a user