Module: wine
Branch: master
Commit: 7bc46c15ef4ebbc71609588142ccdce11cb6762a
URL: http://source.winehq.org/git/wine.git/?a=commit;h=7bc46c15ef4ebbc7160958814…
Author: Francois Gouget <fgouget(a)codeweavers.com>
Date: Wed Feb 8 14:12:07 2017 +0100
winetest: Flush the report file to disk between each test.
Should Windows crash, this makes it easier to know which test is
responsible.
Signed-off-by: Francois Gouget <fgouget(a)codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard(a)winehq.org>
---
programs/winetest/main.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/programs/winetest/main.c b/programs/winetest/main.c
index 1eb49b6..48b71c5 100644
--- a/programs/winetest/main.c
+++ b/programs/winetest/main.c
@@ -626,6 +626,10 @@ run_ex (char *cmd, HANDLE out_file, const char *tempdir, DWORD ms)
PROCESS_INFORMATION pi;
DWORD wait, status;
+ /* Flush to disk so we know which test caused Windows to crash if it does */
+ if (out_file)
+ FlushFileBuffers(out_file);
+
GetStartupInfoA (&si);
si.dwFlags = STARTF_USESTDHANDLES;
si.hStdInput = GetStdHandle( STD_INPUT_HANDLE );