* [PATCH] testsuite/cibuilder: append stdout and stderr to log file
@ 2025-04-04 9:52 srinuvasan.a via isar-users
2025-04-08 13:56 ` Uladzimir Bely
0 siblings, 1 reply; 3+ messages in thread
From: srinuvasan.a via isar-users @ 2025-04-04 9:52 UTC (permalink / raw)
To: isar-users; +Cc: ubely, srinuvasan
From: srinuvasan <srinuvasan.a@siemens.com>
With these changes, users can see their output of running
commands or set of commands in the launched qemu system.
This would be really helpful to see the actual output
of remotely running programs.
Signed-off-by: srinuvasan <srinuvasan.a@siemens.com>
---
testsuite/cibuilder.py | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/testsuite/cibuilder.py b/testsuite/cibuilder.py
index e726ba87..c5ce7fc8 100755
--- a/testsuite/cibuilder.py
+++ b/testsuite/cibuilder.py
@@ -738,6 +738,12 @@ class CIBuilder(Test):
self.log.info(f"Connect command:\n{cmd_prefix}")
rc, stdout, stderr = self.remote_run(cmd, script, timeout)
+
+ stdout = stdout.decode('utf-8') if isinstance(stdout, bytes) else stdout
+ stderr = stderr.decode('utf-8') if isinstance(stderr, bytes) else stderr
+ self.log.info("stdout log:\n" + stdout)
+ self.log.info("stderr log:\n" + stderr)
+
if rc != 0:
if not keep:
self.vm_turn_off(vm)
--
2.39.5
--
You received this message because you are subscribed to the Google Groups "isar-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to isar-users+unsubscribe@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/isar-users/20250404095239.2544147-1-srinuvasan.a%40siemens.com.
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] testsuite/cibuilder: append stdout and stderr to log file
2025-04-04 9:52 [PATCH] testsuite/cibuilder: append stdout and stderr to log file srinuvasan.a via isar-users
@ 2025-04-08 13:56 ` Uladzimir Bely
2025-04-09 6:10 ` [PATCH v2] " srinuvasan.a via isar-users
0 siblings, 1 reply; 3+ messages in thread
From: Uladzimir Bely @ 2025-04-08 13:56 UTC (permalink / raw)
To: srinuvasan.a, isar-users
On Fri, 2025-04-04 at 15:22 +0530, srinuvasan.a@siemens.com wrote:
> From: srinuvasan <srinuvasan.a@siemens.com>
>
> With these changes, users can see their output of running
> commands or set of commands in the launched qemu system.
>
> This would be really helpful to see the actual output
> of remotely running programs.
>
> Signed-off-by: srinuvasan <srinuvasan.a@siemens.com>
> ---
> testsuite/cibuilder.py | 6 ++++++
> 1 file changed, 6 insertions(+)
>
> diff --git a/testsuite/cibuilder.py b/testsuite/cibuilder.py
> index e726ba87..c5ce7fc8 100755
> --- a/testsuite/cibuilder.py
> +++ b/testsuite/cibuilder.py
> @@ -738,6 +738,12 @@ class CIBuilder(Test):
> self.log.info(f"Connect command:\n{cmd_prefix}")
>
> rc, stdout, stderr = self.remote_run(cmd, script,
> timeout)
> +
> + stdout = stdout.decode('utf-8') if isinstance(stdout,
> bytes) else stdout
> + stderr = stderr.decode('utf-8') if isinstance(stderr,
> bytes) else stderr
It would be better to use different variable to append to avocado log
since existing tests in downstream may expect data (stdout, stdeorr) of
original (bytes) type and use .decode() by their own.
> + self.log.info("stdout log:\n" + stdout)
> + self.log.info("stderr log:\n" + stderr)
> +
> if rc != 0:
> if not keep:
> self.vm_turn_off(vm)
--
Best regards,
Uladzimir.
--
You received this message because you are subscribed to the Google Groups "isar-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to isar-users+unsubscribe@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/isar-users/d5c9f99bf091df2d72e2a0e1ca5940ae4f6dd9bc.camel%40ilbers.de.
^ permalink raw reply [flat|nested] 3+ messages in thread
* [PATCH v2] testsuite/cibuilder: append stdout and stderr to log file
2025-04-08 13:56 ` Uladzimir Bely
@ 2025-04-09 6:10 ` srinuvasan.a via isar-users
0 siblings, 0 replies; 3+ messages in thread
From: srinuvasan.a via isar-users @ 2025-04-09 6:10 UTC (permalink / raw)
To: isar-users; +Cc: ubely, srinuvasan
From: srinuvasan <srinuvasan.a@siemens.com>
With these changes, users can see their output of running
commands or set of commands in the launched qemu system.
This would be really helpful to see the actual output
of remotely running programs.
Signed-off-by: srinuvasan <srinuvasan.a@siemens.com>
---
testsuite/cibuilder.py | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/testsuite/cibuilder.py b/testsuite/cibuilder.py
index e726ba87..88bf9b8e 100755
--- a/testsuite/cibuilder.py
+++ b/testsuite/cibuilder.py
@@ -738,6 +738,12 @@ class CIBuilder(Test):
self.log.info(f"Connect command:\n{cmd_prefix}")
rc, stdout, stderr = self.remote_run(cmd, script, timeout)
+
+ standard_output = stdout.decode('utf-8') if isinstance(stdout, bytes) else stdout
+ standard_error = stderr.decode('utf-8') if isinstance(stderr, bytes) else stderr
+ self.log.info("standard output log:\n" + standard_output)
+ self.log.info("standard error log:\n" + standard_error)
+
if rc != 0:
if not keep:
self.vm_turn_off(vm)
--
2.34.1
--
You received this message because you are subscribed to the Google Groups "isar-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to isar-users+unsubscribe@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/isar-users/20250409061017.2639760-1-srinuvasan.a%40siemens.com.
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2025-04-09 6:09 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2025-04-04 9:52 [PATCH] testsuite/cibuilder: append stdout and stderr to log file srinuvasan.a via isar-users
2025-04-08 13:56 ` Uladzimir Bely
2025-04-09 6:10 ` [PATCH v2] " srinuvasan.a via isar-users
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox