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
4cc48b77
Commit
4cc48b77
authored
Apr 15, 2007
by
James Hawkins
Committed by
Alexandre Julliard
Apr 16, 2007
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
msi: Add tests for the concurrent installation custom action.
parent
7e6c5aad
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
95 additions
and
4 deletions
+95
-4
install.c
dlls/msi/tests/install.c
+95
-4
No files found.
dlls/msi/tests/install.c
View file @
4cc48b77
...
@@ -316,6 +316,45 @@ static const CHAR cie_media_dat[] = "DiskId\tLastSequence\tDiskPrompt\tCabinet\t
...
@@ -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
"
"2
\t
2
\t\t
test2.cab
\t
DISK2
\t\n
"
"3
\t
12
\t\t
test3.cab
\t
DISK3
\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
typedef
struct
_msi_table
{
{
const
CHAR
*
filename
;
const
CHAR
*
filename
;
...
@@ -451,6 +490,31 @@ static const msi_table cie_tables[] =
...
@@ -451,6 +490,31 @@ static const msi_table cie_tables[] =
ADD_TABLE
(
property
),
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 */
/* cabinet definitions */
/* make the max size large so there is only one cab file */
/* make the max size large so there is only one cab file */
...
@@ -1314,10 +1378,6 @@ static void test_cabisextracted(void)
...
@@ -1314,10 +1378,6 @@ static void test_cabisextracted(void)
create_file
(
"augustus"
,
500
);
create_file
(
"augustus"
,
500
);
create_file
(
"caesar"
,
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
(
"test1.cab"
,
MEDIA_SIZE
,
"maximus
\0
"
);
create_cab_file
(
"test2.cab"
,
MEDIA_SIZE
,
"augustus
\0
"
);
create_cab_file
(
"test2.cab"
,
MEDIA_SIZE
,
"augustus
\0
"
);
create_cab_file
(
"test3.cab"
,
MEDIA_SIZE
,
"caesar
\0
"
);
create_cab_file
(
"test3.cab"
,
MEDIA_SIZE
,
"caesar
\0
"
);
...
@@ -1338,6 +1398,36 @@ static void test_cabisextracted(void)
...
@@ -1338,6 +1398,36 @@ static void test_cabisextracted(void)
DeleteFile
(
msifile
);
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
)
START_TEST
(
install
)
{
{
DWORD
len
;
DWORD
len
;
...
@@ -1366,6 +1456,7 @@ START_TEST(install)
...
@@ -1366,6 +1456,7 @@ START_TEST(install)
test_readonlyfile
();
test_readonlyfile
();
test_setdirproperty
();
test_setdirproperty
();
test_cabisextracted
();
test_cabisextracted
();
test_concurrentinstall
();
SetCurrentDirectoryA
(
prev_path
);
SetCurrentDirectoryA
(
prev_path
);
}
}
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