[Patchew-devel] [PATCH] patchew-cli: run test scripts in a TTY

Paolo Bonzini posted 1 patch 5 years, 4 months ago
patchew-cli | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
[Patchew-devel] [PATCH] patchew-cli: run test scripts in a TTY
Posted by Paolo Bonzini 5 years, 4 months ago
This allows tests to show progress, colorize output, etc.

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
---
 patchew-cli | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/patchew-cli b/patchew-cli
index b5d6ecb..02cbf36 100755
--- a/patchew-cli
+++ b/patchew-cli
@@ -529,8 +529,8 @@ class TesterCommand(SubCommand):
             logf.write("=== OUTPUT BEGIN ===\n")
             logf.flush()
             start_time = time.time()
-            tp = subprocess.Popen([test_script], cwd=clone,
-                                  stdout=logf, stderr=logf)
+            tp = subprocess.Popen(["/usr/bin/script", "-qefc", test_script, "/dev/null"],
+                                  cwd=clone, stdout=logf, stderr=logf)
             rc = None
             timeout = r["test"]["timeout"]
             while timeout <= 0 or time.time() - start_time < timeout:
-- 
2.19.1

_______________________________________________
Patchew-devel mailing list
Patchew-devel@redhat.com
https://www.redhat.com/mailman/listinfo/patchew-devel
Re: [Patchew-devel] [PATCH] patchew-cli: run test scripts in a TTY
Posted by Caio Carrara 5 years, 4 months ago
On Fri, Nov 30, 2018 at 12:29:27AM +0100, Paolo Bonzini wrote:
> This allows tests to show progress, colorize output, etc.
> 
> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>

Reviewed-by: Caio Carrara <ccarrara@redhat.com>

> ---
>  patchew-cli | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/patchew-cli b/patchew-cli
> index b5d6ecb..02cbf36 100755
> --- a/patchew-cli
> +++ b/patchew-cli
> @@ -529,8 +529,8 @@ class TesterCommand(SubCommand):
>              logf.write("=== OUTPUT BEGIN ===\n")
>              logf.flush()
>              start_time = time.time()
> -            tp = subprocess.Popen([test_script], cwd=clone,
> -                                  stdout=logf, stderr=logf)
> +            tp = subprocess.Popen(["/usr/bin/script", "-qefc", test_script, "/dev/null"],
> +                                  cwd=clone, stdout=logf, stderr=logf)
>              rc = None
>              timeout = r["test"]["timeout"]
>              while timeout <= 0 or time.time() - start_time < timeout:
> -- 
> 2.19.1
> 
> _______________________________________________
> Patchew-devel mailing list
> Patchew-devel@redhat.com
> https://www.redhat.com/mailman/listinfo/patchew-devel

-- 
Caio Carrara
Software Engineer, Virt Team - Red Hat
ccarrara@redhat.com

_______________________________________________
Patchew-devel mailing list
Patchew-devel@redhat.com
https://www.redhat.com/mailman/listinfo/patchew-devel