* [PATCH] test-runner: special case python3 verbose option
@ 2019-11-05 23:36 James Prestwood
2019-11-06 21:16 ` Denis Kenzior
0 siblings, 1 reply; 2+ messages in thread
From: James Prestwood @ 2019-11-05 23:36 UTC (permalink / raw)
To: iwd
[-- Attachment #1: Type: text/plain, Size: 1750 bytes --]
Historically if you wanted to see output from a python test you needed
to specify -v pytests. This was also the case if IWD was started from
python.
Nearly every time I run test-runner I would specify "-v iwd,pytests"
only to get the IWD output on these specific tests.
Instead we can special case 'python3' (previously 'pytests') inside
execute_program so that turning on verbosity for 'iwd' also turns it
on for the python tests.
---
tools/test-runner.c | 16 ++++++++++------
1 file changed, 10 insertions(+), 6 deletions(-)
diff --git a/tools/test-runner.c b/tools/test-runner.c
index a83e1252..00989391 100644
--- a/tools/test-runner.c
+++ b/tools/test-runner.c
@@ -541,13 +541,17 @@ static pid_t execute_program(char *argv[], char *envp[], bool wait,
return -1;
/*
- * We have to special case this. execute_program automatically logs to
- * <process>.log, which would put all iwd output into valgrind.log
- * rather than iwd.log. Since we are explicitly having valgrind output
- * to a log file we can assume any output from this is only IWD, and not
- * valgrind.
+ * We have a few special cases here:
+ *
+ * Since execute_program automatically logs to <process>.log this would
+ * put all iwd output into valgrind.log rather than iwd.log. Since we
+ * are explicitly having valgrind output to a log file we can assume any
+ * output from this is only IWD, and not valgrind.
+ *
+ * python3 is special cased so that tests which start IWD manually can
+ * still show IWD output when using -v iwd.
*/
- if (!strcmp(log_name, "valgrind"))
+ if (!strcmp(log_name, "valgrind") || !strcmp(log_name, "python3"))
log_name = "iwd";
str = l_strjoinv(argv, ' ');
--
2.17.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] test-runner: special case python3 verbose option
2019-11-05 23:36 [PATCH] test-runner: special case python3 verbose option James Prestwood
@ 2019-11-06 21:16 ` Denis Kenzior
0 siblings, 0 replies; 2+ messages in thread
From: Denis Kenzior @ 2019-11-06 21:16 UTC (permalink / raw)
To: iwd
[-- Attachment #1: Type: text/plain, Size: 673 bytes --]
Hi James,
On 11/5/19 5:36 PM, James Prestwood wrote:
> Historically if you wanted to see output from a python test you needed
> to specify -v pytests. This was also the case if IWD was started from
> python.
>
> Nearly every time I run test-runner I would specify "-v iwd,pytests"
> only to get the IWD output on these specific tests.
>
> Instead we can special case 'python3' (previously 'pytests') inside
> execute_program so that turning on verbosity for 'iwd' also turns it
> on for the python tests.
> ---
> tools/test-runner.c | 16 ++++++++++------
> 1 file changed, 10 insertions(+), 6 deletions(-)
>
Applied, thanks.
Regards,
-Denis
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2019-11-06 21:16 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-11-05 23:36 [PATCH] test-runner: special case python3 verbose option James Prestwood
2019-11-06 21:16 ` Denis Kenzior
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.