Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-winehq
Commits
d9dcafab
Commit
d9dcafab
authored
Dec 09, 2010
by
Francois Gouget
Committed by
Alexandre Julliard
Dec 09, 2010
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
winetest: Allow submitting the results if not too many tests have been skipped.
Currently the limit is set at 10 tests or subtests.
parent
aa424f81
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
28 additions
and
22 deletions
+28
-22
main.c
programs/winetest/main.c
+28
-22
No files found.
programs/winetest/main.c
View file @
d9dcafab
...
...
@@ -37,6 +37,9 @@
#include "winetest.h"
#include "resource.h"
/* Don't submit the results if more than SKIP_LIMIT tests have been skipped */
#define SKIP_LIMIT 10
struct
wine_test
{
char
*
name
;
...
...
@@ -53,7 +56,7 @@ char *url = NULL;
char
*
email
=
NULL
;
BOOL
aborting
=
FALSE
;
static
struct
wine_test
*
wine_tests
;
static
int
nr_of_files
,
nr_of_tests
;
static
int
nr_of_files
,
nr_of_tests
,
nr_of_skips
;
static
int
nr_native_dlls
;
static
const
char
whitespace
[]
=
"
\t\r\n
"
;
static
const
char
testexe
[]
=
"_test.exe"
;
...
...
@@ -597,6 +600,7 @@ run_test (struct wine_test* test, const char* subtest, HANDLE out_file, const ch
{
report
(
R_STEP
,
"Skipping: %s:%s"
,
test
->
name
,
subtest
);
xprintf
(
"%s:%s skipped %s -
\n
"
,
test
->
name
,
subtest
,
file
);
nr_of_skips
++
;
}
else
{
...
...
@@ -703,7 +707,11 @@ extract_test_proc (HMODULE hModule, LPCTSTR lpszType,
ULONG_PTR
cookie
;
if
(
aborting
)
return
TRUE
;
if
(
test_filtered_out
(
lpszName
,
NULL
))
return
TRUE
;
if
(
test_filtered_out
(
lpszName
,
NULL
))
{
nr_of_skips
++
;
return
TRUE
;
}
CharLowerA
(
lpszName
);
extract_test
(
&
wine_tests
[
nr_of_files
],
tempdir
,
lpszName
);
...
...
@@ -902,6 +910,7 @@ run_tests (char *logname, char *outdir)
report
(
R_PROGRESS
,
0
,
nr_of_files
);
nr_of_files
=
0
;
nr_of_tests
=
0
;
nr_of_skips
=
0
;
if
(
!
EnumResourceNames
(
NULL
,
"TESTRES"
,
extract_test_proc
,
(
LPARAM
)
tempdir
))
report
(
R_FATAL
,
"Can't enumerate test files: %d"
,
GetLastError
());
...
...
@@ -1172,35 +1181,32 @@ int main( int argc, char *argv[] )
SetEnvironmentVariableA
(
"WINETEST_REPORT_SUCCESS"
,
"0"
);
}
if
(
!
nb_filters
)
/* don't submit results when filtering */
{
while
(
!
tag
)
{
if
(
!
interactive
)
report
(
R_FATAL
,
"Please specify a tag (-t option) if "
"running noninteractive!"
);
if
(
guiAskTag
()
==
IDABORT
)
exit
(
1
);
}
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
);
}
while
(
!
tag
)
{
if
(
!
interactive
)
report
(
R_FATAL
,
"Please specify a tag (-t option) if "
"running noninteractive!"
);
if
(
guiAskTag
()
==
IDABORT
)
exit
(
1
);
}
report
(
R_TAG
);
if
(
!
build_id
[
0
])
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."
);
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
])
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."
);
if
(
!
logname
)
{
logname
=
run_tests
(
NULL
,
outdir
);
if
(
aborting
)
{
DeleteFileA
(
logname
);
exit
(
0
);
}
if
(
build_id
[
0
]
&&
!
nb_filters
&&
!
nr_native_dlls
&&
if
(
build_id
[
0
]
&&
nr_of_skips
<=
SKIP_LIMIT
&&
!
nr_native_dlls
&&
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
());
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment