Jacek Caban : conhost/tests: Silence debug output in child process if std output is a console.

Alexandre Julliard julliard at winehq.org
Thu Nov 12 15:17:45 CST 2020


Module: wine
Branch: master
Commit: 87a9d790abc95e6479af97aff7e88df240fb7e70
URL:    https://source.winehq.org/git/wine.git/?a=commit;h=87a9d790abc95e6479af97aff7e88df240fb7e70

Author: Jacek Caban <jacek at codeweavers.com>
Date:   Thu Nov 12 19:56:11 2020 +0100

conhost/tests: Silence debug output in child process if std output is a console.

Signed-off-by: Jacek Caban <jacek at codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>

---

 programs/conhost/tests/tty.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/programs/conhost/tests/tty.c b/programs/conhost/tests/tty.c
index 4eb85a17a01..9b1ab77dc0b 100644
--- a/programs/conhost/tests/tty.c
+++ b/programs/conhost/tests/tty.c
@@ -1402,7 +1402,11 @@ START_TEST(tty)
     if (argc > 3)
     {
         HANDLE pipe;
+        DWORD mode;
         sscanf(argv[3], "%p", &pipe);
+        /* if std output is console, silence debug output so it does not interfere with tests */
+        if (GetConsoleMode(GetStdHandle(STD_OUTPUT_HANDLE), &mode))
+            winetest_debug = 0;
         child_process(pipe);
         return;
     }




More information about the wine-cvs mailing list