aboutsummaryrefslogtreecommitdiff
path: root/src/test
diff options
context:
space:
mode:
authorSean Hall <r.sean.hall@gmail.com>2019-09-30 12:09:20 +1000
committerSean Hall <r.sean.hall@gmail.com>2019-09-30 13:14:35 +1000
commite115df736067e5d765350f5335b1766663d91a9b (patch)
tree88af500f29ba8cbda659e7595886289a348a0279 /src/test
parent6e691be7e8276b3a44a6631d7da8b3e09c8b103d (diff)
downloadwix-e115df736067e5d765350f5335b1766663d91a9b.tar.gz
wix-e115df736067e5d765350f5335b1766663d91a9b.tar.bz2
wix-e115df736067e5d765350f5335b1766663d91a9b.zip
Add failing test for ServiceInstall.
Diffstat (limited to 'src/test')
-rw-r--r--src/test/WixToolsetTest.CoreIntegration/MsiQueryFixture.cs33
-rw-r--r--src/test/WixToolsetTest.CoreIntegration/TestData/ServiceInstall/OwnProcess.wxs11
-rw-r--r--src/test/WixToolsetTest.CoreIntegration/WixToolsetTest.CoreIntegration.csproj1
3 files changed, 45 insertions, 0 deletions
diff --git a/src/test/WixToolsetTest.CoreIntegration/MsiQueryFixture.cs b/src/test/WixToolsetTest.CoreIntegration/MsiQueryFixture.cs
index 2c064a58..826d8985 100644
--- a/src/test/WixToolsetTest.CoreIntegration/MsiQueryFixture.cs
+++ b/src/test/WixToolsetTest.CoreIntegration/MsiQueryFixture.cs
@@ -514,6 +514,39 @@ namespace WixToolsetTest.CoreIntegration
514 } 514 }
515 515
516 [Fact(Skip = "Test demonstrates failure")] 516 [Fact(Skip = "Test demonstrates failure")]
517 public void PopulatesServiceInstallTable()
518 {
519 var folder = TestData.Get(@"TestData");
520
521 using (var fs = new DisposableFileSystem())
522 {
523 var baseFolder = fs.GetFolder();
524 var intermediateFolder = Path.Combine(baseFolder, "obj");
525 var msiPath = Path.Combine(baseFolder, @"bin\test.msi");
526
527 var result = WixRunner.Execute(new[]
528 {
529 "build",
530 Path.Combine(folder, "ServiceInstall", "OwnProcess.wxs"),
531 Path.Combine(folder, "ProductWithComponentGroupRef", "MinimalComponentGroup.wxs"),
532 Path.Combine(folder, "ProductWithComponentGroupRef", "Product.wxs"),
533 "-bindpath", Path.Combine(folder, "SingleFile", "data"),
534 "-intermediateFolder", intermediateFolder,
535 "-o", msiPath
536 });
537
538 result.AssertSuccess();
539
540 Assert.True(File.Exists(msiPath));
541 var results = Query.QueryDatabase(msiPath, new[] { "ServiceInstall" });
542 Assert.Equal(new[]
543 {
544 "ServiceInstall:SampleService\tSampleService\t\t16\t4\t0\t\t\t\t\t\ttest.txt\t",
545 }, results);
546 }
547 }
548
549 [Fact(Skip = "Test demonstrates failure")]
517 public void PopulatesUpgradeTableFromManualUpgrade() 550 public void PopulatesUpgradeTableFromManualUpgrade()
518 { 551 {
519 var folder = TestData.Get(@"TestData\ManualUpgrade"); 552 var folder = TestData.Get(@"TestData\ManualUpgrade");
diff --git a/src/test/WixToolsetTest.CoreIntegration/TestData/ServiceInstall/OwnProcess.wxs b/src/test/WixToolsetTest.CoreIntegration/TestData/ServiceInstall/OwnProcess.wxs
new file mode 100644
index 00000000..f308335e
--- /dev/null
+++ b/src/test/WixToolsetTest.CoreIntegration/TestData/ServiceInstall/OwnProcess.wxs
@@ -0,0 +1,11 @@
1<?xml version="1.0" encoding="utf-8"?>
2<Wix xmlns="http://wixtoolset.org/schemas/v4/wxs">
3 <Fragment>
4 <ComponentGroup Id="ProductComponents">
5 <Component Directory="INSTALLFOLDER">
6 <File Source="test.txt" />
7 <ServiceInstall Name="SampleService" ErrorControl="ignore" Start="disabled" Type="ownProcess"></ServiceInstall>
8 </Component>
9 </ComponentGroup>
10 </Fragment>
11</Wix>
diff --git a/src/test/WixToolsetTest.CoreIntegration/WixToolsetTest.CoreIntegration.csproj b/src/test/WixToolsetTest.CoreIntegration/WixToolsetTest.CoreIntegration.csproj
index fce9b05b..a5eadae3 100644
--- a/src/test/WixToolsetTest.CoreIntegration/WixToolsetTest.CoreIntegration.csproj
+++ b/src/test/WixToolsetTest.CoreIntegration/WixToolsetTest.CoreIntegration.csproj
@@ -29,6 +29,7 @@
29 <Content Include="TestData\ProductWithComponentGroupRef\MinimalComponentGroup.wxs" CopyToOutputDirectory="PreserveNewest" /> 29 <Content Include="TestData\ProductWithComponentGroupRef\MinimalComponentGroup.wxs" CopyToOutputDirectory="PreserveNewest" />
30 <Content Include="TestData\ProductWithComponentGroupRef\Product.wxs" CopyToOutputDirectory="PreserveNewest" /> 30 <Content Include="TestData\ProductWithComponentGroupRef\Product.wxs" CopyToOutputDirectory="PreserveNewest" />
31 <Content Include="TestData\ReserveCost\ReserveCost.wxs" CopyToOutputDirectory="PreserveNewest" /> 31 <Content Include="TestData\ReserveCost\ReserveCost.wxs" CopyToOutputDirectory="PreserveNewest" />
32 <Content Include="TestData\ServiceInstall\OwnProcess.wxs" CopyToOutputDirectory="PreserveNewest" />
32 <Content Include="TestData\Shortcut\ShortcutProperty.wxs" CopyToOutputDirectory="PreserveNewest" /> 33 <Content Include="TestData\Shortcut\ShortcutProperty.wxs" CopyToOutputDirectory="PreserveNewest" />
33 <Content Include="TestData\SimpleModule\data\test.txt" CopyToOutputDirectory="PreserveNewest" /> 34 <Content Include="TestData\SimpleModule\data\test.txt" CopyToOutputDirectory="PreserveNewest" />
34 <Content Include="TestData\SimpleModule\Module.en-us.wxl" CopyToOutputDirectory="PreserveNewest" /> 35 <Content Include="TestData\SimpleModule\Module.en-us.wxl" CopyToOutputDirectory="PreserveNewest" />