[PATCH 3/5] msi/tests: Test deferral of ProcessComponents.
Zebediah Figura
z.figura12 at gmail.com
Tue May 22 18:39:26 CDT 2018
Signed-off-by: Zebediah Figura <z.figura12 at gmail.com>
---
dlls/msi/tests/action.c | 10 ++++++++++
dlls/msi/tests/custom.c | 32 ++++++++++++++++++++++++++++++++
dlls/msi/tests/custom.spec | 2 ++
3 files changed, 44 insertions(+)
diff --git a/dlls/msi/tests/action.c b/dlls/msi/tests/action.c
index bd1e2c0..17bbddc 100644
--- a/dlls/msi/tests/action.c
+++ b/dlls/msi/tests/action.c
@@ -396,6 +396,8 @@ static const char pp_install_exec_seq_dat[] =
"InstallValidate\t\t1400\n"
"InstallInitialize\t\t1500\n"
"ProcessComponents\tPROCESS_COMPONENTS=1 Or FULL=1\t1600\n"
+ "ppc_immediate\tPROCESS_COMPONENTS AND ALLUSERS\t1601\n"
+ "ppc_deferred\tPROCESS_COMPONENTS AND ALLUSERS\t1602\n"
"UnpublishFeatures\tUNPUBLISH_FEATURES=1 Or FULL=1\t1800\n"
"RemoveFiles\t\t3500\n"
"InstallFiles\t\t4000\n"
@@ -405,6 +407,13 @@ static const char pp_install_exec_seq_dat[] =
"PublishProduct\tPUBLISH_PRODUCT=1 Or FULL=1\t6400\n"
"InstallFinalize\t\t6600";
+static const char pp_custom_action_dat[] =
+ "Action\tType\tSource\tTarget\n"
+ "s72\ti2\tS64\tS0\n"
+ "CustomAction\tAction\n"
+ "ppc_immediate\t1\tcustom.dll\tppc_absent\n"
+ "ppc_deferred\t1025\tcustom.dll\tppc_present\n";
+
static const char pp_component_dat[] =
"Component\tComponentId\tDirectory_\tAttributes\tCondition\tKeyPath\n"
"s72\tS38\ts72\ti2\tS255\tS72\n"
@@ -1855,6 +1864,7 @@ static const msi_table ppc_tables[] =
ADD_TABLE(ppc_feature_comp),
ADD_TABLE(ppc_file),
ADD_TABLE(pp_install_exec_seq),
+ ADD_TABLE(pp_custom_action),
ADD_TABLE(ppc_media),
ADD_TABLE(property),
};
diff --git a/dlls/msi/tests/custom.c b/dlls/msi/tests/custom.c
index c37309e..0271384 100644
--- a/dlls/msi/tests/custom.c
+++ b/dlls/msi/tests/custom.c
@@ -1432,3 +1432,35 @@ todo_wine_if(!MsiGetMode(hinst, MSIRUNMODE_SCHEDULED))
}
return ERROR_SUCCESS;
}
+
+static const char ppc_key[] = "Software\\Microsoft\\Windows\\CurrentVersion\\"
+ "Installer\\UserData\\S-1-5-18\\Components\\CBABC2FDCCB35E749A8944D8C1C098B5";
+
+UINT WINAPI ppc_present(MSIHANDLE hinst)
+{
+ char expect[MAX_PATH];
+ HKEY key;
+ UINT r;
+
+ r = RegOpenKeyExA(HKEY_LOCAL_MACHINE, ppc_key, 0, KEY_QUERY_VALUE | KEY_WOW64_64KEY, &key);
+ ok(hinst, !r, "got %u\n", r);
+
+ if (FAILED(SHGetFolderPathA(NULL, CSIDL_PROGRAM_FILESX86, NULL, 0, expect)))
+ SHGetFolderPathA(NULL, CSIDL_PROGRAM_FILES, NULL, 0, expect);
+ strcat(expect, "\\msitest\\maximus");
+ check_reg_str(hinst, key, "84A88FD7F6998CE40A22FB59F6B9C2BB", expect);
+
+ RegCloseKey(key);
+ return ERROR_SUCCESS;
+}
+
+UINT WINAPI ppc_absent(MSIHANDLE hinst)
+{
+ HKEY key;
+ UINT r;
+
+ r = RegOpenKeyExA(HKEY_LOCAL_MACHINE, ppc_key, 0, KEY_QUERY_VALUE | KEY_WOW64_64KEY, &key);
+todo_wine
+ ok(hinst, r == ERROR_FILE_NOT_FOUND, "got %u\n", r);
+ return ERROR_SUCCESS;
+}
diff --git a/dlls/msi/tests/custom.spec b/dlls/msi/tests/custom.spec
index e5caa76..3b73765 100644
--- a/dlls/msi/tests/custom.spec
+++ b/dlls/msi/tests/custom.spec
@@ -15,6 +15,8 @@
@ stdcall odbc_absent(long)
@ stdcall pa_present(long)
@ stdcall pa_absent(long)
+@ stdcall ppc_present(long)
+@ stdcall ppc_absent(long)
@ stdcall rd_present(long)
@ stdcall rd_absent(long)
@ stdcall sds_present(long)
--
2.7.4
More information about the wine-devel
mailing list