diff mbox series

[meta-oe,3/6] tbb: fix run-ptest with busybox sed

Message ID 20260912235456.2358617-3-khem.raj@oss.qualcomm.com
State New
Headers show
Series [meta-oe,1/6] openjpeg: fix run-ptest with busybox sed | expand

Commit Message

Khem Raj Sept. 12, 2026, 11:54 p.m. UTC
run-ptest piped ctest output through 'sed -u', which busybox sed does
not support, so the pipeline produced no output and the ptest image
reported "ptests which had no test results: ['tbb']".

Drop sed and classify ctest result lines in awk directly. This also
maps Timeout/Exception/Not Run results to FAIL; previously they were
printed as e.g. "Exception:: <name>" and ignored by the ptest parser.

Signed-off-by: Khem Raj <khem.raj@oss.qualcomm.com>
---
 meta-oe/recipes-support/tbb/files/run-ptest | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)
diff mbox series

Patch

diff --git a/meta-oe/recipes-support/tbb/files/run-ptest b/meta-oe/recipes-support/tbb/files/run-ptest
index da46c68550..0d11413201 100755
--- a/meta-oe/recipes-support/tbb/files/run-ptest
+++ b/meta-oe/recipes-support/tbb/files/run-ptest
@@ -1,3 +1,10 @@ 
 #!/bin/sh
 
-ctest | sed -u 's/\*\*\*/   /g' | awk '/Test +#/{gsub(/Passed/,"PASS"); gsub(/Failed/,"FAIL"); gsub(/Skipped/,"SKIP"); print $6": "$4; fflush();}'
+# ctest result lines look like: "  1/142 Test   #1: test_tick_count .....   Passed    0.01 sec"
+# anything other than Passed/Skipped/Disabled (Failed, Timeout, Exception, Not Run) is a FAIL
+ctest | awk '/Test +#[0-9]+:/ {
+    if ($0 ~ /Passed/) res = "PASS"
+    else if ($0 ~ /Skipped|Disabled/) res = "SKIP"
+    else res = "FAIL"
+    print res ": " $4; fflush()
+}'