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
58ec7775
Commit
58ec7775
authored
Aug 29, 2023
by
Rémi Bernon
Committed by
Alexandre Julliard
Aug 30, 2023
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
include: Prefix winetest global counters with winetest_.
parent
a0b28eda
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
31 additions
and
36 deletions
+31
-36
test.h
include/wine/test.h
+31
-36
No files found.
include/wine/test.h
View file @
58ec7775
...
...
@@ -189,15 +189,15 @@ static char** winetest_argv;
static
const
struct
test
*
current_test
;
/* test currently being run */
static
LONG
successes
;
/* number of successful tests */
static
LONG
failures
;
/* number of failures */
static
LONG
flaky_failures
;
/* number of failures inside flaky block */
static
LONG
skipped
;
/* number of skipped test chunks */
static
LONG
todo_successes
;
/* number of successful tests inside todo block */
static
LONG
todo_failures
;
/* number of failures inside todo block */
static
LONG
muted_traces
;
/* number of silenced traces */
static
LONG
muted_skipped
;
/* same as skipped but silent */
static
LONG
muted_todo_successes
;
/* same as todo_successes but silent */
static
LONG
winetest_
successes
;
/* number of successful tests */
static
LONG
winetest_
failures
;
/* number of failures */
static
LONG
winetest_
flaky_failures
;
/* number of failures inside flaky block */
static
LONG
winetest_
skipped
;
/* number of skipped test chunks */
static
LONG
winetest_
todo_successes
;
/* number of successful tests inside todo block */
static
LONG
winetest_
todo_failures
;
/* number of failures inside todo block */
static
LONG
winetest_
muted_traces
;
/* number of silenced traces */
static
LONG
winetest_
muted_skipped
;
/* same as skipped but silent */
static
LONG
winetest_
muted_todo_successes
;
/* same as todo_successes but silent */
/* counts how many times a given line printed a message */
static
LONG
line_counters
[
16384
];
...
...
@@ -376,14 +376,14 @@ int winetest_vok( int condition, const char *msg, va_list args )
if
(
winetest_color
)
printf
(
color_dark_purple
);
winetest_print_context
(
"Test succeeded inside flaky todo block: "
);
vprintf
(
msg
,
args
);
InterlockedIncrement
(
&
flaky_failures
);
InterlockedIncrement
(
&
winetest_flaky_failures
);
}
else
{
if
(
winetest_color
)
printf
(
color_dark_red
);
winetest_print_context
(
"Test succeeded inside todo block: "
);
vprintf
(
msg
,
args
);
InterlockedIncrement
(
&
todo_failures
);
InterlockedIncrement
(
&
winetest_todo_failures
);
}
if
(
winetest_color
)
printf
(
color_reset
);
winetest_print_unlock
();
...
...
@@ -403,10 +403,9 @@ int winetest_vok( int condition, const char *msg, va_list args )
if
(
winetest_color
)
printf
(
color_reset
);
winetest_print_unlock
();
}
InterlockedIncrement
(
&
todo_successes
);
InterlockedIncrement
(
&
winetest_todo_successes
);
}
else
InterlockedIncrement
(
&
muted_todo_successes
);
else
InterlockedIncrement
(
&
winetest_muted_todo_successes
);
return
1
;
}
}
...
...
@@ -420,14 +419,14 @@ int winetest_vok( int condition, const char *msg, va_list args )
if
(
winetest_color
)
printf
(
color_bright_purple
);
winetest_print_context
(
"Test marked flaky: "
);
vprintf
(
msg
,
args
);
InterlockedIncrement
(
&
flaky_failures
);
InterlockedIncrement
(
&
winetest_flaky_failures
);
}
else
{
if
(
winetest_color
)
printf
(
color_bright_red
);
winetest_print_context
(
"Test failed: "
);
vprintf
(
msg
,
args
);
InterlockedIncrement
(
&
failures
);
InterlockedIncrement
(
&
winetest_failures
);
}
if
(
winetest_color
)
printf
(
color_reset
);
winetest_print_unlock
();
...
...
@@ -444,7 +443,7 @@ int winetest_vok( int condition, const char *msg, va_list args )
if
(
winetest_color
)
printf
(
color_reset
);
winetest_print_unlock
();
}
InterlockedIncrement
(
&
successes
);
InterlockedIncrement
(
&
winetest_successes
);
return
1
;
}
}
...
...
@@ -474,8 +473,7 @@ void winetest_trace( const char *msg, ... )
va_end
(
valist
);
winetest_print_unlock
();
}
else
InterlockedIncrement
(
&
muted_traces
);
else
InterlockedIncrement
(
&
winetest_muted_traces
);
}
void
winetest_vskip
(
const
char
*
msg
,
va_list
args
)
...
...
@@ -488,10 +486,9 @@ void winetest_vskip( const char *msg, va_list args )
vprintf
(
msg
,
args
);
if
(
winetest_color
)
printf
(
color_reset
);
winetest_print_unlock
();
InterlockedIncrement
(
&
skipped
);
InterlockedIncrement
(
&
winetest_skipped
);
}
else
InterlockedIncrement
(
&
muted_skipped
);
else
InterlockedIncrement
(
&
winetest_muted_skipped
);
}
void
winetest_skip
(
const
char
*
msg
,
...
)
...
...
@@ -586,13 +583,12 @@ int winetest_get_mainargs( char*** pargv )
LONG
winetest_get_failures
(
void
)
{
return
failures
;
return
winetest_
failures
;
}
void
winetest_add_failures
(
LONG
new_failures
)
{
while
(
new_failures
--
>
0
)
InterlockedIncrement
(
&
failures
);
while
(
new_failures
--
>
0
)
InterlockedIncrement
(
&
winetest_failures
);
}
void
winetest_wait_child_process
(
HANDLE
process
)
...
...
@@ -620,15 +616,14 @@ void winetest_wait_child_process( HANDLE process )
winetest_printf
(
"unhandled exception %08x in child process %04x
\n
"
,
(
UINT
)
exit_code
,
(
UINT
)
pid
);
if
(
winetest_color
)
printf
(
color_reset
);
winetest_print_unlock
();
InterlockedIncrement
(
&
failures
);
InterlockedIncrement
(
&
winetest_
failures
);
}
else
if
(
exit_code
)
{
winetest_print_lock
();
winetest_printf
(
"%u failures in child process
\n
"
,
(
UINT
)
exit_code
);
winetest_print_unlock
();
while
(
exit_code
--
>
0
)
InterlockedIncrement
(
&
failures
);
while
(
exit_code
--
>
0
)
InterlockedIncrement
(
&
winetest_failures
);
}
}
}
...
...
@@ -682,20 +677,20 @@ static int run_test( const char *name )
if
(
winetest_debug
)
{
winetest_print_lock
();
if
(
muted_todo_successes
||
muted_skipped
||
muted_traces
)
if
(
winetest_muted_todo_successes
||
winetest_muted_skipped
||
winetest_
muted_traces
)
printf
(
"%04x:%s:%s Silenced %d todos, %d skips and %d traces.
\n
"
,
(
UINT
)
GetCurrentProcessId
(),
test
->
name
,
winetest_elapsed
(),
(
UINT
)
muted_todo_successes
,
(
UINT
)
muted_skipped
,
(
UINT
)
muted_traces
);
(
UINT
)
winetest_muted_todo_successes
,
(
UINT
)
winetest_muted_skipped
,
(
UINT
)
winetest_
muted_traces
);
printf
(
"%04x:%s:%s %d tests executed (%d marked as todo, %d as flaky, %d %s), %d skipped.
\n
"
,
(
UINT
)
GetCurrentProcessId
(),
test
->
name
,
winetest_elapsed
(),
(
UINT
)(
successes
+
failures
+
flaky_failures
+
todo_successes
+
todo_failures
),
(
UINT
)
todo_successes
,
(
UINT
)
flaky_failures
,
(
UINT
)(
failures
+
todo_failures
),
(
failures
+
todo_failures
!=
1
)
?
"failures"
:
"failure"
,
(
UINT
)
skipped
);
(
UINT
)(
winetest_successes
+
winetest_failures
+
winetest_flaky_failures
+
winetest_todo_successes
+
winetest_
todo_failures
),
(
UINT
)
winetest_todo_successes
,
(
UINT
)
winetest_flaky_failures
,
(
UINT
)(
winetest_failures
+
winetest_
todo_failures
),
(
winetest_failures
+
winetest_
todo_failures
!=
1
)
?
"failures"
:
"failure"
,
(
UINT
)
winetest_
skipped
);
winetest_print_unlock
();
}
status
=
failures
+
todo_failures
;
if
(
winetest_report_flaky
)
status
+=
flaky_failures
;
status
=
winetest_failures
+
winetest_
todo_failures
;
if
(
winetest_report_flaky
)
status
+=
winetest_
flaky_failures
;
if
(
status
>
255
)
status
=
255
;
return
status
;
}
...
...
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