diff options
| author | Richard Purdie <richard.purdie@linuxfoundation.org> | 2022-01-18 15:43:40 +0000 |
|---|---|---|
| committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2022-01-19 10:41:01 +0000 |
| commit | c4c77bd8442efa08b248b1858d55a3ef0045df5f (patch) | |
| tree | 0ddefa39b21682fc101a0a07cdfcec451d31f8d8 /meta | |
| parent | 831626f8550b37ad2ec982616bf213635e22b368 (diff) | |
| download | poky-c4c77bd8442efa08b248b1858d55a3ef0045df5f.tar.gz | |
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>
Diffstat (limited to 'meta')
| -rw-r--r-- | meta/recipes-core/expat/expat/run-ptest | 22 |
1 files changed, 4 insertions, 18 deletions
diff --git a/meta/recipes-core/expat/expat/run-ptest b/meta/recipes-core/expat/expat/run-ptest index 59d8ab57e3..dbf602ca80 100644 --- a/meta/recipes-core/expat/expat/run-ptest +++ b/meta/recipes-core/expat/expat/run-ptest | |||
| @@ -1,23 +1,9 @@ | |||
| 1 | #!/bin/bash | 1 | #!/bin/bash |
| 2 | 2 | ||
| 3 | output=${1:-"expat_tests.log"} # default log file | ||
| 4 | |||
| 5 | # logging function | ||
| 6 | function 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 | |||
| 15 | export output | ||
| 16 | export -f testCheck | ||
| 17 | TIME=$(which time) | 3 | TIME=$(which time) |
| 18 | 4 | ||
| 19 | echo "Architecture: $(uname -m)" > ${output} | 5 | echo "runtests" |
| 20 | echo "Image: $(uname -sr)" >> ${output} | 6 | ${TIME} -f 'Execution time: %e s' bash -c "./runtests -v" |
| 21 | ${TIME} -f 'Execution time: %e s' bash -c "testCheck runtests -v" |& tee -a ${output} | 7 | echo "runtestspp" |
| 22 | ${TIME} -f 'Execution time: %e s' bash -c "testCheck runtestspp -v" |& tee -a ${output} | 8 | ${TIME} -f 'Execution time: %e s' bash -c "./runtestspp -v" |
| 23 | echo | 9 | echo |
