mirror of
https://github.com/reactos/wine.git
synced 2024-11-25 20:59:54 +00:00
- constify some strings
- introduce -u option to write archive url into the report - bump output format version to 3
This commit is contained in:
parent
72aad7dc31
commit
1fb75dcac5
@ -393,7 +393,7 @@ EnumTestFileProc (HMODULE hModule, LPCTSTR lpszType,
|
||||
}
|
||||
|
||||
char *
|
||||
run_tests (char *logname, const char *tag)
|
||||
run_tests (char *logname, const char *tag, const char *url)
|
||||
{
|
||||
int nr_of_files = 0, nr_of_tests = 0, i;
|
||||
char *tempdir;
|
||||
@ -423,7 +423,7 @@ run_tests (char *logname, const char *tag)
|
||||
report (R_FATAL, "Can't redirect stdout.");
|
||||
fclose (logfile);
|
||||
|
||||
xprintf ("Version 2\n");
|
||||
xprintf ("Version 3\n");
|
||||
i = LoadStringA (GetModuleHandle (NULL), 0,
|
||||
build_tag, sizeof build_tag);
|
||||
if (i == 0) report (R_FATAL, "Build descriptor not found: %d",
|
||||
@ -431,6 +431,7 @@ run_tests (char *logname, const char *tag)
|
||||
if (i >= sizeof build_tag)
|
||||
report (R_FATAL, "Build descriptor too long.");
|
||||
xprintf ("Tests from build %s\n", build_tag);
|
||||
xprintf ("Archive: %s\n", url?url:"");
|
||||
xprintf ("Tag: %s\n", tag?tag:"");
|
||||
xprintf ("Operating system version:\n");
|
||||
print_version ();
|
||||
@ -484,7 +485,8 @@ Usage: winetest [OPTION]...\n\n\
|
||||
-q quiet mode, no output at all\n\
|
||||
-o FILE put report into FILE, do not submit\n\
|
||||
-s FILE submit FILE, do not run tests\n\
|
||||
-t TAG include TAG of characters [-.0-9a-zA-Z] in the report\n");
|
||||
-t TAG include TAG of characters [-.0-9a-zA-Z] in the report\n\
|
||||
-u URL archive URL of this executable\n");
|
||||
}
|
||||
|
||||
/* One can't nest strtok()-s, so here is a replacement. */
|
||||
@ -515,8 +517,7 @@ int WINAPI WinMain (HINSTANCE hInst, HINSTANCE hPrevInst,
|
||||
LPSTR cmdLine, int cmdShow)
|
||||
{
|
||||
char *logname = NULL;
|
||||
char *tag = NULL, *cp;
|
||||
const char *submit = NULL;
|
||||
const char *cp, *submit = NULL, *tag = NULL, *url = NULL;
|
||||
|
||||
/* initialize the revision information first */
|
||||
extract_rev_infos();
|
||||
@ -540,13 +541,13 @@ int WINAPI WinMain (HINSTANCE hInst, HINSTANCE hPrevInst,
|
||||
break;
|
||||
case 's':
|
||||
submit = mystrtok (NULL);
|
||||
if (tag)
|
||||
report (R_WARNING, "ignoring tag for submit");
|
||||
if (tag||url)
|
||||
report (R_WARNING, "ignoring tag and url for submit");
|
||||
send_file (submit);
|
||||
break;
|
||||
case 'o':
|
||||
logname = mystrtok (NULL);
|
||||
run_tests (logname, tag);
|
||||
run_tests (logname, tag, url);
|
||||
break;
|
||||
case 't':
|
||||
tag = mystrtok (NULL);
|
||||
@ -557,6 +558,9 @@ int WINAPI WinMain (HINSTANCE hInst, HINSTANCE hPrevInst,
|
||||
exit (2);
|
||||
}
|
||||
break;
|
||||
case 'u':
|
||||
url = mystrtok (NULL);
|
||||
break;
|
||||
default:
|
||||
report (R_ERROR, "invalid option: -%c", cmdLine[1]);
|
||||
usage ();
|
||||
@ -566,7 +570,7 @@ int WINAPI WinMain (HINSTANCE hInst, HINSTANCE hPrevInst,
|
||||
}
|
||||
if (!logname && !submit) {
|
||||
report (R_STATUS, "Starting up");
|
||||
logname = run_tests (NULL, tag);
|
||||
logname = run_tests (NULL, tag, url);
|
||||
if (report (R_ASK, MB_YESNO, "Do you want to submit the "
|
||||
"test results?") == IDYES)
|
||||
if (!send_file (logname) && remove (logname))
|
||||
|
@ -103,8 +103,8 @@ void xprintf (const char *fmt, ...)
|
||||
free (buffer);
|
||||
}
|
||||
|
||||
char *
|
||||
badtagchar (char *tag)
|
||||
const char *
|
||||
badtagchar (const char *tag)
|
||||
{
|
||||
while (*tag)
|
||||
if (('a'<=*tag && *tag<='z') ||
|
||||
|
@ -33,7 +33,7 @@ void *xrealloc (void *op, size_t len);
|
||||
void xprintf (const char *fmt, ...);
|
||||
char *vstrmake (size_t *lenp, va_list ap);
|
||||
char *strmake (size_t *lenp, ...);
|
||||
char *badtagchar (char *tag);
|
||||
const char *badtagchar (const char *tag);
|
||||
|
||||
int send_file (const char *name);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user