winetest: Require an email address to submit a report.
This commit is contained in:
parent
16bcc06bb2
commit
6fae8e1df1
|
@ -361,6 +361,39 @@ guiAskTag (void)
|
||||||
dialog, AskTagProc);
|
dialog, AskTagProc);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static INT_PTR CALLBACK
|
||||||
|
AskEmailProc (HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam)
|
||||||
|
{
|
||||||
|
int len;
|
||||||
|
|
||||||
|
switch (msg)
|
||||||
|
{
|
||||||
|
case WM_COMMAND:
|
||||||
|
switch (LOWORD (wParam)) {
|
||||||
|
case IDOK:
|
||||||
|
len = GetWindowTextLengthA (GetDlgItem (hwnd, IDC_EMAIL));
|
||||||
|
if(!len) {
|
||||||
|
report (R_WARNING, "You must enter an email address to continue");
|
||||||
|
return FALSE;
|
||||||
|
}
|
||||||
|
email = heap_alloc (len+1);
|
||||||
|
GetDlgItemTextA (hwnd, IDC_EMAIL, email, len+1);
|
||||||
|
EndDialog (hwnd, IDOK);
|
||||||
|
return TRUE;
|
||||||
|
case IDABORT:
|
||||||
|
EndDialog (hwnd, IDABORT);
|
||||||
|
return TRUE;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return FALSE;
|
||||||
|
}
|
||||||
|
|
||||||
|
int
|
||||||
|
guiAskEmail (void)
|
||||||
|
{
|
||||||
|
return DialogBox (GetModuleHandle (NULL), MAKEINTRESOURCE (IDD_EMAIL), dialog, AskEmailProc);
|
||||||
|
}
|
||||||
|
|
||||||
/* Quiet functions */
|
/* Quiet functions */
|
||||||
static int
|
static int
|
||||||
qNoOp (va_list ap)
|
qNoOp (va_list ap)
|
||||||
|
|
|
@ -48,6 +48,7 @@ struct wine_test
|
||||||
};
|
};
|
||||||
|
|
||||||
char *tag = NULL;
|
char *tag = NULL;
|
||||||
|
char *email = NULL;
|
||||||
static struct wine_test *wine_tests;
|
static struct wine_test *wine_tests;
|
||||||
static int nr_of_files, nr_of_tests;
|
static int nr_of_files, nr_of_tests;
|
||||||
static int nr_native_dlls;
|
static int nr_native_dlls;
|
||||||
|
@ -221,6 +222,7 @@ static void print_version (void)
|
||||||
xprintf (" Platform=%s%s\n", platform, wow64 ? " (WOW64)" : "");
|
xprintf (" Platform=%s%s\n", platform, wow64 ? " (WOW64)" : "");
|
||||||
xprintf (" bRunningUnderWine=%d\n", running_under_wine ());
|
xprintf (" bRunningUnderWine=%d\n", running_under_wine ());
|
||||||
xprintf (" bRunningOnVisibleDesktop=%d\n", running_on_visible_desktop ());
|
xprintf (" bRunningOnVisibleDesktop=%d\n", running_on_visible_desktop ());
|
||||||
|
xprintf (" Submitter=%s\n", email );
|
||||||
xprintf (" dwMajorVersion=%u\n dwMinorVersion=%u\n"
|
xprintf (" dwMajorVersion=%u\n dwMinorVersion=%u\n"
|
||||||
" dwBuildNumber=%u\n PlatformId=%u\n szCSDVersion=%s\n",
|
" dwBuildNumber=%u\n PlatformId=%u\n szCSDVersion=%s\n",
|
||||||
ver.dwMajorVersion, ver.dwMinorVersion, ver.dwBuildNumber,
|
ver.dwMajorVersion, ver.dwMinorVersion, ver.dwBuildNumber,
|
||||||
|
@ -921,6 +923,7 @@ usage (void)
|
||||||
" -d DIR Use DIR as temp directory (default: %%TEMP%%\\wct)\n"
|
" -d DIR Use DIR as temp directory (default: %%TEMP%%\\wct)\n"
|
||||||
" -e preserve the environment\n"
|
" -e preserve the environment\n"
|
||||||
" -h print this message and exit\n"
|
" -h print this message and exit\n"
|
||||||
|
" -m MAIL an email address to enable developers to contact you\n"
|
||||||
" -p shutdown when the tests are done\n"
|
" -p shutdown when the tests are done\n"
|
||||||
" -q quiet mode, no output at all\n"
|
" -q quiet mode, no output at all\n"
|
||||||
" -o FILE put report into FILE, do not submit\n"
|
" -o FILE put report into FILE, do not submit\n"
|
||||||
|
@ -971,6 +974,13 @@ int main( int argc, char *argv[] )
|
||||||
case '?':
|
case '?':
|
||||||
usage ();
|
usage ();
|
||||||
exit (0);
|
exit (0);
|
||||||
|
case 'm':
|
||||||
|
if (!(email = argv[++i]))
|
||||||
|
{
|
||||||
|
usage();
|
||||||
|
exit( 2 );
|
||||||
|
}
|
||||||
|
break;
|
||||||
case 'p':
|
case 'p':
|
||||||
poweroff = 1;
|
poweroff = 1;
|
||||||
break;
|
break;
|
||||||
|
@ -1056,6 +1066,13 @@ int main( int argc, char *argv[] )
|
||||||
}
|
}
|
||||||
report (R_TAG);
|
report (R_TAG);
|
||||||
|
|
||||||
|
while (!email) {
|
||||||
|
if (!interactive)
|
||||||
|
report (R_FATAL, "Please specify an email address (-m option) to enable developers\n"
|
||||||
|
" to contact you about your report if necessary.");
|
||||||
|
if (guiAskEmail () == IDABORT) exit (1);
|
||||||
|
}
|
||||||
|
|
||||||
if (!build_id[0])
|
if (!build_id[0])
|
||||||
report( R_WARNING, "You won't be able to submit results without a valid build id.\n"
|
report( R_WARNING, "You won't be able to submit results without a valid build id.\n"
|
||||||
"To submit results, winetest needs to be built from a git checkout." );
|
"To submit results, winetest needs to be built from a git checkout." );
|
||||||
|
|
|
@ -23,6 +23,7 @@
|
||||||
#define IDD_STATUS 100
|
#define IDD_STATUS 100
|
||||||
#define IDD_ABOUT 101
|
#define IDD_ABOUT 101
|
||||||
#define IDD_TAG 102
|
#define IDD_TAG 102
|
||||||
|
#define IDD_EMAIL 103
|
||||||
|
|
||||||
#define IDC_STATIC -1
|
#define IDC_STATIC -1
|
||||||
|
|
||||||
|
@ -36,6 +37,7 @@
|
||||||
#define IDC_DIR 2000
|
#define IDC_DIR 2000
|
||||||
#define IDC_OUT 2001
|
#define IDC_OUT 2001
|
||||||
#define IDC_TAG 2002
|
#define IDC_TAG 2002
|
||||||
|
#define IDC_EMAIL 2002
|
||||||
|
|
||||||
#define IDC_SB 3000
|
#define IDC_SB 3000
|
||||||
|
|
||||||
|
|
|
@ -68,7 +68,9 @@ enum report_type {
|
||||||
|
|
||||||
#define MAXTAGLEN 20
|
#define MAXTAGLEN 20
|
||||||
extern char *tag;
|
extern char *tag;
|
||||||
|
extern char *email;
|
||||||
int guiAskTag (void);
|
int guiAskTag (void);
|
||||||
|
int guiAskEmail (void);
|
||||||
int report (enum report_type t, ...);
|
int report (enum report_type t, ...);
|
||||||
|
|
||||||
#endif /* __WINETESTS_H */
|
#endif /* __WINETESTS_H */
|
||||||
|
|
|
@ -35,6 +35,17 @@ BEGIN
|
||||||
PUSHBUTTON "Abort", IDABORT, 85, 45, 40, 14
|
PUSHBUTTON "Abort", IDABORT, 85, 45, 40, 14
|
||||||
END
|
END
|
||||||
|
|
||||||
|
IDD_EMAIL DIALOG 0, 0, 150, 65
|
||||||
|
STYLE WS_POPUP | WS_CAPTION | WS_SYSMENU
|
||||||
|
CAPTION "No email supplied"
|
||||||
|
BEGIN
|
||||||
|
CTEXT "Please supply an email address to enable developers to contact you about your report."
|
||||||
|
IDC_STATIC, 10, 5, 130, 30
|
||||||
|
EDITTEXT IDC_EMAIL, 10, 30, 130, 10, ES_AUTOHSCROLL
|
||||||
|
DEFPUSHBUTTON "Start", IDOK, 25, 45, 40, 14
|
||||||
|
PUSHBUTTON "Abort", IDABORT, 85, 45, 40, 14
|
||||||
|
END
|
||||||
|
|
||||||
IDD_STATUS DIALOG 0, 0, 160, 150
|
IDD_STATUS DIALOG 0, 0, 160, 150
|
||||||
STYLE WS_OVERLAPPED | WS_CAPTION | WS_SYSMENU | WS_MINIMIZEBOX
|
STYLE WS_OVERLAPPED | WS_CAPTION | WS_SYSMENU | WS_MINIMIZEBOX
|
||||||
CAPTION "Wine Test Shell"
|
CAPTION "Wine Test Shell"
|
||||||
|
|
Loading…
Reference in New Issue