Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
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-cw
Commits
0df47126
Commit
0df47126
authored
Oct 11, 2010
by
Hans Leidekker
Committed by
Alexandre Julliard
Oct 11, 2010
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
msi/tests: Reduce the UI level for a couple of tests.
This makes the tests run faster because native only creates restore points for installers with a basic UI level and higher.
parent
eafebe0f
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
66 additions
and
21 deletions
+66
-21
format.c
dlls/msi/tests/format.c
+4
-0
install.c
dlls/msi/tests/install.c
+30
-15
package.c
dlls/msi/tests/package.c
+32
-6
No files found.
dlls/msi/tests/format.c
View file @
0df47126
...
...
@@ -2272,6 +2272,8 @@ static void test_formatrecord_tables(void)
ok
(
r
==
ERROR_SUCCESS
,
"format record failed: %d
\n
"
,
r
);
ok
(
!
lstrcmp
(
buf
,
"1: "
),
"Expected '1: ', got %s
\n
"
,
buf
);
MsiSetInternalUI
(
INSTALLUILEVEL_NONE
,
NULL
);
r
=
MsiDoAction
(
hpkg
,
"CostInitialize"
);
ok
(
r
==
ERROR_SUCCESS
,
"CostInitialize failed: %d
\n
"
,
r
);
...
...
@@ -2412,6 +2414,8 @@ static void test_processmessage(void)
MSIHANDLE
hrec
,
package
;
UINT
r
;
MsiSetInternalUI
(
INSTALLUILEVEL_BASIC
,
NULL
);
r
=
helper_createpackage
(
msifile
,
&
package
);
if
(
r
==
ERROR_INSTALL_PACKAGE_REJECTED
)
{
...
...
dlls/msi/tests/install.c
View file @
0df47126
...
...
@@ -727,10 +727,15 @@ static const CHAR pp_install_exec_seq_dat[] = "Action\tCondition\tSequence\n"
"PublishProduct
\t
PUBLISH_PRODUCT=1 Or FULL=1
\t
6400
\n
"
"InstallFinalize
\t\t
6600"
;
static
const
CHAR
pp_component_dat
[]
=
"Component
\t
ComponentId
\t
Directory_
\t
Attributes
\t
Condition
\t
KeyPath
\n
"
"s72
\t
S38
\t
s72
\t
i2
\t
S255
\t
S72
\n
"
"Component
\t
Component
\n
"
"maximus
\t
{DF2CBABC-3BCC-47E5-A998-448D1C0C895B}
\t
MSITESTDIR
\t
0
\t\t
maximus
\n
"
;
static
const
CHAR
ppc_component_dat
[]
=
"Component
\t
ComponentId
\t
Directory_
\t
Attributes
\t
Condition
\t
KeyPath
\n
"
"s72
\t
S38
\t
s72
\t
i2
\t
S255
\t
S72
\n
"
"Component
\t
Component
\n
"
"maximus
\t
{DF2CBABC-3BCC-47E5-A998-448D1C0C895B}
\t
MSITESTDIR
\t
0
\t
UILevel=5
\t
maximus
\n
"
"maximus
\t
{DF2CBABC-3BCC-47E5-A998-448D1C0C895B}
\t
MSITESTDIR
\t
0
\t\t
maximus
\n
"
"augustus
\t
{5AD3C142-CEF8-490D-B569-784D80670685}
\t
MSITESTDIR
\t
1
\t\t
augustus
\n
"
;
static
const
CHAR
ppc_file_dat
[]
=
"File
\t
Component_
\t
FileName
\t
FileSize
\t
Version
\t
Language
\t
Attributes
\t
Sequence
\n
"
...
...
@@ -2465,7 +2470,7 @@ static const msi_table spf_tables[] =
static
const
msi_table
pp_tables
[]
=
{
ADD_TABLE
(
ci
_component
),
ADD_TABLE
(
pp
_component
),
ADD_TABLE
(
directory
),
ADD_TABLE
(
rof_feature
),
ADD_TABLE
(
rof_feature_comp
),
...
...
@@ -3750,6 +3755,8 @@ static void test_MsiInstallProduct(void)
if
(
is_wow64
)
access
|=
KEY_WOW64_64KEY
;
MsiSetInternalUI
(
INSTALLUILEVEL_NONE
,
NULL
);
/* szPackagePath is NULL */
r
=
MsiInstallProductA
(
NULL
,
"INSTALL=ALL"
);
ok
(
r
==
ERROR_INVALID_PARAMETER
,
...
...
@@ -4043,6 +4050,8 @@ static void test_MsiSetComponentState(void)
lstrcat
(
path
,
"
\\
"
);
lstrcat
(
path
,
msifile
);
MsiSetInternalUI
(
INSTALLUILEVEL_NONE
,
NULL
);
r
=
MsiOpenPackage
(
path
,
&
package
);
if
(
r
==
ERROR_INSTALL_PACKAGE_REJECTED
)
{
...
...
@@ -5778,7 +5787,7 @@ static void test_publish_registeruser(void)
if
(
is_wow64
)
access
|=
KEY_WOW64_64KEY
;
MsiSetInternalUI
(
INSTALLUILEVEL_
FULL
,
NULL
);
MsiSetInternalUI
(
INSTALLUILEVEL_
NONE
,
NULL
);
/* RegisterUser, per-user */
r
=
MsiInstallProductA
(
msifile
,
"REGISTER_USER=1"
);
...
...
@@ -5870,7 +5879,7 @@ static void test_publish_processcomponents(void)
if
(
is_wow64
)
access
|=
KEY_WOW64_64KEY
;
MsiSetInternalUI
(
INSTALLUILEVEL_
FULL
,
NULL
);
MsiSetInternalUI
(
INSTALLUILEVEL_
NONE
,
NULL
);
/* ProcessComponents, per-user */
r
=
MsiInstallProductA
(
msifile
,
"PROCESS_COMPONENTS=1"
);
...
...
@@ -6016,7 +6025,7 @@ static void test_publish(void)
create_database
(
msifile
,
pp_tables
,
sizeof
(
pp_tables
)
/
sizeof
(
msi_table
));
MsiSetInternalUI
(
INSTALLUILEVEL_
FULL
,
NULL
);
MsiSetInternalUI
(
INSTALLUILEVEL_
NONE
,
NULL
);
state
=
MsiQueryProductState
(
"{7DF88A48-996F-4EC8-A022-BF956F9B2CBB}"
);
ok
(
state
==
INSTALLSTATE_UNKNOWN
,
"Expected INSTALLSTATE_UNKNOWN, got %d
\n
"
,
state
);
...
...
@@ -6549,7 +6558,7 @@ static void test_publishsourcelist(void)
create_database
(
msifile
,
pp_tables
,
sizeof
(
pp_tables
)
/
sizeof
(
msi_table
));
MsiSetInternalUI
(
INSTALLUILEVEL_
FULL
,
NULL
);
MsiSetInternalUI
(
INSTALLUILEVEL_
NONE
,
NULL
);
r
=
MsiInstallProductA
(
msifile
,
NULL
);
if
(
r
==
ERROR_INSTALL_PACKAGE_REJECTED
)
...
...
@@ -7169,7 +7178,7 @@ static void test_removefiles(void)
create_database
(
msifile
,
rem_tables
,
sizeof
(
rem_tables
)
/
sizeof
(
msi_table
));
MsiSetInternalUI
(
INSTALLUILEVEL_
FULL
,
NULL
);
MsiSetInternalUI
(
INSTALLUILEVEL_
NONE
,
NULL
);
r
=
MsiInstallProductA
(
msifile
,
NULL
);
if
(
r
==
ERROR_INSTALL_PACKAGE_REJECTED
)
...
...
@@ -7326,7 +7335,7 @@ static void test_movefiles(void)
create_database
(
msifile
,
mov_tables
,
sizeof
(
mov_tables
)
/
sizeof
(
msi_table
));
MsiSetInternalUI
(
INSTALLUILEVEL_
FULL
,
NULL
);
MsiSetInternalUI
(
INSTALLUILEVEL_
NONE
,
NULL
);
/* if the source or dest property is not a full path,
* windows tries to access it as a network resource
...
...
@@ -8561,6 +8570,8 @@ static void test_adminimage(void)
sizeof
(
ai_tables
)
/
sizeof
(
msi_table
),
100
,
msidbSumInfoSourceTypeAdminImage
,
";1033"
);
MsiSetInternalUI
(
INSTALLUILEVEL_NONE
,
NULL
);
r
=
MsiInstallProductA
(
msifile
,
NULL
);
if
(
r
==
ERROR_INSTALL_PACKAGE_REJECTED
)
{
...
...
@@ -8705,6 +8716,8 @@ static void test_shortcut(void)
create_test_files
();
create_database
(
msifile
,
sc_tables
,
sizeof
(
sc_tables
)
/
sizeof
(
msi_table
));
MsiSetInternalUI
(
INSTALLUILEVEL_NONE
,
NULL
);
r
=
MsiInstallProductA
(
msifile
,
NULL
);
if
(
r
==
ERROR_INSTALL_PACKAGE_REJECTED
)
{
...
...
@@ -8780,6 +8793,8 @@ static void test_envvar(void)
res
=
RegSetValueExA
(
env
,
"MSITESTVAR2"
,
0
,
REG_SZ
,
(
const
BYTE
*
)
"0"
,
2
);
ok
(
res
==
ERROR_SUCCESS
,
"Expected ERROR_SUCCESS, got %d
\n
"
,
res
);
MsiSetInternalUI
(
INSTALLUILEVEL_NONE
,
NULL
);
r
=
MsiInstallProductA
(
msifile
,
NULL
);
if
(
r
==
ERROR_INSTALL_PACKAGE_REJECTED
)
{
...
...
@@ -8888,6 +8903,8 @@ static void test_preselected(void)
create_test_files
();
create_database
(
msifile
,
ps_tables
,
sizeof
(
ps_tables
)
/
sizeof
(
msi_table
));
MsiSetInternalUI
(
INSTALLUILEVEL_NONE
,
NULL
);
r
=
MsiInstallProductA
(
msifile
,
"ADDLOCAL=One"
);
if
(
r
==
ERROR_INSTALL_PACKAGE_REJECTED
)
{
...
...
@@ -9026,8 +9043,6 @@ static void test_allusers_prop(void)
create_test_files
();
create_database
(
msifile
,
aup2_tables
,
sizeof
(
aup2_tables
)
/
sizeof
(
msi_table
));
MsiSetInternalUI
(
INSTALLUILEVEL_NONE
,
NULL
);
/* ALLUSERS property set to 1 */
r
=
MsiInstallProductA
(
msifile
,
"FULL=1"
);
ok
(
r
==
ERROR_SUCCESS
,
"Expected ERROR_SUCCESS, got %u
\n
"
,
r
);
...
...
@@ -9053,8 +9068,6 @@ static void test_allusers_prop(void)
create_test_files
();
create_database
(
msifile
,
aup3_tables
,
sizeof
(
aup3_tables
)
/
sizeof
(
msi_table
));
MsiSetInternalUI
(
INSTALLUILEVEL_NONE
,
NULL
);
/* ALLUSERS property set to 2 */
r
=
MsiInstallProductA
(
msifile
,
"FULL=1"
);
ok
(
r
==
ERROR_SUCCESS
,
"Expected ERROR_SUCCESS, got %u
\n
"
,
r
);
...
...
@@ -9080,8 +9093,6 @@ static void test_allusers_prop(void)
create_test_files
();
create_database
(
msifile
,
aup4_tables
,
sizeof
(
aup4_tables
)
/
sizeof
(
msi_table
));
MsiSetInternalUI
(
INSTALLUILEVEL_NONE
,
NULL
);
/* ALLUSERS property set to 2, conditioned on ALLUSERS = 1 */
r
=
MsiInstallProductA
(
msifile
,
"FULL=1"
);
if
(
r
==
ERROR_SUCCESS
)
...
...
@@ -9429,6 +9440,8 @@ static void test_feature_override(void)
if
(
is_wow64
)
access
|=
KEY_WOW64_64KEY
;
MsiSetInternalUI
(
INSTALLUILEVEL_NONE
,
NULL
);
r
=
MsiInstallProductA
(
msifile
,
"ADDLOCAL=override"
);
if
(
r
==
ERROR_INSTALL_PACKAGE_REJECTED
)
{
...
...
@@ -10646,6 +10659,8 @@ static void test_icon_table(void)
create_database
(
msifile
,
icon_base_tables
,
sizeof
(
icon_base_tables
)
/
sizeof
(
msi_table
));
MsiSetInternalUI
(
INSTALLUILEVEL_NONE
,
NULL
);
res
=
MsiOpenDatabase
(
msifile
,
MSIDBOPEN_TRANSACT
,
&
hdb
);
ok
(
res
==
ERROR_SUCCESS
,
"failed to open db: %d
\n
"
,
res
);
...
...
@@ -10865,7 +10880,7 @@ static void test_package_validation(void)
create_database_template
(
msifile
,
pv_tables
,
sizeof
(
pv_tables
)
/
sizeof
(
msi_table
),
100
,
"x64;0"
);
r
=
MsiInstallProductA
(
msifile
,
NULL
);
ok
(
r
==
ERROR_INSTALL_PACKAGE_INVALID
,
"Expected ERROR_INSTALL_PACKAGE_INVALID,
,
got %u
\n
"
,
r
);
ok
(
r
==
ERROR_INSTALL_PACKAGE_INVALID
,
"Expected ERROR_INSTALL_PACKAGE_INVALID, got %u
\n
"
,
r
);
ok
(
!
delete_pf_native
(
"msitest
\\
maximus"
,
TRUE
),
"file exists
\n
"
);
ok
(
!
delete_pf_native
(
"msitest"
,
FALSE
),
"directory exists
\n
"
);
...
...
dlls/msi/tests/package.c
View file @
0df47126
...
...
@@ -1076,6 +1076,8 @@ static void test_settargetpath(void)
}
ok
(
r
==
ERROR_SUCCESS
,
"failed to create package %u
\n
"
,
r
);
MsiSetInternalUI
(
INSTALLUILEVEL_NONE
,
NULL
);
r
=
MsiDoAction
(
hpkg
,
"CostInitialize"
);
ok
(
r
==
ERROR_SUCCESS
,
"cost init failed
\n
"
);
...
...
@@ -3329,6 +3331,8 @@ static void test_states(void)
ok
(
state
==
INSTALLSTATE_UNKNOWN
,
"Expected INSTALLSTATE_UNKNOWN, got %d
\n
"
,
state
);
ok
(
action
==
INSTALLSTATE_UNKNOWN
,
"Expected INSTALLSTATE_UNKNOWN, got %d
\n
"
,
action
);
MsiSetInternalUI
(
INSTALLUILEVEL_NONE
,
NULL
);
r
=
MsiDoAction
(
hpkg
,
"FileCost"
);
ok
(
r
==
ERROR_SUCCESS
,
"file cost failed
\n
"
);
...
...
@@ -3812,6 +3816,8 @@ static void test_states(void)
MsiCloseHandle
(
hpkg
);
MsiSetInternalUI
(
INSTALLUILEVEL_NONE
,
NULL
);
/* publish the features and components */
r
=
MsiInstallProduct
(
msifile
,
"ADDLOCAL=one,four ADDSOURCE=two,three REMOVE=six,seven REINSTALL=eight,nine,ten"
);
ok
(
r
==
ERROR_SUCCESS
,
"Expected ERROR_SUCCESS, got %d
\n
"
,
r
);
...
...
@@ -7779,6 +7785,8 @@ static void test_removefiles(void)
r
=
MsiSetProperty
(
hpkg
,
"TARGETDIR"
,
CURR_DIR
);
ok
(
r
==
ERROR_SUCCESS
,
"set property failed
\n
"
);
MsiSetInternalUI
(
INSTALLUILEVEL_NONE
,
NULL
);
r
=
MsiDoAction
(
hpkg
,
"CostInitialize"
);
ok
(
r
==
ERROR_SUCCESS
,
"cost init failed
\n
"
);
...
...
@@ -7876,6 +7884,8 @@ static void test_appsearch(void)
if
(
r
!=
ERROR_SUCCESS
)
goto
done
;
MsiSetInternalUI
(
INSTALLUILEVEL_NONE
,
NULL
);
r
=
MsiDoAction
(
hpkg
,
"AppSearch"
);
ok
(
r
==
ERROR_SUCCESS
,
"AppSearch failed: %d
\n
"
,
r
);
...
...
@@ -8086,6 +8096,8 @@ static void test_appsearch_complocator(void)
r
=
MsiSetPropertyA
(
hpkg
,
"SIGPROP8"
,
"october"
);
ok
(
r
==
ERROR_SUCCESS
,
"Expected ERROR_SUCCESS, got %d
\n
"
,
r
);
MsiSetInternalUI
(
INSTALLUILEVEL_NONE
,
NULL
);
r
=
MsiDoAction
(
hpkg
,
"AppSearch"
);
ok
(
r
==
ERROR_SUCCESS
,
"Expected ERROR_SUCCESS, got %d
\n
"
,
r
);
...
...
@@ -8629,6 +8641,8 @@ static void test_appsearch_reglocator(void)
r
=
package_from_db
(
hdb
,
&
hpkg
);
ok
(
r
==
ERROR_SUCCESS
,
"Expected a valid package handle %u
\n
"
,
r
);
MsiSetInternalUI
(
INSTALLUILEVEL_NONE
,
NULL
);
r
=
MsiDoAction
(
hpkg
,
"AppSearch"
);
ok
(
r
==
ERROR_SUCCESS
,
"Expected ERROR_SUCCESS, got %d
\n
"
,
r
);
...
...
@@ -9055,6 +9069,8 @@ static void test_appsearch_inilocator(void)
}
ok
(
r
==
ERROR_SUCCESS
,
"Expected a valid package handle %u
\n
"
,
r
);
MsiSetInternalUI
(
INSTALLUILEVEL_NONE
,
NULL
);
r
=
MsiDoAction
(
hpkg
,
"AppSearch"
);
ok
(
r
==
ERROR_SUCCESS
,
"Expected ERROR_SUCCESS, got %d
\n
"
,
r
);
...
...
@@ -9358,6 +9374,8 @@ static void test_appsearch_drlocator(void)
}
ok
(
r
==
ERROR_SUCCESS
,
"Expected a valid package handle %u
\n
"
,
r
);
MsiSetInternalUI
(
INSTALLUILEVEL_NONE
,
NULL
);
r
=
MsiDoAction
(
hpkg
,
"AppSearch"
);
ok
(
r
==
ERROR_SUCCESS
,
"Expected ERROR_SUCCESS, got %d
\n
"
,
r
);
...
...
@@ -9630,6 +9648,8 @@ static void test_featureparents(void)
MsiCloseHandle
(
hdb
);
MsiSetInternalUI
(
INSTALLUILEVEL_NONE
,
NULL
);
r
=
MsiDoAction
(
hpkg
,
"CostInitialize"
);
ok
(
r
==
ERROR_SUCCESS
,
"cost init failed
\n
"
);
...
...
@@ -10223,6 +10243,8 @@ static void test_launchconditions(void)
r
=
MsiSetProperty
(
hpkg
,
"X"
,
"1"
);
ok
(
r
==
ERROR_SUCCESS
,
"failed to set property
\n
"
);
MsiSetInternalUI
(
INSTALLUILEVEL_NONE
,
NULL
);
/* invalid conditions are ignored */
r
=
MsiDoAction
(
hpkg
,
"LaunchConditions"
);
ok
(
r
==
ERROR_SUCCESS
,
"cost init failed
\n
"
);
...
...
@@ -10245,8 +10267,6 @@ static void test_ccpsearch(void)
DWORD
size
=
MAX_PATH
;
UINT
r
;
MsiSetInternalUI
(
INSTALLUILEVEL_NONE
,
NULL
);
hdb
=
create_package_db
();
ok
(
hdb
,
"failed to create package database
\n
"
);
...
...
@@ -10285,6 +10305,8 @@ static void test_ccpsearch(void)
MsiCloseHandle
(
hdb
);
MsiSetInternalUI
(
INSTALLUILEVEL_NONE
,
NULL
);
r
=
MsiDoAction
(
hpkg
,
"CCPSearch"
);
ok
(
r
==
ERROR_SUCCESS
,
"Expected ERROR_SUCCESS, got %d
\n
"
,
r
);
...
...
@@ -10481,6 +10503,8 @@ static void test_complocator(void)
set_component_path
(
"neosodon"
,
MSIINSTALLCONTEXT_MACHINE
,
"{0B499649-197A-48EF-93D2-AF1C17ED6E90}"
,
NULL
,
FALSE
);
MsiSetInternalUI
(
INSTALLUILEVEL_NONE
,
NULL
);
r
=
MsiDoAction
(
hpkg
,
"AppSearch"
);
ok
(
r
==
ERROR_SUCCESS
,
"Expected ERROR_SUCCESS, got %d
\n
"
,
r
);
...
...
@@ -10787,6 +10811,8 @@ static void test_MsiGetSourcePath(void)
"Expected path to be unchanged, got
\"
%s
\"\n
"
,
path
);
ok
(
size
==
MAX_PATH
,
"Expected size to be unchanged, got %d
\n
"
,
size
);
MsiSetInternalUI
(
INSTALLUILEVEL_NONE
,
NULL
);
r
=
MsiDoAction
(
hpkg
,
"CostInitialize"
);
ok
(
r
==
ERROR_SUCCESS
,
"cost init failed
\n
"
);
...
...
@@ -11429,6 +11455,8 @@ static void test_shortlongsource(void)
CreateDirectoryA
(
"one"
,
NULL
);
CreateDirectoryA
(
"four"
,
NULL
);
MsiSetInternalUI
(
INSTALLUILEVEL_NONE
,
NULL
);
r
=
MsiDoAction
(
hpkg
,
"CostInitialize"
);
ok
(
r
==
ERROR_SUCCESS
,
"file cost failed
\n
"
);
...
...
@@ -11750,6 +11778,8 @@ static void test_sourcedir(void)
ok
(
!
lstrcmpA
(
path
,
""
),
"Expected
\"\"
, got
\"
%s
\"\n
"
,
path
);
ok
(
size
==
0
,
"Expected 0, got %d
\n
"
,
size
);
MsiSetInternalUI
(
INSTALLUILEVEL_NONE
,
NULL
);
r
=
MsiDoAction
(
hpkg
,
"CostInitialize"
);
ok
(
r
==
ERROR_SUCCESS
,
"file cost failed
\n
"
);
...
...
@@ -12168,11 +12198,9 @@ static void test_access(void)
ok
(
r
==
ERROR_SUCCESS
,
"Expected ERROR_SUCCESS, got %d
\n
"
,
r
);
test_file_access
(
msifile
,
create_commit
);
MsiCloseHandle
(
hdb
);
test_file_access
(
msifile
,
create_close
);
DeleteFileA
(
msifile
);
r
=
MsiOpenDatabaseA
(
msifile
,
MSIDBOPEN_CREATEDIRECT
,
&
hdb
);
...
...
@@ -12184,11 +12212,9 @@ static void test_access(void)
ok
(
r
==
ERROR_SUCCESS
,
"Expected ERROR_SUCCESS, got %d
\n
"
,
r
);
test_file_access
(
msifile
,
create_commit
);
MsiCloseHandle
(
hdb
);
test_file_access
(
msifile
,
create_close
);
DeleteFileA
(
msifile
);
}
...
...
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