[OE-core] [PATCH] libevent: add granularity to ptest
Khem Raj
raj.khem at gmail.com
Fri Sep 6 14:30:34 UTC 2019
On Fri, Sep 6, 2019 at 7:04 AM Trevor Gamblin <Trevor.Gamblin at windriver.com>
wrote:
> From: Trevor Gamblin <trevor.gamblin at windriver.com>
>
> The libevent ptest used to report only a global pass or a fail result.
> Count individual PASS, FAIL, SKIP results. The SKIP results now
> include tests that are disabled in the libevent code.
>
> Signed-off-by: Trevor Gamblin <trevor.gamblin at windriver.com>
> ---
> .../libevent/libevent/run-ptest | 34 ++++++++++++-------
> 1 file changed, 22 insertions(+), 12 deletions(-)
>
> diff --git a/meta/recipes-support/libevent/libevent/run-ptest
> b/meta/recipes-support/libevent/libevent/run-ptest
> index 0241851c70..b7d945246f 100644
> --- a/meta/recipes-support/libevent/libevent/run-ptest
> +++ b/meta/recipes-support/libevent/libevent/run-ptest
> @@ -1,18 +1,28 @@
> #!/bin/sh
>
> -fail=0
> +# run-ptest - 'ptest' test infrastructure shell script that
> +# wraps the libevent test scripts
> +#
> +# Trevor Gamblin <trevor.gamblin at windriver.com>
> +###############################################################
+LIBEVENTLIB=/usr/lib/libevent
>
Do we need to account for multilib here ?
+LOG="${LIBEVENTLIB}/ptest/libevent_ptest_$(date +%Y%m%d-%H%M%S).log"
> +
> +cd ${LIBEVENTLIB}/ptest
> +
> for test in ./test/*
> do
> - $test
> - if [ $? -ne 0 ]
> - then
> - fail=1
> - fi
> + $test 2>&1|tee -a ${LOG}
> done
>
> -if [ $fail -eq 0 ]
> -then
> - echo "PASS: libevent"
> -else
> - echo "FAIL: libevent"
> -fi
> +passed=`grep OK ${LOG}|wc -l`
> +failed=`grep FAILED ${LOG}|wc -l`
> +skipped=`grep -E 'DISABLED|SKIPPED' ${LOG}|wc -l`
> +all=$((passed + failed + skipped))
> +
> +( echo "=== Test Summary ==="
> + echo "TOTAL: ${all}"
> + echo "PASSED: ${passed}"
> + echo "FAILED: ${failed}"
> + echo "SKIPPED: ${skipped}"
> +) | tee -a ${LOG}
> --
> 2.21.0
>
> --
> _______________________________________________
> Openembedded-core mailing list
> Openembedded-core at lists.openembedded.org
> http://lists.openembedded.org/mailman/listinfo/openembedded-core
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openembedded.org/pipermail/openembedded-core/attachments/20190906/8f0f20f7/attachment-0001.html>
More information about the Openembedded-core
mailing list