msi: Make MsiInstallProduct conformance test depend on proper UI level processing.

Misha Koshelev mk144210 at bcm.tmc.edu
Wed Feb 7 08:30:52 CST 2007


Hi, here is my proposed patch to the current msi MsiInstallProduct
consistency test that will make it's success depend on proper process of
UI flags (as well as everything else it depends on to make a successful
install). It seems to me like this is the simplest way to add this test
(it is only 5-6 lines added total), and it seems fair to me to add it to
this existing test for two reasons:
1. The test is already testing a full product install (installs files,
services, registry values, etc) and my modification will simply result
in either no modification to these actions if UI level processing is
good or complete failure if it is bad, which will make the problem very
easy to diagnose.
2. Looking through instructions on msdn it seems that there isn't a
kosher way to make a very simple MSI file that just, say, writes a
registry value (without doing costing, install validation, having a full
features table, installing some features, etc.) which would make a
separate function easy to implement and it does not really seem
necessary to copy and paste the whole test_MsiInstallProduct (or
similar) function just to check UI level processing.

Changelog:

	* msi: Make MsiInstallProduct conformance test depend on proper UI
level processing.
-------------- next part --------------
From 55b39a67676e2bd8c01c0b17b677298c9d22a46c Mon Sep 17 00:00:00 2001
From: Misha Koshelev <mk144210 at bcm.tmc.edu>
Date: Wed, 7 Feb 2007 08:10:19 -0600
Subject: msi: Make MsiInstallProduct conformance test depend on proper UI level processing.
---
 dlls/msi/tests/install.c |   13 +++++++++++++
 1 files changed, 13 insertions(+), 0 deletions(-)

diff --git a/dlls/msi/tests/install.c b/dlls/msi/tests/install.c
index 00b7763..facd280 100644
--- a/dlls/msi/tests/install.c
+++ b/dlls/msi/tests/install.c
@@ -105,6 +105,12 @@ static const CHAR install_exec_seq_dat[]
                                            "LaunchConditions\t\t100\n"
                                            "WriteRegistryValues\tSourceDir And SOURCEDIR\t5000";
 
+/* as a proper check for INSTALLUILEVEL flags processing, make sure a UI install fails */
+static const CHAR install_ui_seq_dat[] = "Action\tCondition\tSequence\n"
+                                           "s72\tS255\tI2\n"
+                                           "InstallUISequence\tAction\n"
+                                           "AllocateRegistrySpace\tNOT Installed\t1550\n";
+
 static const CHAR media_dat[] = "DiskId\tLastSequence\tDiskPrompt\tCabinet\tVolumeLabel\tSource\n"
                                 "i2\ti4\tL64\tS255\tS32\tS72\n"
                                 "Media\tDiskId\n"
@@ -231,6 +237,7 @@ static const msi_table tables[] =
     ADD_TABLE(feature_comp),
     ADD_TABLE(file),
     ADD_TABLE(install_exec_seq),
+    ADD_TABLE(install_ui_seq),
     ADD_TABLE(media),
     ADD_TABLE(property),
     ADD_TABLE(registry),
@@ -689,6 +696,12 @@ static void test_MsiInstallProduct(void)
     create_test_files();
     create_database(msifile, tables, sizeof(tables) / sizeof(msi_table));
 
+    /* Make sure that the UI level flags are taken into account when determining whether to
+     * start a graphical UI or execute only mode (bug 6992). If the full UI is started (incorrectly)
+     * the InstallUISequence table will be used, and the install will fail. If the full UI is
+     * not started (correctly) the InstallExecuteSequence table will be used. */
+    MsiSetInternalUI(INSTALLUILEVEL_NONE | INSTALLUILEVEL_SOURCERESONLY, NULL);
+
     r = MsiInstallProductA(msifile, NULL);
     ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %u\n", r);
 
-- 
1.4.1



More information about the wine-patches mailing list