Direct the output of the tests to stdout so that Win98 can redirect
the output to a file.
This commit is contained in:
parent
bf25cefe7f
commit
2ff48996a0
|
@ -119,7 +119,7 @@ static tls_data* get_tls_data(void)
|
||||||
|
|
||||||
static void exit_process( int code )
|
static void exit_process( int code )
|
||||||
{
|
{
|
||||||
fflush( stderr );
|
fflush( stdout );
|
||||||
ExitProcess( code );
|
ExitProcess( code );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -156,16 +156,16 @@ int winetest_ok( int condition, const char *msg, ... )
|
||||||
{
|
{
|
||||||
if (condition)
|
if (condition)
|
||||||
{
|
{
|
||||||
fprintf( stderr, "%s:%d: Test succeeded inside todo block",
|
fprintf( stdout, "%s:%d: Test succeeded inside todo block",
|
||||||
data->current_file, data->current_line );
|
data->current_file, data->current_line );
|
||||||
if (msg && msg[0])
|
if (msg && msg[0])
|
||||||
{
|
{
|
||||||
va_start(valist, msg);
|
va_start(valist, msg);
|
||||||
fprintf(stderr,": ");
|
fprintf(stdout,": ");
|
||||||
vfprintf(stderr, msg, valist);
|
vfprintf(stdout, msg, valist);
|
||||||
va_end(valist);
|
va_end(valist);
|
||||||
}
|
}
|
||||||
fputc( '\n', stderr );
|
fputc( '\n', stdout );
|
||||||
InterlockedIncrement(&todo_failures);
|
InterlockedIncrement(&todo_failures);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
@ -175,23 +175,23 @@ int winetest_ok( int condition, const char *msg, ... )
|
||||||
{
|
{
|
||||||
if (!condition)
|
if (!condition)
|
||||||
{
|
{
|
||||||
fprintf( stderr, "%s:%d: Test failed",
|
fprintf( stdout, "%s:%d: Test failed",
|
||||||
data->current_file, data->current_line );
|
data->current_file, data->current_line );
|
||||||
if (msg && msg[0])
|
if (msg && msg[0])
|
||||||
{
|
{
|
||||||
va_start(valist, msg);
|
va_start(valist, msg);
|
||||||
fprintf( stderr,": ");
|
fprintf( stdout,": ");
|
||||||
vfprintf(stderr, msg, valist);
|
vfprintf(stdout, msg, valist);
|
||||||
va_end(valist);
|
va_end(valist);
|
||||||
}
|
}
|
||||||
fputc( '\n', stderr );
|
fputc( '\n', stdout );
|
||||||
InterlockedIncrement(&failures);
|
InterlockedIncrement(&failures);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
if (report_success)
|
if (report_success)
|
||||||
fprintf( stderr, "%s:%d: Test succeeded\n",
|
fprintf( stdout, "%s:%d: Test succeeded\n",
|
||||||
data->current_file, data->current_line);
|
data->current_file, data->current_line);
|
||||||
InterlockedIncrement(&successes);
|
InterlockedIncrement(&successes);
|
||||||
}
|
}
|
||||||
|
@ -206,9 +206,9 @@ void winetest_trace( const char *msg, ... )
|
||||||
|
|
||||||
if (winetest_debug > 0)
|
if (winetest_debug > 0)
|
||||||
{
|
{
|
||||||
fprintf( stderr, "%s:%d:", data->current_file, data->current_line );
|
fprintf( stdout, "%s:%d:", data->current_file, data->current_line );
|
||||||
va_start(valist, msg);
|
va_start(valist, msg);
|
||||||
vfprintf(stderr, msg, valist);
|
vfprintf(stdout, msg, valist);
|
||||||
va_end(valist);
|
va_end(valist);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -272,7 +272,7 @@ static int run_test( const char *name )
|
||||||
|
|
||||||
if (!(test = find_test( name )))
|
if (!(test = find_test( name )))
|
||||||
{
|
{
|
||||||
fprintf( stderr, "Fatal: test '%s' does not exist.\n", name );
|
fprintf( stdout, "Fatal: test '%s' does not exist.\n", name );
|
||||||
exit_process(1);
|
exit_process(1);
|
||||||
}
|
}
|
||||||
successes = failures = todo_successes = todo_failures = 0;
|
successes = failures = todo_successes = todo_failures = 0;
|
||||||
|
@ -282,7 +282,7 @@ static int run_test( const char *name )
|
||||||
|
|
||||||
if (winetest_debug)
|
if (winetest_debug)
|
||||||
{
|
{
|
||||||
fprintf( stderr, "%s: %ld tests executed, %ld marked as todo, %ld %s.\n",
|
fprintf( stdout, "%s: %ld tests executed, %ld marked as todo, %ld %s.\n",
|
||||||
name, successes + failures + todo_successes + todo_failures,
|
name, successes + failures + todo_successes + todo_failures,
|
||||||
todo_successes, failures + todo_failures,
|
todo_successes, failures + todo_failures,
|
||||||
(failures + todo_failures != 1) ? "failures" : "failure" );
|
(failures + todo_failures != 1) ? "failures" : "failure" );
|
||||||
|
@ -297,9 +297,9 @@ static void usage( const char *argv0 )
|
||||||
{
|
{
|
||||||
const struct test *test;
|
const struct test *test;
|
||||||
|
|
||||||
fprintf( stderr, "Usage: %s test_name\n", argv0 );
|
fprintf( stdout, "Usage: %s test_name\n", argv0 );
|
||||||
fprintf( stderr, "\nValid test names:\n" );
|
fprintf( stdout, "\nValid test names:\n" );
|
||||||
for (test = winetest_testlist; test->name; test++) fprintf( stderr, " %s\n", test->name );
|
for (test = winetest_testlist; test->name; test++) fprintf( stdout, " %s\n", test->name );
|
||||||
exit_process(1);
|
exit_process(1);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue