André Hentschel : winetest: Implement aborting.
Alexandre Julliard
julliard at winehq.org
Wed Jun 23 10:57:07 CDT 2010
Module: wine
Branch: master
Commit: bee78503449c4175e4e2731dc70cecbfd3d6ea15
URL: http://source.winehq.org/git/wine.git/?a=commit;h=bee78503449c4175e4e2731dc70cecbfd3d6ea15
Author: André Hentschel <nerv at dawncrow.de>
Date: Tue Jun 22 19:36:08 2010 +0200
winetest: Implement aborting.
---
programs/winetest/gui.c | 3 ++-
programs/winetest/main.c | 11 +++++++++++
programs/winetest/winetest.h | 1 +
3 files changed, 14 insertions(+), 1 deletions(-)
diff --git a/programs/winetest/gui.c b/programs/winetest/gui.c
index 45b3232..a9f3465 100644
--- a/programs/winetest/gui.c
+++ b/programs/winetest/gui.c
@@ -456,7 +456,8 @@ DlgProc (HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam)
MAKEINTRESOURCE (IDD_ABOUT), hwnd, AboutProc);
return TRUE;
case IDABORT:
- report (R_WARNING, "Not implemented");
+ report (R_STATUS, "Aborting, please wait...");
+ aborting = TRUE;
return TRUE;
}
}
diff --git a/programs/winetest/main.c b/programs/winetest/main.c
index 01217d2..f5bf8d4 100644
--- a/programs/winetest/main.c
+++ b/programs/winetest/main.c
@@ -49,6 +49,7 @@ struct wine_test
char *tag = NULL;
char *email = NULL;
+BOOL aborting = FALSE;
static struct wine_test *wine_tests;
static int nr_of_files, nr_of_tests;
static int nr_native_dlls;
@@ -677,6 +678,7 @@ extract_test_proc (HMODULE hModule, LPCTSTR lpszType,
HMODULE dll;
DWORD err;
+ if (aborting) return TRUE;
if (test_filtered_out( lpszName, NULL )) return TRUE;
/* Check if the main dll is present on this system */
@@ -840,6 +842,8 @@ run_tests (char *logname, char *outdir)
FreeLibrary(hmscoree);
+ if (aborting) return logname;
+
xprintf ("Test output:\n" );
report (R_DELTA, 0, "Extracting: Done");
@@ -853,12 +857,15 @@ run_tests (char *logname, char *outdir)
struct wine_test *test = wine_tests + i;
int j;
+ if (aborting) break;
+
if (test->maindllpath) {
/* We need to add the path (to the main dll) to PATH */
append_path(test->maindllpath);
}
for (j = 0; j < test->subtest_count; j++) {
+ if (aborting) break;
report (R_STEP, "Running: %s:%s", test->name,
test->subtests[j]);
run_test (test, test->subtests[j], logfile, tempdir);
@@ -1105,6 +1112,10 @@ int main( int argc, char *argv[] )
if (!logname) {
logname = run_tests (NULL, outdir);
+ if (aborting) {
+ DeleteFileA(logname);
+ exit (0);
+ }
if (build_id[0] && !nb_filters && !nr_native_dlls &&
report (R_ASK, MB_YESNO, "Do you want to submit the test results?") == IDYES)
if (!send_file (logname) && !DeleteFileA(logname))
diff --git a/programs/winetest/winetest.h b/programs/winetest/winetest.h
index a0d2fbd..2b9046c 100644
--- a/programs/winetest/winetest.h
+++ b/programs/winetest/winetest.h
@@ -69,6 +69,7 @@ enum report_type {
#define MAXTAGLEN 20
extern char *tag;
extern char *email;
+extern BOOL aborting;
int guiAskTag (void);
int guiAskEmail (void);
int report (enum report_type t, ...);
More information about the wine-cvs
mailing list