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
e3b2cfed
Commit
e3b2cfed
authored
Aug 29, 2023
by
Rémi Bernon
Committed by
Alexandre Julliard
Aug 31, 2023
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
include: Avoid using strcmp directly in wine/test.h.
It's not available in kernel driver code.
parent
add4d6ef
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
6 deletions
+9
-6
test.h
include/wine/test.h
+9
-6
No files found.
include/wine/test.h
View file @
e3b2cfed
...
...
@@ -56,6 +56,7 @@ extern int winetest_mute_threshold;
/* current platform */
extern
const
char
*
winetest_platform
;
extern
int
winetest_platform_is_wine
;
/* use ANSI escape codes for output coloring */
extern
int
winetest_color
;
...
...
@@ -133,14 +134,14 @@ extern void winetest_wait_child_process( HANDLE process );
winetest_loop_flaky(); \
winetest_end_flaky())
#define flaky flaky_if(TRUE)
#define flaky_wine flaky_if(
!strcmp(winetest_platform, "wine")
)
#define flaky_wine_if(is_flaky) flaky_if((is_flaky) &&
!strcmp(winetest_platform, "wine")
)
#define flaky_wine flaky_if(
winetest_platform_is_wine
)
#define flaky_wine_if(is_flaky) flaky_if((is_flaky) &&
winetest_platform_is_wine
)
#define todo_if(is_todo) for (winetest_start_todo(is_todo); \
winetest_loop_todo(); \
winetest_end_todo())
#define todo_wine todo_if(
!strcmp(winetest_platform, "wine")
)
#define todo_wine_if(is_todo) todo_if((is_todo) &&
!strcmp(winetest_platform, "wine")
)
#define todo_wine todo_if(
winetest_platform_is_wine
)
#define todo_wine_if(is_todo) todo_if((is_todo) &&
winetest_platform_is_wine
)
#ifndef ARRAY_SIZE
...
...
@@ -231,7 +232,7 @@ static inline void winetest_ignore_exceptions( BOOL ignore )
static
inline
int
broken
(
int
condition
)
{
return
(
strcmp
(
winetest_platform
,
"windows"
)
==
0
)
&&
condition
;
return
!
winetest_platform_is_wine
&&
condition
;
}
static
LONG
winetest_add_line
(
void
)
...
...
@@ -413,7 +414,7 @@ static inline void winetest_win_skip( const char *msg, ... )
{
va_list
valist
;
va_start
(
valist
,
msg
);
if
(
strcmp
(
winetest_platform
,
"windows"
)
==
0
)
if
(
!
winetest_platform_is_wine
)
winetest_vskip
(
msg
,
valist
);
else
winetest_vok
(
0
,
msg
,
valist
);
...
...
@@ -529,6 +530,7 @@ int winetest_interactive = 0;
/* current platform */
const
char
*
winetest_platform
=
"windows"
;
int
winetest_platform_is_wine
=
0
;
/* report failed flaky tests as failures (BOOL) */
int
winetest_report_flaky
=
0
;
...
...
@@ -781,6 +783,7 @@ int main( int argc, char **argv )
winetest_platform
=
strdup
(
p
);
else
if
(
running_under_wine
())
winetest_platform
=
"wine"
;
winetest_platform_is_wine
=
!
strcmp
(
winetest_platform
,
"wine"
);
if
(
GetEnvironmentVariableA
(
"WINETEST_COLOR"
,
p
,
sizeof
(
p
)
))
{
...
...
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