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
9f72d195
Commit
9f72d195
authored
Apr 22, 2011
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
winetest: Cowardly refuse to submit results that have too many failed tests.
parent
42a294b0
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
1 deletion
+12
-1
main.c
programs/winetest/main.c
+12
-1
No files found.
programs/winetest/main.c
View file @
9f72d195
...
@@ -40,6 +40,9 @@
...
@@ -40,6 +40,9 @@
/* Don't submit the results if more than SKIP_LIMIT tests have been skipped */
/* Don't submit the results if more than SKIP_LIMIT tests have been skipped */
#define SKIP_LIMIT 10
#define SKIP_LIMIT 10
/* Don't submit the results if more than FAILURES_LIMIT tests have failed */
#define FAILURES_LIMIT 50
struct
wine_test
struct
wine_test
{
{
char
*
name
;
char
*
name
;
...
@@ -62,6 +65,7 @@ static const char whitespace[] = " \t\r\n";
...
@@ -62,6 +65,7 @@ static const char whitespace[] = " \t\r\n";
static
const
char
testexe
[]
=
"_test.exe"
;
static
const
char
testexe
[]
=
"_test.exe"
;
static
char
build_id
[
64
];
static
char
build_id
[
64
];
static
BOOL
is_wow64
;
static
BOOL
is_wow64
;
static
int
failures
;
/* filters for running only specific tests */
/* filters for running only specific tests */
static
char
*
filters
[
64
];
static
char
*
filters
[
64
];
...
@@ -705,6 +709,7 @@ run_test (struct wine_test* test, const char* subtest, HANDLE out_file, const ch
...
@@ -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
);
status
=
run_ex
(
cmd
,
out_file
,
tempdir
,
120000
);
heap_free
(
cmd
);
heap_free
(
cmd
);
xprintf
(
"%s:%s done (%d)
\n
"
,
test
->
name
,
subtest
,
status
);
xprintf
(
"%s:%s done (%d)
\n
"
,
test
->
name
,
subtest
,
status
);
if
(
status
)
failures
++
;
}
}
}
}
...
@@ -1316,7 +1321,13 @@ int main( int argc, char *argv[] )
...
@@ -1316,7 +1321,13 @@ int main( int argc, char *argv[] )
DeleteFileA
(
logname
);
DeleteFileA
(
logname
);
exit
(
0
);
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
)
report
(
R_ASK
,
MB_YESNO
,
"Do you want to submit the test results?"
)
==
IDYES
)
if
(
!
send_file
(
logname
)
&&
!
DeleteFileA
(
logname
))
if
(
!
send_file
(
logname
)
&&
!
DeleteFileA
(
logname
))
report
(
R_WARNING
,
"Can't remove logfile: %u"
,
GetLastError
());
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