Adding support for xxx_test.exe all
Francois Gouget
fgouget at free.fr
Fri Nov 29 23:19:05 CST 2002
When running the tests on Windows you can either do 'xxx_test.exe' which
gives you a list of the available tests for this executable, or
'xxx_test.exe foo' which runs test foo, and only test foo.
So I propose the following patch which makes it possible to run
'xxx_test.exe all' which runs all the tests implemented by that
executable.
Do others find this patch acceptable? Useful?
Index: include/wine/test.h
===================================================================
RCS file: /home/wine/wine/include/wine/test.h,v
retrieving revision 1.7
diff -u -r1.7 test.h
--- include/wine/test.h 30 Oct 2002 20:36:21 -0000 1.7
+++ include/wine/test.h 30 Nov 2002 04:46:23 -0000
@@ -319,7 +319,23 @@
if ((p = getenv( "WINETEST_REPORT_SUCCESS"))) report_success =
atoi(p);
if (!argv[1]) usage( argv[0] );
- return run_test(argv[1]);
+ if (strcmp(argv[1], "all") == 0)
+ {
+ const struct test* test;
+ int status=0;
+
+ for (test = winetest_testlist; test->name; test++)
+ {
+ fprintf(stderr, "Testing %s\n", test->name);
+ status+=run_test(test->name);
+ fprintf(stderr, "\n");
+ }
+ return (status <= 255) ? status : 255;
+ }
+ else
+ {
+ return run_test(argv[1]);
+ }
}
#endif /* WINETEST_WANT_MAIN */
--
Francois Gouget fgouget at free.fr http://fgouget.free.fr/
tcA thgirypoC muinelliM latigiD eht detaloiv tsuj evah uoY
More information about the wine-devel
mailing list