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
e017d9bc
Commit
e017d9bc
authored
Dec 09, 2016
by
Hans Leidekker
Committed by
Alexandre Julliard
Dec 09, 2016
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
dpnet/tests: Skip tests if dpnet is a stub dll.
Signed-off-by:
Hans Leidekker
<
hans@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
a24b8b2b
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
103 additions
and
1 deletion
+103
-1
Makefile.in
dlls/dpnet/tests/Makefile.in
+1
-1
address.c
dlls/dpnet/tests/address.c
+34
-0
client.c
dlls/dpnet/tests/client.c
+34
-0
server.c
dlls/dpnet/tests/server.c
+34
-0
No files found.
dlls/dpnet/tests/Makefile.in
View file @
e017d9bc
TESTDLL
=
dpnet.dll
IMPORTS
=
dxguid uuid dpnet ole32
IMPORTS
=
dxguid uuid dpnet ole32
version
C_SRCS
=
\
address.c
\
...
...
dlls/dpnet/tests/address.c
View file @
e017d9bc
...
...
@@ -353,10 +353,44 @@ static void address_duplicate(void)
}
}
/* taken from programs/winetest/main.c */
static
BOOL
is_stub_dll
(
const
char
*
filename
)
{
DWORD
size
,
ver
;
BOOL
isstub
=
FALSE
;
char
*
p
,
*
data
;
size
=
GetFileVersionInfoSizeA
(
filename
,
&
ver
);
if
(
!
size
)
return
FALSE
;
data
=
HeapAlloc
(
GetProcessHeap
(),
0
,
size
);
if
(
!
data
)
return
FALSE
;
if
(
GetFileVersionInfoA
(
filename
,
ver
,
size
,
data
))
{
char
buf
[
256
];
sprintf
(
buf
,
"
\\
StringFileInfo
\\
%04x%04x
\\
OriginalFilename"
,
MAKELANGID
(
LANG_ENGLISH
,
SUBLANG_ENGLISH_US
),
1200
);
if
(
VerQueryValueA
(
data
,
buf
,
(
void
**
)
&
p
,
&
size
))
isstub
=
!
lstrcmpiA
(
"wcodstub.dll"
,
p
);
}
HeapFree
(
GetProcessHeap
(),
0
,
data
);
return
isstub
;
}
START_TEST
(
address
)
{
HRESULT
hr
;
if
(
!
winetest_interactive
&&
(
is_stub_dll
(
"c:
\\
windows
\\
system32
\\
dpnet.dll"
)
||
is_stub_dll
(
"c:
\\
windows
\\
syswow64
\\
dpnet.dll"
)))
{
win_skip
(
"dpnet is a stub dll, skipping tests
\n
"
);
return
;
}
hr
=
CoInitialize
(
0
);
ok
(
hr
==
S_OK
,
"failed to init com
\n
"
);
if
(
hr
!=
S_OK
)
...
...
dlls/dpnet/tests/client.c
View file @
e017d9bc
...
...
@@ -606,8 +606,42 @@ static void test_cleanup_dp_peer(void)
CoUninitialize
();
}
/* taken from programs/winetest/main.c */
static
BOOL
is_stub_dll
(
const
char
*
filename
)
{
DWORD
size
,
ver
;
BOOL
isstub
=
FALSE
;
char
*
p
,
*
data
;
size
=
GetFileVersionInfoSizeA
(
filename
,
&
ver
);
if
(
!
size
)
return
FALSE
;
data
=
HeapAlloc
(
GetProcessHeap
(),
0
,
size
);
if
(
!
data
)
return
FALSE
;
if
(
GetFileVersionInfoA
(
filename
,
ver
,
size
,
data
))
{
char
buf
[
256
];
sprintf
(
buf
,
"
\\
StringFileInfo
\\
%04x%04x
\\
OriginalFilename"
,
MAKELANGID
(
LANG_ENGLISH
,
SUBLANG_ENGLISH_US
),
1200
);
if
(
VerQueryValueA
(
data
,
buf
,
(
void
**
)
&
p
,
&
size
))
isstub
=
!
lstrcmpiA
(
"wcodstub.dll"
,
p
);
}
HeapFree
(
GetProcessHeap
(),
0
,
data
);
return
isstub
;
}
START_TEST
(
client
)
{
if
(
!
winetest_interactive
&&
(
is_stub_dll
(
"c:
\\
windows
\\
system32
\\
dpnet.dll"
)
||
is_stub_dll
(
"c:
\\
windows
\\
syswow64
\\
dpnet.dll"
)))
{
win_skip
(
"dpnet is a stub dll, skipping tests
\n
"
);
return
;
}
if
(
!
test_init_dp
())
return
;
...
...
dlls/dpnet/tests/server.c
View file @
e017d9bc
...
...
@@ -180,10 +180,44 @@ static void test_server_info(void)
}
}
/* taken from programs/winetest/main.c */
static
BOOL
is_stub_dll
(
const
char
*
filename
)
{
DWORD
size
,
ver
;
BOOL
isstub
=
FALSE
;
char
*
p
,
*
data
;
size
=
GetFileVersionInfoSizeA
(
filename
,
&
ver
);
if
(
!
size
)
return
FALSE
;
data
=
HeapAlloc
(
GetProcessHeap
(),
0
,
size
);
if
(
!
data
)
return
FALSE
;
if
(
GetFileVersionInfoA
(
filename
,
ver
,
size
,
data
))
{
char
buf
[
256
];
sprintf
(
buf
,
"
\\
StringFileInfo
\\
%04x%04x
\\
OriginalFilename"
,
MAKELANGID
(
LANG_ENGLISH
,
SUBLANG_ENGLISH_US
),
1200
);
if
(
VerQueryValueA
(
data
,
buf
,
(
void
**
)
&
p
,
&
size
))
isstub
=
!
lstrcmpiA
(
"wcodstub.dll"
,
p
);
}
HeapFree
(
GetProcessHeap
(),
0
,
data
);
return
isstub
;
}
START_TEST
(
server
)
{
HRESULT
hr
;
if
(
!
winetest_interactive
&&
(
is_stub_dll
(
"c:
\\
windows
\\
system32
\\
dpnet.dll"
)
||
is_stub_dll
(
"c:
\\
windows
\\
syswow64
\\
dpnet.dll"
)))
{
win_skip
(
"dpnet is a stub dll, skipping tests
\n
"
);
return
;
}
hr
=
CoInitialize
(
0
);
ok
(
hr
==
S_OK
,
"failed to init com
\n
"
);
if
(
hr
!=
S_OK
)
...
...
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