Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
wine
Manage
Activity
Members
Labels
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Package Registry
Container Registry
Model registry
Operate
Terraform modules
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Alexey Alyaev
wine
Commits
4cc48b77
Commit
4cc48b77
authored
17 years ago
by
James Hawkins
Committed by
Alexandre Julliard
17 years ago
Browse files
Options
Downloads
Patches
Plain Diff
msi: Add tests for the concurrent installation custom action.
parent
7e6c5aad
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
dlls/msi/tests/install.c
+95
-4
95 additions, 4 deletions
dlls/msi/tests/install.c
with
95 additions
and
4 deletions
dlls/msi/tests/install.c
+
95
−
4
View file @
4cc48b77
...
...
@@ -316,6 +316,45 @@ static const CHAR cie_media_dat[] = "DiskId\tLastSequence\tDiskPrompt\tCabinet\t
"2
\t
2
\t\t
test2.cab
\t
DISK2
\t\n
"
"3
\t
12
\t\t
test3.cab
\t
DISK3
\t\n
"
;
static
const
CHAR
ci_install_exec_seq_dat
[]
=
"Action
\t
Condition
\t
Sequence
\n
"
"s72
\t
S255
\t
I2
\n
"
"InstallExecuteSequence
\t
Action
\n
"
"CostFinalize
\t\t
1000
\n
"
"CostInitialize
\t\t
800
\n
"
"FileCost
\t\t
900
\n
"
"InstallFiles
\t\t
4000
\n
"
"InstallServices
\t\t
5000
\n
"
"InstallFinalize
\t\t
6600
\n
"
"InstallInitialize
\t\t
1500
\n
"
"RunInstall
\t\t
1600
\n
"
"InstallValidate
\t\t
1400
\n
"
"LaunchConditions
\t\t
100"
;
static
const
CHAR
ci_custom_action_dat
[]
=
"Action
\t
Type
\t
Source
\t
Target
\t
ISComments
\n
"
"s72
\t
i2
\t
S64
\t
S0
\t
S255
\n
"
"CustomAction
\t
Action
\n
"
"RunInstall
\t
23
\t
msitest
\\
concurrent.msi
\t
MYPROP=[UILevel]
\t\n
"
;
static
const
CHAR
ci_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\t
MSITESTDIR
\t
0
\t
UILevel=5
\t
maximus
\n
"
;
static
const
CHAR
ci2_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
"
"augustus
\t\t
MSITESTDIR
\t
0
\t
UILevel=3 AND MYPROP=5
\t
augustus
\n
"
;
static
const
CHAR
ci2_feature_comp_dat
[]
=
"Feature_
\t
Component_
\n
"
"s38
\t
s72
\n
"
"FeatureComponents
\t
Feature_
\t
Component_
\n
"
"feature
\t
augustus"
;
static
const
CHAR
ci2_file_dat
[]
=
"File
\t
Component_
\t
FileName
\t
FileSize
\t
Version
\t
Language
\t
Attributes
\t
Sequence
\n
"
"s72
\t
s72
\t
l255
\t
i4
\t
S72
\t
S20
\t
I2
\t
i2
\n
"
"File
\t
File
\n
"
"augustus
\t
augustus
\t
augustus
\t
500
\t\t\t
8192
\t
1"
;
typedef
struct
_msi_table
{
const
CHAR
*
filename
;
...
...
@@ -451,6 +490,31 @@ static const msi_table cie_tables[] =
ADD_TABLE
(
property
),
};
static
const
msi_table
ci_tables
[]
=
{
ADD_TABLE
(
ci_component
),
ADD_TABLE
(
directory
),
ADD_TABLE
(
rof_feature
),
ADD_TABLE
(
rof_feature_comp
),
ADD_TABLE
(
rof_file
),
ADD_TABLE
(
ci_install_exec_seq
),
ADD_TABLE
(
rof_media
),
ADD_TABLE
(
property
),
ADD_TABLE
(
ci_custom_action
),
};
static
const
msi_table
ci2_tables
[]
=
{
ADD_TABLE
(
ci2_component
),
ADD_TABLE
(
directory
),
ADD_TABLE
(
rof_feature
),
ADD_TABLE
(
ci2_feature_comp
),
ADD_TABLE
(
ci2_file
),
ADD_TABLE
(
install_exec_seq
),
ADD_TABLE
(
rof_media
),
ADD_TABLE
(
property
),
};
/* cabinet definitions */
/* make the max size large so there is only one cab file */
...
...
@@ -1314,10 +1378,6 @@ static void test_cabisextracted(void)
create_file
(
"augustus"
,
500
);
create_file
(
"caesar"
,
500
);
create_database
(
msifile
,
mm_tables
,
sizeof
(
mm_tables
)
/
sizeof
(
msi_table
));
MsiSetInternalUI
(
INSTALLUILEVEL_NONE
,
NULL
);
create_cab_file
(
"test1.cab"
,
MEDIA_SIZE
,
"maximus
\0
"
);
create_cab_file
(
"test2.cab"
,
MEDIA_SIZE
,
"augustus
\0
"
);
create_cab_file
(
"test3.cab"
,
MEDIA_SIZE
,
"caesar
\0
"
);
...
...
@@ -1338,6 +1398,36 @@ static void test_cabisextracted(void)
DeleteFile
(
msifile
);
}
static
void
test_concurrentinstall
(
void
)
{
UINT
r
;
CHAR
path
[
MAX_PATH
];
CreateDirectoryA
(
"msitest"
,
NULL
);
CreateDirectoryA
(
"msitest
\\
msitest"
,
NULL
);
create_file
(
"msitest
\\
maximus"
,
500
);
create_file
(
"msitest
\\
msitest
\\
augustus"
,
500
);
create_database
(
msifile
,
ci_tables
,
sizeof
(
ci_tables
)
/
sizeof
(
msi_table
));
lstrcpyA
(
path
,
CURR_DIR
);
lstrcatA
(
path
,
"
\\
msitest
\\
concurrent.msi"
);
create_database
(
path
,
ci2_tables
,
sizeof
(
ci2_tables
)
/
sizeof
(
msi_table
));
MsiSetInternalUI
(
INSTALLUILEVEL_FULL
,
NULL
);
r
=
MsiInstallProductA
(
msifile
,
NULL
);
todo_wine
{
ok
(
r
==
ERROR_SUCCESS
,
"Expected ERROR_SUCCESS, got %u
\n
"
,
r
);
ok
(
delete_pf
(
"msitest
\\
maximus"
,
TRUE
),
"File not installed
\n
"
);
ok
(
delete_pf
(
"msitest
\\
augustus"
,
TRUE
),
"File not installed
\n
"
);
ok
(
delete_pf
(
"msitest"
,
FALSE
),
"File not installed
\n
"
);
}
DeleteFile
(
msifile
);
}
START_TEST
(
install
)
{
DWORD
len
;
...
...
@@ -1366,6 +1456,7 @@ START_TEST(install)
test_readonlyfile
();
test_setdirproperty
();
test_cabisextracted
();
test_concurrentinstall
();
SetCurrentDirectoryA
(
prev_path
);
}
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment