summaryrefslogtreecommitdiffstats
path: root/meta-python/recipes-devtools/python/python3-cbor2
diff options
context:
space:
mode:
authorGyorgy Sarvari <skandigraun@gmail.com>2026-04-13 16:42:35 +0200
committerGyorgy Sarvari <skandigraun@gmail.com>2026-04-13 16:46:40 +0200
commit5fcddafe237015a0bf9852dcf013b17fb3c6df2b (patch)
tree6e1fc33d9c5ca5321cac7f23638f3b1c49e2ca89 /meta-python/recipes-devtools/python/python3-cbor2
parent66bb701b2e3fcc261a21c00051721fd99380c1ed (diff)
downloadmeta-openembedded-5fcddafe237015a0bf9852dcf013b17fb3c6df2b.tar.gz
python3-cbor2: return correct error code from run-ptest
In case the test fails to even start executing, and there is no output on stdout, there are no logs stored of the test run, so the test log parser will not report a failure. Also, since the run-ptest command is a piped script, by default the last command's return code is set as the exit code, which is always 0. To report the result correctly return the test executions's return code as the exit code (instead of the last command in the pipe), and redirect the error output to standard out, to create a logfile that can be parsed after the execution. Signed-off-by: Gyorgy Sarvari <skandigraun@gmail.com>
Diffstat (limited to 'meta-python/recipes-devtools/python/python3-cbor2')
-rw-r--r--meta-python/recipes-devtools/python/python3-cbor2/run-ptest3
1 files changed, 2 insertions, 1 deletions
diff --git a/meta-python/recipes-devtools/python/python3-cbor2/run-ptest b/meta-python/recipes-devtools/python/python3-cbor2/run-ptest
index b63c4de0d9..c951b418c5 100644
--- a/meta-python/recipes-devtools/python/python3-cbor2/run-ptest
+++ b/meta-python/recipes-devtools/python/python3-cbor2/run-ptest
@@ -1,3 +1,4 @@
1#!/bin/sh 1#!/bin/sh
2 2
3pytest -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}}' 3pytest -o log_cli=true -o log_cli_level=INFO 2>&1 | 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}}'
4exit ${PIPESTATUS[0]}