Alexandre Julliard : winetest: Cowardly refuse to submit results that have too many failed tests.
Alexandre Julliard
julliard at winehq.org
Fri Apr 22 12:27:43 CDT 2011
Module: wine
Branch: master
Commit: 9f72d1959fe9b7a3469495c19ee30114488230a9
URL: http://source.winehq.org/git/wine.git/?a=commit;h=9f72d1959fe9b7a3469495c19ee30114488230a9
Author: Alexandre Julliard <julliard at winehq.org>
Date: Fri Apr 22 13:20:49 2011 +0200
winetest: Cowardly refuse to submit results that have too many failed tests.
---
programs/winetest/main.c | 13 ++++++++++++-
1 files changed, 12 insertions(+), 1 deletions(-)
diff --git a/programs/winetest/main.c b/programs/winetest/main.c
index 3316b44..376b542 100644
--- a/programs/winetest/main.c
+++ b/programs/winetest/main.c
@@ -40,6 +40,9 @@
/* Don't submit the results if more than SKIP_LIMIT tests have been skipped */
#define SKIP_LIMIT 10
+/* Don't submit the results if more than FAILURES_LIMIT tests have failed */
+#define FAILURES_LIMIT 50
+
struct wine_test
{
char *name;
@@ -62,6 +65,7 @@ static const char whitespace[] = " \t\r\n";
static const char testexe[] = "_test.exe";
static char build_id[64];
static BOOL is_wow64;
+static int failures;
/* filters for running only specific tests */
static char *filters[64];
@@ -705,6 +709,7 @@ run_test (struct wine_test* test, const char* subtest, HANDLE out_file, const ch
status = run_ex (cmd, out_file, tempdir, 120000);
heap_free (cmd);
xprintf ("%s:%s done (%d)\n", test->name, subtest, status);
+ if (status) failures++;
}
}
@@ -1316,7 +1321,13 @@ int main( int argc, char *argv[] )
DeleteFileA(logname);
exit (0);
}
- if (build_id[0] && nr_of_skips <= SKIP_LIMIT && !nr_native_dlls && !is_win9x &&
+ if (failures > FAILURES_LIMIT)
+ report( R_WARNING,
+ "%d tests failed, there's probably something broken with your setup.\n"
+ "You need to address this before submitting results.", failures );
+
+ if (build_id[0] && nr_of_skips <= SKIP_LIMIT && failures <= FAILURES_LIMIT &&
+ !nr_native_dlls && !is_win9x &&
report (R_ASK, MB_YESNO, "Do you want to submit the test results?") == IDYES)
if (!send_file (logname) && !DeleteFileA(logname))
report (R_WARNING, "Can't remove logfile: %u", GetLastError());
More information about the wine-cvs
mailing list