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
93f92d51
Commit
93f92d51
authored
Jul 09, 2010
by
Andrew Nguyen
Committed by
Alexandre Julliard
Jul 09, 2010
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
msi/tests: Skip some source tests if a required product key cannot be created.
parent
9c850c9f
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
78 additions
and
13 deletions
+78
-13
source.c
dlls/msi/tests/source.c
+78
-13
No files found.
dlls/msi/tests/source.c
View file @
93f92d51
...
...
@@ -896,7 +896,11 @@ static void test_MsiSourceListAddSourceEx(void)
lstrcatA
(
keypath
,
prod_squashed
);
res
=
RegCreateKeyA
(
HKEY_LOCAL_MACHINE
,
keypath
,
&
prodkey
);
ok
(
res
==
ERROR_SUCCESS
,
"Expected ERROR_SUCCESS, got %d
\n
"
,
res
);
if
(
res
!=
ERROR_SUCCESS
)
{
skip
(
"Product key creation failed with error code %u
\n
"
,
res
);
goto
machine_tests
;
}
/* product key exists */
r
=
pMsiSourceListAddSourceExA
(
prodcode
,
usersid
,
...
...
@@ -952,6 +956,7 @@ static void test_MsiSourceListAddSourceEx(void)
/* MSIINSTALLCONTEXT_MACHINE */
machine_tests:
/* szUserSid must be NULL for MSIINSTALLCONTEXT_MACHINE */
r
=
pMsiSourceListAddSourceExA
(
prodcode
,
usersid
,
MSIINSTALLCONTEXT_MACHINE
,
...
...
@@ -967,7 +972,12 @@ static void test_MsiSourceListAddSourceEx(void)
lstrcatA
(
keypath
,
prod_squashed
);
res
=
RegCreateKeyA
(
HKEY_LOCAL_MACHINE
,
keypath
,
&
prodkey
);
ok
(
res
==
ERROR_SUCCESS
,
"Expected ERROR_SUCCESS, got %d
\n
"
,
res
);
if
(
res
!=
ERROR_SUCCESS
)
{
skip
(
"Product key creation failed with error code %u
\n
"
,
res
);
LocalFree
(
usersid
);
return
;
}
/* product key exists */
r
=
pMsiSourceListAddSourceExA
(
prodcode
,
NULL
,
...
...
@@ -1358,7 +1368,11 @@ static void test_MsiSourceListEnumSources(void)
lstrcatA
(
keypath
,
prod_squashed
);
res
=
RegCreateKeyA
(
HKEY_LOCAL_MACHINE
,
keypath
,
&
userkey
);
ok
(
res
==
ERROR_SUCCESS
,
"Expected ERROR_SUCCESS, got %d
\n
"
,
res
);
if
(
res
!=
ERROR_SUCCESS
)
{
skip
(
"Product key creation failed with error code %u
\n
"
,
res
);
goto
machine_tests
;
}
/* user product key exists */
size
=
MAX_PATH
;
...
...
@@ -1469,6 +1483,7 @@ static void test_MsiSourceListEnumSources(void)
/* MSIINSTALLCONTEXT_MACHINE */
machine_tests:
/* szUserSid is non-NULL */
size
=
MAX_PATH
;
lstrcpyA
(
value
,
"aaa"
);
...
...
@@ -1493,7 +1508,12 @@ static void test_MsiSourceListEnumSources(void)
lstrcatA
(
keypath
,
prod_squashed
);
res
=
RegCreateKeyA
(
HKEY_LOCAL_MACHINE
,
keypath
,
&
prodkey
);
ok
(
res
==
ERROR_SUCCESS
,
"Expected ERROR_SUCCESS, got %d
\n
"
,
res
);
if
(
res
!=
ERROR_SUCCESS
)
{
skip
(
"Product key creation failed with error code %u
\n
"
,
res
);
LocalFree
(
usersid
);
return
;
}
/* user product key exists */
size
=
MAX_PATH
;
...
...
@@ -1938,7 +1958,11 @@ static void test_MsiSourceListSetInfo(void)
lstrcatA
(
keypath
,
prod_squashed
);
res
=
RegCreateKeyA
(
HKEY_LOCAL_MACHINE
,
keypath
,
&
userkey
);
ok
(
res
==
ERROR_SUCCESS
,
"Expected ERROR_SUCCESS, got %d
\n
"
,
res
);
if
(
res
!=
ERROR_SUCCESS
)
{
skip
(
"Product key creation failed with error code %u
\n
"
,
res
);
goto
machine_tests
;
}
/* user product key exists */
r
=
pMsiSourceListSetInfoA
(
prodcode
,
NULL
,
...
...
@@ -1971,11 +1995,17 @@ static void test_MsiSourceListSetInfo(void)
/* MSIINSTALLCONTEXT_MACHINE */
machine_tests:
lstrcpyA
(
keypath
,
"Software
\\
Classes
\\
Installer
\\
Products
\\
"
);
lstrcatA
(
keypath
,
prod_squashed
);
res
=
RegCreateKeyA
(
HKEY_LOCAL_MACHINE
,
keypath
,
&
prodkey
);
ok
(
res
==
ERROR_SUCCESS
,
"Expected ERROR_SUCCESS, got %d
\n
"
,
res
);
if
(
res
!=
ERROR_SUCCESS
)
{
skip
(
"Product key creation failed with error code %u
\n
"
,
res
);
LocalFree
(
usersid
);
return
;
}
/* user product key exists */
r
=
pMsiSourceListSetInfoA
(
prodcode
,
NULL
,
...
...
@@ -2234,7 +2264,11 @@ static void test_MsiSourceListAddMediaDisk(void)
lstrcatA
(
keypath
,
prod_squashed
);
res
=
RegCreateKeyA
(
HKEY_LOCAL_MACHINE
,
keypath
,
&
userkey
);
ok
(
res
==
ERROR_SUCCESS
,
"Expected ERROR_SUCCESS, got %d
\n
"
,
res
);
if
(
res
!=
ERROR_SUCCESS
)
{
skip
(
"Product key creation failed with error code %u
\n
"
,
res
);
goto
machine_tests
;
}
/* user product key exists */
r
=
pMsiSourceListAddMediaDiskA
(
prodcode
,
usersid
,
...
...
@@ -2268,11 +2302,17 @@ static void test_MsiSourceListAddMediaDisk(void)
/* MSIINSTALLCONTEXT_MACHINE */
machine_tests:
lstrcpyA
(
keypath
,
"Software
\\
Classes
\\
Installer
\\
Products
\\
"
);
lstrcatA
(
keypath
,
prod_squashed
);
res
=
RegCreateKeyA
(
HKEY_LOCAL_MACHINE
,
keypath
,
&
prodkey
);
ok
(
res
==
ERROR_SUCCESS
,
"Expected ERROR_SUCCESS, got %d
\n
"
,
res
);
if
(
res
!=
ERROR_SUCCESS
)
{
skip
(
"Product key creation failed with error code %u
\n
"
,
res
);
LocalFree
(
usersid
);
return
;
}
/* machine product key exists */
r
=
pMsiSourceListAddMediaDiskA
(
prodcode
,
NULL
,
...
...
@@ -2939,7 +2979,11 @@ static void test_MsiSourceListEnumMediaDisks(void)
lstrcatA
(
keypath
,
prod_squashed
);
res
=
RegCreateKeyA
(
HKEY_LOCAL_MACHINE
,
keypath
,
&
userkey
);
ok
(
res
==
ERROR_SUCCESS
,
"Expected ERROR_SUCCESS, got %d
\n
"
,
res
);
if
(
res
!=
ERROR_SUCCESS
)
{
skip
(
"Product key creation failed with error code %u
\n
"
,
res
);
goto
machine_tests
;
}
/* user product key exists */
r
=
pMsiSourceListEnumMediaDisksA
(
prodcode
,
usersid
,
MSIINSTALLCONTEXT_USERMANAGED
,
...
...
@@ -3017,11 +3061,17 @@ static void test_MsiSourceListEnumMediaDisks(void)
/* MSIINSTALLCONTEXT_MACHINE */
machine_tests:
lstrcpyA
(
keypath
,
"Software
\\
Classes
\\
Installer
\\
Products
\\
"
);
lstrcatA
(
keypath
,
prod_squashed
);
res
=
RegCreateKeyA
(
HKEY_LOCAL_MACHINE
,
keypath
,
&
prodkey
);
ok
(
res
==
ERROR_SUCCESS
,
"Expected ERROR_SUCCESS, got %d
\n
"
,
res
);
if
(
res
!=
ERROR_SUCCESS
)
{
skip
(
"Product key creation failed with error code %u
\n
"
,
res
);
LocalFree
(
usersid
);
return
;
}
/* machine product key exists */
r
=
pMsiSourceListEnumMediaDisksA
(
prodcode
,
NULL
,
MSIINSTALLCONTEXT_MACHINE
,
...
...
@@ -3201,7 +3251,11 @@ static void test_MsiSourceListAddSource(void)
lstrcatA
(
keypath
,
prod_squashed
);
res
=
RegCreateKeyA
(
HKEY_LOCAL_MACHINE
,
keypath
,
&
userkey
);
ok
(
res
==
ERROR_SUCCESS
,
"Expected ERROR_SUCCESS, got %d
\n
"
,
res
);
if
(
res
!=
ERROR_SUCCESS
)
{
skip
(
"Product key creation failed with error code %u
\n
"
,
res
);
goto
userunmanaged_tests
;
}
/* user product key exists */
r
=
pMsiSourceListAddSourceA
(
prodcode
,
username
,
0
,
"source"
);
...
...
@@ -3292,6 +3346,7 @@ static void test_MsiSourceListAddSource(void)
/* MSIINSTALLCONTEXT_USERUNMANAGED */
userunmanaged_tests:
r
=
pMsiSourceListAddSourceA
(
prodcode
,
username
,
0
,
"source"
);
ok
(
r
==
ERROR_UNKNOWN_PRODUCT
,
"Expected ERROR_UNKNOWN_PRODUCT, got %d
\n
"
,
r
);
...
...
@@ -3299,7 +3354,11 @@ static void test_MsiSourceListAddSource(void)
lstrcatA
(
keypath
,
prod_squashed
);
res
=
RegCreateKeyA
(
HKEY_CURRENT_USER
,
keypath
,
&
userkey
);
ok
(
res
==
ERROR_SUCCESS
,
"Expected ERROR_SUCCESS, got %d
\n
"
,
res
);
if
(
res
!=
ERROR_SUCCESS
)
{
skip
(
"Product key creation failed with error code %u
\n
"
,
res
);
goto
machine_tests
;
}
/* user product key exists */
r
=
pMsiSourceListAddSourceA
(
prodcode
,
username
,
0
,
"source"
);
...
...
@@ -3328,6 +3387,7 @@ static void test_MsiSourceListAddSource(void)
/* MSIINSTALLCONTEXT_MACHINE */
machine_tests:
r
=
pMsiSourceListAddSourceA
(
prodcode
,
NULL
,
0
,
"source"
);
ok
(
r
==
ERROR_UNKNOWN_PRODUCT
,
"Expected ERROR_UNKNOWN_PRODUCT, got %d
\n
"
,
r
);
...
...
@@ -3335,7 +3395,12 @@ static void test_MsiSourceListAddSource(void)
lstrcatA
(
keypath
,
prod_squashed
);
res
=
RegCreateKeyA
(
HKEY_LOCAL_MACHINE
,
keypath
,
&
prodkey
);
ok
(
res
==
ERROR_SUCCESS
,
"Expected ERROR_SUCCESS, got %d
\n
"
,
res
);
if
(
res
!=
ERROR_SUCCESS
)
{
skip
(
"Product key creation failed with error code %u
\n
"
,
res
);
LocalFree
(
usersid
);
return
;
}
/* machine product key exists */
r
=
pMsiSourceListAddSourceA
(
prodcode
,
NULL
,
0
,
"source"
);
...
...
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