On Tue, 2020-05-12 at 22:23 +0800, zangrc wrote: > Signed-off-by: Zang Ruochen <[email protected]> > --- > .../recipes-devtools/python/python3-parse-type/run-ptest | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/meta-python/recipes-devtools/python/python3-parse-type/run-ptest > b/meta-python/recipes-devtools/python/python3-parse-type/run-ptest > index 5cec71169..b63c4de0d 100644 > --- a/meta-python/recipes-devtools/python/python3-parse-type/run-ptest > +++ b/meta-python/recipes-devtools/python/python3-parse-type/run-ptest > @@ -1,3 +1,3 @@ > #!/bin/sh > > -pytest > +pytest -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}}'
Rather than doing this for every python module, it may be an idea to consider: a) teaching ptest runner how to handle the alternate output format (triggered by run-ptest-XXX instead of run-ptest) or b) adding a common python script which could avoid all this sed/awk magic and the extra dependencies or c) patch in a parameter to pytest which outputs the data in the format we need. Cheers, Richard
-=-=-=-=-=-=-=-=-=-=-=- Links: You receive all messages sent to this group. View/Reply Online (#84332): https://lists.openembedded.org/g/openembedded-devel/message/84332 Mute This Topic: https://lists.openembedded.org/mt/74153024/21656 Group Owner: [email protected] Unsubscribe: https://lists.openembedded.org/g/openembedded-devel/unsub [[email protected]] -=-=-=-=-=-=-=-=-=-=-=-
