Module: wine Branch: master Commit: 6f5a0a3a81dc3fc67151c6cbf1a99ec09a7db860 URL: http://source.winehq.org/git/wine.git/?a=commit;h=6f5a0a3a81dc3fc67151c6cbf1...
Author: Francois Gouget fgouget@free.fr Date: Tue Sep 28 20:10:46 2010 +0200
winetest: Add the '-n' option so one can specify a list of tests to exclude.
---
programs/winetest/main.c | 13 +++++++++---- 1 files changed, 9 insertions(+), 4 deletions(-)
diff --git a/programs/winetest/main.c b/programs/winetest/main.c index 520b49e..a680af3 100644 --- a/programs/winetest/main.c +++ b/programs/winetest/main.c @@ -60,6 +60,7 @@ static char build_id[64]; /* filters for running only specific tests */ static char *filters[64]; static unsigned int nb_filters = 0; +static BOOL exclude_tests = FALSE;
/* Needed to check for .NET dlls */ static HMODULE hmscoree; @@ -86,17 +87,17 @@ static BOOL test_filtered_out( LPCSTR module, LPCSTR testname ) if (p) *p = 0; len = strlen(dllname);
- if (!nb_filters) return FALSE; + if (!nb_filters) return exclude_tests; for (i = 0; i < nb_filters; i++) { if (!strncmp( dllname, filters[i], len )) { - if (!filters[i][len]) return FALSE; + if (!filters[i][len]) return exclude_tests; if (filters[i][len] != ':') continue; - if (!testname || !strcmp( testname, &filters[i][len+1] )) return FALSE; + if (!testname || !strcmp( testname, &filters[i][len+1] )) return exclude_tests; } } - return TRUE; + return !exclude_tests; }
static char * get_file_version(char * file_name) @@ -1004,6 +1005,7 @@ usage (void) " -e preserve the environment\n" " -h print this message and exit\n" " -m MAIL an email address to enable developers to contact you\n" +" -n exclude the specified tests\n" " -p shutdown when the tests are done\n" " -q quiet mode, no output at all\n" " -o FILE put report into FILE, do not submit\n" @@ -1061,6 +1063,9 @@ int main( int argc, char *argv[] ) exit( 2 ); } break; + case 'n': + exclude_tests = TRUE; + break; case 'p': poweroff = 1; break;