public inbox for isar-users@googlegroups.com
 help / color / mirror / Atom feed
From: Uladzimir Bely <ubely@ilbers.de>
To: srinuvasan.a@siemens.com, isar-users@googlegroups.com
Subject: Re: [PATCH] testsuite/cibuilder: append stdout and stderr to log file
Date: Tue, 08 Apr 2025 16:56:15 +0300	[thread overview]
Message-ID: <d5c9f99bf091df2d72e2a0e1ca5940ae4f6dd9bc.camel@ilbers.de> (raw)
In-Reply-To: <20250404095239.2544147-1-srinuvasan.a@siemens.com>

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.

  reply	other threads:[~2025-04-08 13:56 UTC|newest]

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

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=d5c9f99bf091df2d72e2a0e1ca5940ae4f6dd9bc.camel@ilbers.de \
    --to=ubely@ilbers.de \
    --cc=isar-users@googlegroups.com \
    --cc=srinuvasan.a@siemens.com \
    /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