Skip to contentSkip to conversation

strace: show test suite log on failure

PATCH Superseded Ross Burton 3 participants 3 messages Oct 21, 2021 – Oct 22, 2021

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 strace: show test suite log on failure

If the tests fail, dump the log so we can see the failures.

---
 meta/recipes-devtools/strace/strace/run-ptest | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
meta/recipes-devtools/strace/strace/run-ptest +1 -1
index 3a51fb0be9..42ececdc4f 100755
@@ -3,4 +3,4 @@ export TIMEOUT_DURATION=240
 chown nobody tests
 chown nobody tests/*
 chown nobody ../ptest
-su nobody -c "make -B -C tests -k test-suite.log"
+su nobody -c "make -B -C tests -k test-suite.log" || cat tests/test-suite.log
Signature · 1 line
2.25.1
#1 lore raw

I'm not familiar enough with the ptest-runner to say, but does the exit code of run-ptest get used at all, or only the output in the expected format? Just noticed this will suppress the non-zero exit code of run-ptest.

Quoted 34 lines · Ross Burton

If the tests fail, dump the log so we can see the failures.

---
 meta/recipes-devtools/strace/strace/run-ptest | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
meta/recipes-devtools/strace/strace/run-ptest +1 -1
index 3a51fb0be9..42ececdc4f 100755
@@ -3,4 +3,4 @@ export TIMEOUT_DURATION=240
 chown nobody tests
 chown nobody tests/*
 chown nobody ../ptest
-su nobody -c "make -B -C tests -k test-suite.log"
+su nobody -c "make -B -C tests -k test-suite.log" || cat

tests/test-suite.log
--
2.25.1

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group. View/Reply Online (#157284):
https://lists.openembedded.org/g/openembedded-core/message/157284
Mute This Topic: https://lists.openembedded.org/mt/86490861/3617123
Group Owner: [email protected]
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub [ [email protected]]
-=-=-=-=-=-=-=-=-=-=-=-

Signature · 4 lines
Christopher Larson
kergoth at gmail dot com
Founder - BitBake, OpenEmbedded, OpenZaurus
Senior Software Engineer, Mentor Graphics
#2 lore raw

You're right, it will.

I'm on a roll this week. :/

Ross

Quoted 41 lines · Christopher Larson

I'm not familiar enough with the ptest-runner to say, but does the exit code of run-ptest get used at all, or only the output in the expected format? Just noticed this will suppress the non-zero exit code of run-ptest.

Quoted 22 lines · Ross Burton

If the tests fail, dump the log so we can see the failures.

---
 meta/recipes-devtools/strace/strace/run-ptest | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
meta/recipes-devtools/strace/strace/run-ptest +1 -2
index 3a51fb0be9..42ececdc4f 100755
@@ -3,4 +3,4 @@ export TIMEOUT_DURATION=240
 chown nobody tests
 chown nobody tests/*
 chown nobody ../ptest
-su nobody -c "make -B -C tests -k test-suite.log"
+su nobody -c "make -B -C tests -k test-suite.log" || cat tests/test-suite.log
--

2.25.1

Quoted 8 lines

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#157284): https://lists.openembedded.org/g/openembedded-core/message/157284
Mute This Topic: https://lists.openembedded.org/mt/86490861/3617123
Group Owner: [email protected]
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub [[email protected]]
-=-=-=-=-=-=-=-=-=-=-=-

--
Christopher Larson
kergoth at gmail dot com
Founder - BitBake, OpenEmbedded, OpenZaurus
Senior Software Engineer, Mentor Graphics