From 60e764f77238eff72d5c589b83f12329d393ea9b Mon Sep 17 00:00:00 2001 From: Ross Burton Date: Tue, 21 Mar 2023 12:37:35 +0000 Subject: python3-cryptography: use python3-unittest-automake-output Instead of using sed to reformat the output use this new module. This shows that the previous sed expression wasn't sufficient because it didn't handle tests throwing an error, and now the bench/ tests fail because we don't have pytest-benchmark. These tests are more of a benchmark than a unit test, so just skip them. Also show a skip message instead of nothing if the tests were skipped due to a lack of memory. (From OE-Core rev: f22b60676159f729c081ba62fba4642629daa914) Signed-off-by: Ross Burton Signed-off-by: Richard Purdie --- meta/recipes-devtools/python/python3-cryptography/run-ptest | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'meta/recipes-devtools/python/python3-cryptography/run-ptest') diff --git a/meta/recipes-devtools/python/python3-cryptography/run-ptest b/meta/recipes-devtools/python/python3-cryptography/run-ptest index 3089df8781..fe191a5dc4 100644 --- a/meta/recipes-devtools/python/python3-cryptography/run-ptest +++ b/meta/recipes-devtools/python/python3-cryptography/run-ptest @@ -1,4 +1,9 @@ #!/bin/sh + if ./check-memfree.py; then - 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}}' + # Skip the bench test module, we don't yet have pytest3-benchmark in core + # and these are more benchmarks than unit tests. + pytest --automake -k 'not bench' +else + echo "SKIP: crytography.not_enough_memory" fi -- cgit v1.2.3-54-g00ecf