From 38d85261d5a64f97d6260b5bf07d101711ca9ed9 Mon Sep 17 00:00:00 2001 From: Sean Hall Date: Thu, 7 Nov 2019 15:27:31 +1000 Subject: Update PopulatesCustomActionTable to verify scheduling of a custom action. --- .../MsiQueryFixture.cs | 69 ++++++++++++++++++++-- .../CustomAction/UnscheduledCustomAction.wxs | 16 +++++ 2 files changed, 80 insertions(+), 5 deletions(-) diff --git a/src/test/WixToolsetTest.CoreIntegration/MsiQueryFixture.cs b/src/test/WixToolsetTest.CoreIntegration/MsiQueryFixture.cs index 52f57297..2a36e11c 100644 --- a/src/test/WixToolsetTest.CoreIntegration/MsiQueryFixture.cs +++ b/src/test/WixToolsetTest.CoreIntegration/MsiQueryFixture.cs @@ -252,7 +252,7 @@ namespace WixToolsetTest.CoreIntegration } } - [Fact] + [Fact(Skip = "Test demonstrates failure")] public void PopulatesCustomActionTable() { var folder = TestData.Get(@"TestData"); @@ -277,17 +277,76 @@ namespace WixToolsetTest.CoreIntegration result.AssertSuccess(); Assert.True(File.Exists(msiPath)); - var results = Query.QueryDatabase(msiPath, new[] { "Binary", "CustomAction" }); + var results = Query.QueryDatabase(msiPath, new[] { + "AdminExecuteSequence", + "AdminUISequence", + "AdvtExecuteSequence", + "Binary", + "CustomAction", + "InstallExecuteSequence", + "InstallUISequence", + "Property", + }).Where(x => !x.StartsWith("Property:") || x.StartsWith("Property:MsiHiddenProperties\t")).ToArray(); Assert.Equal(new[] { + "AdminExecuteSequence:CostFinalize\t\t1000", + "AdminExecuteSequence:CostInitialize\t\t800", + "AdminExecuteSequence:CustomAction2\t\t801", + "AdminExecuteSequence:FileCost\t\t900", + "AdminExecuteSequence:InstallAdminPackage\t\t3900", + "AdminExecuteSequence:InstallFiles\t\t4000", + "AdminExecuteSequence:InstallFinalize\t\t6600", + "AdminExecuteSequence:InstallInitialize\t\t1500", + "AdminExecuteSequence:InstallValidate\t\t1400", + "AdminUISequence:CostFinalize\t\t1000", + "AdminUISequence:CostInitialize\t\t800", + "AdminUISequence:CustomAction2\t\t801", + "AdminUISequence:ExecuteAction\t\t1300", + "AdminUISequence:FileCost\t\t900", + "AdvtExecuteSequence:CostFinalize\t\t1000", + "AdvtExecuteSequence:CostInitialize\t\t800", + "AdvtExecuteSequence:CustomAction2\t\t801", + "AdvtExecuteSequence:InstallFinalize\t\t6600", + "AdvtExecuteSequence:InstallInitialize\t\t1500", + "AdvtExecuteSequence:InstallValidate\t\t1400", + "AdvtExecuteSequence:PublishFeatures\t\t6300", + "AdvtExecuteSequence:PublishProduct\t\t6400", "Binary:Binary1\t[Binary data]", "CustomAction:CustomAction1\t1\tBinary1\tInvalidEntryPoint\t", + "CustomAction:CustomAction2\t51\tTestAdvtExecuteSequenceProperty\t1\t", "CustomAction:CustomActionWithHiddenTarget\t9217\tBinary1\tInvalidEntryPoint\t", "CustomAction:DiscardOptimismAllBeingsWhoProceed\t19\t\tAbandon hope all ye who enter here.\t", + "InstallExecuteSequence:CostFinalize\t\t1000", + "InstallExecuteSequence:CostInitialize\t\t800", + "InstallExecuteSequence:CustomAction2\t\t801", + "InstallExecuteSequence:FileCost\t\t900", + "InstallExecuteSequence:FindRelatedProducts\t\t25", + "InstallExecuteSequence:InstallFiles\t\t4000", + "InstallExecuteSequence:InstallFinalize\t\t6600", + "InstallExecuteSequence:InstallInitialize\t\t1500", + "InstallExecuteSequence:InstallValidate\t\t1400", + "InstallExecuteSequence:LaunchConditions\t\t100", + "InstallExecuteSequence:MigrateFeatureStates\t\t1200", + "InstallExecuteSequence:ProcessComponents\t\t1600", + "InstallExecuteSequence:PublishFeatures\t\t6300", + "InstallExecuteSequence:PublishProduct\t\t6400", + "InstallExecuteSequence:RegisterProduct\t\t6100", + "InstallExecuteSequence:RegisterUser\t\t6000", + "InstallExecuteSequence:RemoveExistingProducts\t\t1401", + "InstallExecuteSequence:RemoveFiles\t\t3500", + "InstallExecuteSequence:UnpublishFeatures\t\t1800", + "InstallExecuteSequence:ValidateProductID\t\t700", + "InstallUISequence:CostFinalize\t\t1000", + "InstallUISequence:CostInitialize\t\t800", + "InstallUISequence:CustomAction2\t\t801", + "InstallUISequence:ExecuteAction\t\t1300", + "InstallUISequence:FileCost\t\t900", + "InstallUISequence:FindRelatedProducts\t\t25", + "InstallUISequence:LaunchConditions\t\t100", + "InstallUISequence:MigrateFeatureStates\t\t1200", + "InstallUISequence:ValidateProductID\t\t700", + "Property:MsiHiddenProperties\tCustomActionWithHiddenTarget", }, results); - var properties = Query.QueryDatabase(msiPath, new[] { "Property" }); - var hiddenProperties = properties.Where(q => q.StartsWith("Property:MsiHiddenProperties")).Single(); - Assert.Equal("Property:MsiHiddenProperties\tCustomActionWithHiddenTarget", hiddenProperties); } } diff --git a/src/test/WixToolsetTest.CoreIntegration/TestData/CustomAction/UnscheduledCustomAction.wxs b/src/test/WixToolsetTest.CoreIntegration/TestData/CustomAction/UnscheduledCustomAction.wxs index 00ac2810..780529d6 100644 --- a/src/test/WixToolsetTest.CoreIntegration/TestData/CustomAction/UnscheduledCustomAction.wxs +++ b/src/test/WixToolsetTest.CoreIntegration/TestData/CustomAction/UnscheduledCustomAction.wxs @@ -9,5 +9,21 @@ + + + + + + + + + + + + + + + + -- cgit v1.2.3-55-g6feb