Commit 2da7e5de authored by Francois Gouget's avatar Francois Gouget Committed by Alexandre Julliard

winetest: Send the tests output to stdout when given "-o -".

This makes it easier to use WineTest with tools that capture stdout, such as the TestBot. Signed-off-by: 's avatarFrancois Gouget <fgouget@codeweavers.com> Signed-off-by: 's avatarAlexandre Julliard <julliard@winehq.org>
parent 535da775
......@@ -1051,7 +1051,8 @@ run_tests (char *logname, char *outdir)
sa.lpSecurityDescriptor = NULL;
sa.bInheritHandle = TRUE;
logfile = CreateFileA( logname, GENERIC_READ|GENERIC_WRITE,
logfile = strcmp(logname, "-") == 0 ? GetStdHandle( STD_OUTPUT_HANDLE ) :
CreateFileA( logname, GENERIC_READ|GENERIC_WRITE,
FILE_SHARE_READ | FILE_SHARE_WRITE | FILE_SHARE_DELETE,
&sa, CREATE_ALWAYS, 0, NULL );
......@@ -1175,7 +1176,7 @@ run_tests (char *logname, char *outdir)
report (R_DELTA, 0, "Running: Done");
report (R_STATUS, "Cleaning up - %u failures", failures);
CloseHandle( logfile );
if (strcmp(logname, "-") != 0) CloseHandle( logfile );
logfile = 0;
if (newdir)
remove_dir (tempdir);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment