public inbox for isar-users@googlegroups.com
 help / color / mirror / Atom feed
From: "srinuvasan.a via isar-users" <isar-users@googlegroups.com>
To: isar-users@googlegroups.com
Cc: ubely@ilbers.de, srinuvasan <srinuvasan.a@siemens.com>
Subject: [PATCH v2] testsuite/cibuilder: append stdout and stderr to log file
Date: Wed,  9 Apr 2025 11:40:17 +0530	[thread overview]
Message-ID: <20250409061017.2639760-1-srinuvasan.a@siemens.com> (raw)
In-Reply-To: <d5c9f99bf091df2d72e2a0e1ca5940ae4f6dd9bc.camel@ilbers.de>

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.

      reply	other threads:[~2025-04-09  6:09 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-04-04  9:52 [PATCH] " srinuvasan.a via isar-users
2025-04-08 13:56 ` Uladzimir Bely
2025-04-09  6:10   ` srinuvasan.a via isar-users [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20250409061017.2639760-1-srinuvasan.a@siemens.com \
    --to=isar-users@googlegroups.com \
    --cc=srinuvasan.a@siemens.com \
    --cc=ubely@ilbers.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox