All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/2] ptest-cargo: move run-ptest rc variable initialisation
@ 2025-08-28 12:05 Yoann Congal
  2025-08-28 12:05 ` [PATCH 2/2] rpm-sequoia: remove rc initialisation from run-ptest Yoann Congal
  2025-08-28 12:45 ` [PATCH 1/2] ptest-cargo: move run-ptest rc variable initialisation Gyorgy Sarvari
  0 siblings, 2 replies; 5+ messages in thread
From: Yoann Congal @ 2025-08-28 12:05 UTC (permalink / raw)
  To: openembedded-core; +Cc: Yoann Congal, Gyorgy Sarvari

From: Yoann Congal <yoann.congal@smile.fr>

ptest-cargo run-ptest can be generated in two fashions: generated from
scratch or appended to an exiting run-ptest file. The rc variable used
to track tests failure was only initialized in "generated from scratch"
case. Which lead to errors in the "appended" case.

Move the rc variable initialisation to the common code of both case to
fix this problem.

Signed-off-by: Yoann Congal <yoann.congal@smile.fr>
Cc: Gyorgy Sarvari <skandigraun@gmail.com>
---
 meta/classes-recipe/ptest-cargo.bbclass | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/meta/classes-recipe/ptest-cargo.bbclass b/meta/classes-recipe/ptest-cargo.bbclass
index ece25ff1eb..e35de1042e 100644
--- a/meta/classes-recipe/ptest-cargo.bbclass
+++ b/meta/classes-recipe/ptest-cargo.bbclass
@@ -103,10 +103,10 @@ python do_install_ptest_cargo() {
     with open(ptest_script, "a") as f:
         if not script_exists:
             f.write("#!/bin/sh\n")
-            f.write("rc=0\n")                
         else:
             f.write(f"\necho \"\"\n")
             f.write(f"echo \"## starting to run rust tests ##\"\n")               
+        f.write("rc=0\n")
         for test_path in test_paths:
             script = textwrap.dedent(f"""\
                 if ! {test_path} {rust_test_args}


^ permalink raw reply related	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2025-08-28 15:37 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-08-28 12:05 [PATCH 1/2] ptest-cargo: move run-ptest rc variable initialisation Yoann Congal
2025-08-28 12:05 ` [PATCH 2/2] rpm-sequoia: remove rc initialisation from run-ptest Yoann Congal
2025-08-28 12:45 ` [PATCH 1/2] ptest-cargo: move run-ptest rc variable initialisation Gyorgy Sarvari
2025-08-28 14:01   ` Yoann Congal
2025-08-28 15:37     ` Gyorgy Sarvari

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.