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
35bdf018
Commit
35bdf018
authored
Jan 10, 2011
by
Hans Leidekker
Committed by
Alexandre Julliard
Jan 10, 2011
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
msi/tests: Add tests for publishing and unpublishing assemblies.
parent
f6c46e41
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
229 additions
and
0 deletions
+229
-0
action.c
dlls/msi/tests/action.c
+229
-0
No files found.
dlls/msi/tests/action.c
View file @
35bdf018
...
...
@@ -1361,6 +1361,95 @@ static const char rmi_install_exec_seq_dat[] =
"PublishProduct
\t\t
5200
\n
"
"InstallFinalize
\t\t
6000
\n
"
;
static
const
char
pa_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
"
"win32.txt
\t
win32
\t
win32.txt
\t
1000
\t\t\t
8192
\t
1
\n
"
"manifest.txt
\t
win32
\t
manifest.txt
\t
1000
\t\t\t
8192
\t
1
\n
"
"win32_local.txt
\t
win32_local
\t
win32_local.txt
\t
1000
\t\t\t
8192
\t
1
\n
"
"manifest_local.txt
\t
win32_local
\t
manifest_local.txt
\t
1000
\t\t\t
8192
\t
1
\n
"
"dotnet.txt
\t
dotnet
\t
dotnet.txt
\t
1000
\t\t\t
8192
\t
1
\n
"
"dotnet_local.txt
\t
dotnet_local
\t
dotnet_local.txt
\t
1000
\t\t\t
8192
\t
1
\n
"
"application_win32.txt
\t
win32_local
\t
application_win32.txt
\t
1000
\t\t\t
8192
\t
1
\n
"
"application_dotnet.txt
\t
dotnet_local
\t
application_dotnet.txt
\t
1000
\t\t\t
8192
\t
1
\n
"
;
static
const
char
pa_feature_dat
[]
=
"Feature
\t
Feature_Parent
\t
Title
\t
Description
\t
Display
\t
Level
\t
Directory_
\t
Attributes
\n
"
"s38
\t
S38
\t
L64
\t
L255
\t
I2
\t
i2
\t
S72
\t
i2
\n
"
"Feature
\t
Feature
\n
"
"assembly
\t\t\t
assembly feature
\t
1
\t
2
\t
MSITESTDIR
\t
0
\n
"
;
static
const
char
pa_feature_comp_dat
[]
=
"Feature_
\t
Component_
\n
"
"s38
\t
s72
\n
"
"FeatureComponents
\t
Feature_
\t
Component_
\n
"
"assembly
\t
win32
\n
"
"assembly
\t
win32_local
\n
"
"assembly
\t
dotnet
\n
"
"assembly
\t
dotnet_local
\n
"
;
static
const
char
pa_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
"
"win32
\t
{F515549E-7E61-425D-AAC1-9BEF2E066D06}
\t
MSITESTDIR
\t
0
\t\t
win32.txt
\n
"
"win32_local
\t
{D34D3FBA-6789-4E57-AD1A-1281297DC201}
\t
MSITESTDIR
\t
0
\t\t
win32_local.txt
\n
"
"dotnet
\t
{8943164F-2B31-4C09-A894-493A8CBDE0A4}
\t
MSITESTDIR
\t
0
\t\t
dotnet.txt
\n
"
"dotnet_local
\t
{4E8567E8-8EAE-4E36-90F1-B99D33C663F8}
\t
MSITESTDIR
\t
0
\t\t
dotnet_local.txt
\n
"
;
static
const
char
pa_msi_assembly_dat
[]
=
"Component_
\t
Feature_
\t
File_Manifest
\t
File_Application
\t
Attributes
\n
"
"s72
\t
s38
\t
S72
\t
S72
\t
I2
\n
"
"MsiAssembly
\t
Component_
\n
"
"win32
\t
assembly
\t
manifest.txt
\t\t
1
\n
"
"win32_local
\t
assembly
\t
manifest_local.txt
\t
application_win32.txt
\t
1
\n
"
"dotnet
\t
assembly
\t\t\t
0
\n
"
"dotnet_local
\t
assembly
\t\t
application_dotnet.txt
\t
0
\n
"
;
static
const
char
pa_msi_assembly_name_dat
[]
=
"Component_
\t
Name
\t
Value
\n
"
"s72
\t
s255
\t
s255
\n
"
"MsiAssemblyName
\t
Component_
\t
Name
\n
"
"win32
\t
Name
\t
Wine.Win32.Assembly
\n
"
"win32
\t
processorArchitecture
\t
x86
\n
"
"win32
\t
publicKeyToken
\t
abcdef0123456789
\n
"
"win32
\t
type
\t
win32
\n
"
"win32
\t
version
\t
1.0.0.0
\n
"
"win32_local
\t
Name
\t
Wine.Win32.Local.Assembly
\n
"
"win32_local
\t
processorArchitecture
\t
x86
\n
"
"win32_local
\t
publicKeyToken
\t
abcdef0123456789
\n
"
"win32_local
\t
type
\t
win32
\n
"
"win32_local
\t
version
\t
1.0.0.0
\n
"
"dotnet
\t
Name
\t
Wine.Dotnet.Assembly
\n
"
"dotnet
\t
processorArchitecture
\t
MSIL
\n
"
"dotnet
\t
publicKeyToken
\t
abcdef0123456789
\n
"
"dotnet
\t
culture
\t
neutral
\n
"
"dotnet
\t
version
\t
1.0.0.0
\n
"
"dotnet_local
\t
Name
\t
Wine.Dotnet.Local.Assembly
\n
"
"dotnet_local
\t
processorArchitecture
\t
MSIL
\n
"
"dotnet_local
\t
publicKeyToken
\t
abcdef0123456789
\n
"
"dotnet_local
\t
culture
\t
neutral
\n
"
"dotnet_local
\t
version
\t
1.0.0.0
\n
"
;
static
const
char
pa_install_exec_seq_dat
[]
=
"Action
\t
Condition
\t
Sequence
\n
"
"s72
\t
S255
\t
I2
\n
"
"InstallExecuteSequence
\t
Action
\n
"
"LaunchConditions
\t\t
100
\n
"
"CostInitialize
\t\t
800
\n
"
"FileCost
\t\t
900
\n
"
"CostFinalize
\t\t
1000
\n
"
"InstallValidate
\t\t
1400
\n
"
"InstallInitialize
\t\t
1500
\n
"
"ProcessComponents
\t\t
1600
\n
"
"MsiPublishAssemblies
\t\t
3000
\n
"
"MsiUnpublishAssemblies
\t\t
4000
\n
"
"RegisterProduct
\t\t
5000
\n
"
"PublishFeatures
\t\t
5100
\n
"
"PublishProduct
\t\t
5200
\n
"
"InstallFinalize
\t\t
6000
\n
"
;
typedef
struct
_msi_table
{
const
char
*
filename
;
...
...
@@ -1704,6 +1793,20 @@ static const msi_table rmi_tables[] =
ADD_TABLE
(
property
)
};
static
const
msi_table
pa_tables
[]
=
{
ADD_TABLE
(
directory
),
ADD_TABLE
(
pa_component
),
ADD_TABLE
(
pa_feature
),
ADD_TABLE
(
pa_feature_comp
),
ADD_TABLE
(
pa_file
),
ADD_TABLE
(
pa_msi_assembly
),
ADD_TABLE
(
pa_msi_assembly_name
),
ADD_TABLE
(
pa_install_exec_seq
),
ADD_TABLE
(
media
),
ADD_TABLE
(
property
)
};
/* cabinet definitions */
/* make the max size large so there is only one cab file */
...
...
@@ -5711,6 +5814,131 @@ error:
DeleteFile
(
msifile
);
}
static
void
test_publish_assemblies
(
void
)
{
static
const
char
manifest
[]
=
"<assemblyIdentity type=
\"
win32
\"
name=
\"
Wine.Win32.Assembly
\"
"
"version=
\"
1.0.0.0
\"
publicKeyToken=
\"
abcdef0123456789
\"
"
"processorArchitecture=
\"
x86
\"
/>"
;
static
const
char
manifest_local
[]
=
"<assemblyIdentity type=
\"
win32
\"
name=
\"
Wine.Win32.Local.Assembly
\"
"
"version=
\"
1.0.0.0
\"
publicKeyToken=
\"
abcdef0123456789
\"
"
"processorArchitecture=
\"
x86
\"
/>"
;
static
const
char
path_dotnet
[]
=
"Software
\\
Microsoft
\\
Installer
\\
Assemblies
\\
Global"
;
static
const
char
path_dotnet_local
[]
=
"Software
\\
Microsoft
\\
Installer
\\
Assemblies
\\
C:|Program Files|msitest|application_dotnet.txt"
;
static
const
char
path_dotnet_local_wow64
[]
=
"Software
\\
Microsoft
\\
Installer
\\
Assemblies
\\
C:|Program Files (x86)|msitest|application_dotnet.txt"
;
static
const
char
path_win32
[]
=
"Software
\\
Microsoft
\\
Installer
\\
Win32Assemblies
\\
Global"
;
static
const
char
path_win32_local
[]
=
"Software
\\
Microsoft
\\
Installer
\\
Win32Assemblies
\\
C:|Program Files|msitest|application_win32.txt"
;
static
const
char
path_win32_local_wow64
[]
=
"Software
\\
Microsoft
\\
Installer
\\
Win32Assemblies
\\
C:|Program Files (x86)|msitest|application_win32.txt"
;
static
const
char
name_dotnet
[]
=
"Wine.Dotnet.Assembly,processorArchitecture=
\"
MSIL
\"
,publicKeyToken=
\"
abcdef0123456789
\"
,"
"version=
\"
1.0.0.0
\"
,culture=
\"
neutral
\"
"
;
static
const
char
name_dotnet_local
[]
=
"Wine.Dotnet.Local.Assembly,processorArchitecture=
\"
MSIL
\"
,publicKeyToken=
\"
abcdef0123456789
\"
,"
"version=
\"
1.0.0.0
\"
,culture=
\"
neutral
\"
"
;
static
const
char
name_win32
[]
=
"Wine.Win32.Assembly,processorArchitecture=
\"
x86
\"
,publicKeyToken=
\"
abcdef0123456789
\"
,"
"type=
\"
win32
\"
,version=
\"
1.0.0.0
\"
"
;
static
const
char
name_win32_local
[]
=
"Wine.Win32.Local.Assembly,processorArchitecture=
\"
x86
\"
,publicKeyToken=
\"
abcdef0123456789
\"
,"
"type=
\"
win32
\"
,version=
\"
1.0.0.0
\"
"
;
UINT
r
;
LONG
res
;
HKEY
hkey
;
const
char
*
path
;
if
(
is_process_limited
())
{
skip
(
"process is limited
\n
"
);
return
;
}
create_test_files
();
create_file
(
"msitest
\\
win32.txt"
,
1000
);
create_file
(
"msitest
\\
win32_local.txt"
,
1000
);
create_file
(
"msitest
\\
dotnet.txt"
,
1000
);
create_file
(
"msitest
\\
dotnet_local.txt"
,
1000
);
create_file_data
(
"msitest
\\
manifest.txt"
,
manifest
,
0
);
create_file_data
(
"msitest
\\
manifest_local.txt"
,
manifest_local
,
0
);
create_file
(
"msitest
\\
application_win32.txt"
,
1000
);
create_file
(
"msitest
\\
application_dotnet.txt"
,
1000
);
create_database
(
msifile
,
pa_tables
,
sizeof
(
pa_tables
)
/
sizeof
(
msi_table
));
MsiSetInternalUI
(
INSTALLUILEVEL_NONE
,
NULL
);
r
=
MsiInstallProductA
(
msifile
,
NULL
);
if
(
r
==
ERROR_INSTALL_PACKAGE_REJECTED
)
{
skip
(
"Not enough rights to perform tests
\n
"
);
goto
done
;
}
if
(
r
==
ERROR_INSTALL_FAILURE
)
{
skip
(
"No support for installing side-by-side assemblies
\n
"
);
goto
done
;
}
ok
(
r
==
ERROR_SUCCESS
,
"Expected ERROR_SUCCESS, got %u
\n
"
,
r
);
todo_wine
{
res
=
RegOpenKeyA
(
HKEY_CURRENT_USER
,
path_dotnet
,
&
hkey
);
ok
(
res
==
ERROR_SUCCESS
,
"Expected ERROR_SUCCESS, got %d
\n
"
,
res
);
CHECK_REG_STR
(
hkey
,
name_dotnet
,
"rcHQPHq?CA@Uv-XqMI1e>Z'q,T*76M@=YEg6My?~]"
);
RegCloseKey
(
hkey
);
path
=
(
is_wow64
||
is_64bit
)
?
path_dotnet_local_wow64
:
path_dotnet_local
;
res
=
RegOpenKeyA
(
HKEY_CURRENT_USER
,
path
,
&
hkey
);
ok
(
res
==
ERROR_SUCCESS
,
"Expected ERROR_SUCCESS, got %d
\n
"
,
res
);
CHECK_REG_STR
(
hkey
,
name_dotnet_local
,
"rcHQPHq?CA@Uv-XqMI1e>LF,8A?0d.AW@vcZ$Cgox"
);
RegCloseKey
(
hkey
);
res
=
RegOpenKeyA
(
HKEY_CURRENT_USER
,
path_win32
,
&
hkey
);
ok
(
res
==
ERROR_SUCCESS
,
"Expected ERROR_SUCCESS, got %d
\n
"
,
res
);
CHECK_REG_STR
(
hkey
,
name_win32
,
"rcHQPHq?CA@Uv-XqMI1e>}NJjwR'%D9v1p!v{WV(%"
);
RegCloseKey
(
hkey
);
path
=
(
is_wow64
||
is_64bit
)
?
path_win32_local_wow64
:
path_win32_local
;
res
=
RegOpenKeyA
(
HKEY_CURRENT_USER
,
path
,
&
hkey
);
ok
(
res
==
ERROR_SUCCESS
,
"Expected ERROR_SUCCESS, got %d
\n
"
,
res
);
CHECK_REG_STR
(
hkey
,
name_win32_local
,
"rcHQPHq?CA@Uv-XqMI1e>C)Uvlj*53A)u(QQ9=)X!"
);
RegCloseKey
(
hkey
);
}
r
=
MsiInstallProductA
(
msifile
,
"REMOVE=ALL"
);
ok
(
r
==
ERROR_SUCCESS
,
"Expected ERROR_SUCCESS, got %u
\n
"
,
r
);
res
=
RegOpenKeyA
(
HKEY_CURRENT_USER
,
path_dotnet
,
&
hkey
);
ok
(
res
==
ERROR_FILE_NOT_FOUND
,
"Expected ERROR_FILE_NOT_FOUND, got %d
\n
"
,
res
);
path
=
(
is_wow64
||
is_64bit
)
?
path_dotnet_local_wow64
:
path_dotnet_local
;
res
=
RegOpenKeyA
(
HKEY_CURRENT_USER
,
path
,
&
hkey
);
ok
(
res
==
ERROR_FILE_NOT_FOUND
,
"Expected ERROR_FILE_NOT_FOUND, got %d
\n
"
,
res
);
res
=
RegOpenKeyA
(
HKEY_CURRENT_USER
,
path_win32
,
&
hkey
);
ok
(
res
==
ERROR_FILE_NOT_FOUND
,
"Expected ERROR_FILE_NOT_FOUND, got %d
\n
"
,
res
);
path
=
(
is_wow64
||
is_64bit
)
?
path_win32_local_wow64
:
path_win32_local
;
res
=
RegOpenKeyA
(
HKEY_CURRENT_USER
,
path
,
&
hkey
);
ok
(
res
==
ERROR_FILE_NOT_FOUND
,
"Expected ERROR_FILE_NOT_FOUND, got %d
\n
"
,
res
);
done:
DeleteFileA
(
"msitest
\\
win32.txt"
);
DeleteFileA
(
"msitest
\\
win32_local.txt"
);
DeleteFileA
(
"msitest
\\
dotnet.txt"
);
DeleteFileA
(
"msitest
\\
dotnet_local.txt"
);
DeleteFileA
(
"msitest
\\
manifest.txt"
);
DeleteFileA
(
"msitest
\\
manifest_local.txt"
);
DeleteFileA
(
"msitest
\\
application_win32.txt"
);
DeleteFileA
(
"msitest
\\
application_dotnet.txt"
);
delete_test_files
();
DeleteFile
(
msifile
);
}
START_TEST
(
action
)
{
DWORD
len
;
...
...
@@ -5789,6 +6017,7 @@ START_TEST(action)
test_register_class_info
();
test_register_extension_info
();
test_register_mime_info
();
test_publish_assemblies
();
DeleteFileA
(
log_file
);
...
...
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