]> git.ipfire.org Git - thirdparty/openembedded/openembedded-core-contrib.git/commitdiff
python3-cryptography: Fix ptest result handling
authorRichard Purdie <richard.purdie@linuxfoundation.org>
Thu, 17 Mar 2022 00:32:50 +0000 (00:32 +0000)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Thu, 17 Mar 2022 16:43:04 +0000 (16:43 +0000)
We run the tests correctly, we just don't get individual test result
reporting. Borrow the code from python3-bcrypt to handle this correctly
and ensure the test pass/fail scores and individual test results are
reported in a format we can read.

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
meta/recipes-devtools/python/python3-cryptography/run-ptest

index 1e97dda63e7430340699171e590978fc143ffe7d..3089df878197a2273887c5b4993874b8e73383ad 100644 (file)
@@ -1,4 +1,4 @@
 #!/bin/sh
 if ./check-memfree.py; then
-    pytest -vvvv tests/
+    pytest -vvvv tests/ -o log_cli=true -o log_cli_level=INFO | sed -e 's/\[...%\]//g'| sed -e 's/PASSED/PASS/g'| sed -e 's/FAILED/FAIL/g'|sed -e 's/SKIPPED/SKIP/g'| awk '{if ($NF=="PASS" || $NF=="FAIL" || $NF=="SKIP" || $NF=="XFAIL" || $NF=="XPASS"){printf "%s: %s\n", $NF, $0}else{print}}'| awk '{if ($NF=="PASS" || $NF=="FAIL" || $NF=="SKIP" || $NF=="XFAIL" || $NF=="XPASS") {$NF="";print $0}else{print}}'
 fi