From: Yuxuan Shui yshui@codeweavers.com
--- programs/winetest/main.c | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-)
diff --git a/programs/winetest/main.c b/programs/winetest/main.c index 673bbc11504..cd5885b51eb 100644 --- a/programs/winetest/main.c +++ b/programs/winetest/main.c @@ -68,6 +68,7 @@ static char build_id[64]; static BOOL is_wow64; static int failures; static int quiet_mode; +static int timeout_ms = 120000; static HANDLE logfile; static HANDLE junit;
@@ -1072,7 +1073,7 @@ run_test (struct wine_test* test, const char* subtest, HANDLE out_file, const ch /* Flush to disk so we know which test caused Windows to crash if it does */ FlushFileBuffers(out_file);
- status = run_ex( cmd, tmpfile, tempdir, 120000, FALSE, &pid ); + status = run_ex( cmd, tmpfile, tempdir, timeout_ms, FALSE, &pid ); if (status == -2 && GetLastError()) status = -GetLastError(); free(cmd);
@@ -1524,6 +1525,7 @@ usage (void) " -S URL URL to submit the results to\n" " -t TAG include TAG of characters [-.0-9a-zA-Z] in the report\n" " -u URL include TestBot URL in the report\n" +" -w MSECS how many milliseconds to wait for each test to finish (default: 120000)\n" " -x DIR Extract tests to DIR (default: .\wct) and exit\n"); }
@@ -1584,6 +1586,13 @@ int __cdecl main( int argc, char *argv[] ) exit( 2 ); } break; + case 'w': + if (!argv[++i] || !(timeout_ms = atoi( argv[i] ))) + { + usage(); + exit( 2 ); + } + break; case 'J': if (!(path = argv[++i])) {