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
61b8a189
Commit
61b8a189
authored
Nov 23, 2014
by
Sebastian Lackner
Committed by
Alexandre Julliard
Apr 06, 2015
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
include: Automatically detect if tests are running under Wine when…
include: Automatically detect if tests are running under Wine when WINETEST_PLATFORM is not specified.
parent
1d5914b7
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
1 deletion
+13
-1
test.h
include/wine/test.h
+13
-1
No files found.
include/wine/test.h
View file @
61b8a189
...
@@ -618,6 +618,14 @@ static LONG CALLBACK exc_filter( EXCEPTION_POINTERS *ptrs )
...
@@ -618,6 +618,14 @@ static LONG CALLBACK exc_filter( EXCEPTION_POINTERS *ptrs )
return
EXCEPTION_EXECUTE_HANDLER
;
return
EXCEPTION_EXECUTE_HANDLER
;
}
}
/* check if we're running under wine */
static
BOOL
running_under_wine
(
void
)
{
HMODULE
module
=
GetModuleHandleA
(
"ntdll.dll"
);
if
(
!
module
)
return
FALSE
;
return
(
GetProcAddress
(
module
,
"wine_server_call"
)
!=
NULL
);
}
#ifdef __GNUC__
#ifdef __GNUC__
void
_fpreset
(
void
)
{}
/* override the mingw fpu init code */
void
_fpreset
(
void
)
{}
/* override the mingw fpu init code */
#endif
#endif
...
@@ -632,7 +640,11 @@ int main( int argc, char **argv )
...
@@ -632,7 +640,11 @@ int main( int argc, char **argv )
winetest_argc
=
argc
;
winetest_argc
=
argc
;
winetest_argv
=
argv
;
winetest_argv
=
argv
;
if
(
GetEnvironmentVariableA
(
"WINETEST_PLATFORM"
,
p
,
sizeof
(
p
)
))
winetest_platform
=
strdup
(
p
);
if
(
GetEnvironmentVariableA
(
"WINETEST_PLATFORM"
,
p
,
sizeof
(
p
)
))
winetest_platform
=
strdup
(
p
);
else
if
(
running_under_wine
())
winetest_platform
=
"wine"
;
if
(
GetEnvironmentVariableA
(
"WINETEST_DEBUG"
,
p
,
sizeof
(
p
)
))
winetest_debug
=
atoi
(
p
);
if
(
GetEnvironmentVariableA
(
"WINETEST_DEBUG"
,
p
,
sizeof
(
p
)
))
winetest_debug
=
atoi
(
p
);
if
(
GetEnvironmentVariableA
(
"WINETEST_INTERACTIVE"
,
p
,
sizeof
(
p
)
))
winetest_interactive
=
atoi
(
p
);
if
(
GetEnvironmentVariableA
(
"WINETEST_INTERACTIVE"
,
p
,
sizeof
(
p
)
))
winetest_interactive
=
atoi
(
p
);
if
(
GetEnvironmentVariableA
(
"WINETEST_REPORT_SUCCESS"
,
p
,
sizeof
(
p
)
))
report_success
=
atoi
(
p
);
if
(
GetEnvironmentVariableA
(
"WINETEST_REPORT_SUCCESS"
,
p
,
sizeof
(
p
)
))
report_success
=
atoi
(
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