diff options
| author | Sean Hall <r.sean.hall@gmail.com> | 2020-04-23 08:33:03 +1000 |
|---|---|---|
| committer | Sean Hall <r.sean.hall@gmail.com> | 2020-04-23 12:39:32 +1000 |
| commit | 2d23530fde970972c927680ee3df6466538ae8ca (patch) | |
| tree | dcca3de75b1f935cde4f396ff60e6df8c8969c1c /src/test/WixToolsetTest.CoreIntegration | |
| parent | 961ccec685eb5dd34202b8edbf7f4e67910998aa (diff) | |
| download | wix-2d23530fde970972c927680ee3df6466538ae8ca.tar.gz wix-2d23530fde970972c927680ee3df6466538ae8ca.tar.bz2 wix-2d23530fde970972c927680ee3df6466538ae8ca.zip | |
Add and fix some bundle tests.
Diffstat (limited to 'src/test/WixToolsetTest.CoreIntegration')
4 files changed, 100 insertions, 0 deletions
diff --git a/src/test/WixToolsetTest.CoreIntegration/BundleFixture.cs b/src/test/WixToolsetTest.CoreIntegration/BundleFixture.cs index 31cfed34..6e66aa74 100644 --- a/src/test/WixToolsetTest.CoreIntegration/BundleFixture.cs +++ b/src/test/WixToolsetTest.CoreIntegration/BundleFixture.cs | |||
| @@ -140,5 +140,64 @@ namespace WixToolsetTest.CoreIntegration | |||
| 140 | Assert.True(File.Exists(Path.Combine(baseFolder, @"bin\test.wixpdb"))); | 140 | Assert.True(File.Exists(Path.Combine(baseFolder, @"bin\test.wixpdb"))); |
| 141 | } | 141 | } |
| 142 | } | 142 | } |
| 143 | |||
| 144 | [Fact] | ||
| 145 | public void CanBuildSingleExeBundle() | ||
| 146 | { | ||
| 147 | var burnStubPath = TestData.Get(@"TestData\.Data\burn.exe"); | ||
| 148 | var folder = TestData.Get(@"TestData"); | ||
| 149 | |||
| 150 | using (var fs = new DisposableFileSystem()) | ||
| 151 | { | ||
| 152 | var baseFolder = fs.GetFolder(); | ||
| 153 | var intermediateFolder = Path.Combine(baseFolder, "obj"); | ||
| 154 | var exePath = Path.Combine(baseFolder, @"bin\test.exe"); | ||
| 155 | |||
| 156 | var result = WixRunner.Execute(new[] | ||
| 157 | { | ||
| 158 | "build", | ||
| 159 | Path.Combine(folder, "SingleExeBundle", "SingleExePackageGroup.wxs"), | ||
| 160 | Path.Combine(folder, "BundleWithPackageGroupRef", "Bundle.wxs"), | ||
| 161 | "-bindpath", Path.Combine(folder, "SimpleBundle", "data"), | ||
| 162 | "-bindpath", Path.Combine(folder, ".Data"), | ||
| 163 | "-intermediateFolder", intermediateFolder, | ||
| 164 | "-burnStub", burnStubPath, | ||
| 165 | "-o", exePath, | ||
| 166 | }); | ||
| 167 | |||
| 168 | result.AssertSuccess(); | ||
| 169 | |||
| 170 | Assert.True(File.Exists(exePath)); | ||
| 171 | } | ||
| 172 | } | ||
| 173 | |||
| 174 | [Fact] | ||
| 175 | public void CanBuildSingleExeRemotePayloadBundle() | ||
| 176 | { | ||
| 177 | var burnStubPath = TestData.Get(@"TestData\.Data\burn.exe"); | ||
| 178 | var folder = TestData.Get(@"TestData"); | ||
| 179 | |||
| 180 | using (var fs = new DisposableFileSystem()) | ||
| 181 | { | ||
| 182 | var baseFolder = fs.GetFolder(); | ||
| 183 | var intermediateFolder = Path.Combine(baseFolder, "obj"); | ||
| 184 | var exePath = Path.Combine(baseFolder, @"bin\test.exe"); | ||
| 185 | |||
| 186 | var result = WixRunner.Execute(new[] | ||
| 187 | { | ||
| 188 | "build", | ||
| 189 | Path.Combine(folder, "SingleExeBundle", "SingleExeRemotePayload.wxs"), | ||
| 190 | Path.Combine(folder, "BundleWithPackageGroupRef", "Bundle.wxs"), | ||
| 191 | "-bindpath", Path.Combine(folder, "SimpleBundle", "data"), | ||
| 192 | "-intermediateFolder", intermediateFolder, | ||
| 193 | "-burnStub", burnStubPath, | ||
| 194 | "-o", exePath, | ||
| 195 | }); | ||
| 196 | |||
| 197 | result.AssertSuccess(); | ||
| 198 | |||
| 199 | Assert.True(File.Exists(exePath)); | ||
| 200 | } | ||
| 201 | } | ||
| 143 | } | 202 | } |
| 144 | } | 203 | } |
diff --git a/src/test/WixToolsetTest.CoreIntegration/TestData/SingleExeBundle/SingleExePackageGroup.wxs b/src/test/WixToolsetTest.CoreIntegration/TestData/SingleExeBundle/SingleExePackageGroup.wxs new file mode 100644 index 00000000..9d7a9511 --- /dev/null +++ b/src/test/WixToolsetTest.CoreIntegration/TestData/SingleExeBundle/SingleExePackageGroup.wxs | |||
| @@ -0,0 +1,8 @@ | |||
| 1 | <?xml version="1.0" encoding="utf-8"?> | ||
| 2 | <Wix xmlns="http://wixtoolset.org/schemas/v4/wxs"> | ||
| 3 | <Fragment> | ||
| 4 | <PackageGroup Id="BundlePackages"> | ||
| 5 | <ExePackage SourceFile="burn.exe" /> | ||
| 6 | </PackageGroup> | ||
| 7 | </Fragment> | ||
| 8 | </Wix> | ||
diff --git a/src/test/WixToolsetTest.CoreIntegration/TestData/SingleExeBundle/SingleExeRemotePayload.wxs b/src/test/WixToolsetTest.CoreIntegration/TestData/SingleExeBundle/SingleExeRemotePayload.wxs new file mode 100644 index 00000000..709dc9e7 --- /dev/null +++ b/src/test/WixToolsetTest.CoreIntegration/TestData/SingleExeBundle/SingleExeRemotePayload.wxs | |||
| @@ -0,0 +1,31 @@ | |||
| 1 | <?xml version="1.0" encoding="utf-8"?> | ||
| 2 | <Wix xmlns="http://wixtoolset.org/schemas/v4/wxs"> | ||
| 3 | <Fragment> | ||
| 4 | <PackageGroup Id="BundlePackages"> | ||
| 5 | <ExePackage | ||
| 6 | InstallCommand="/q /norestart /ChainingPackage "[WixBundleName]" /log "[NetFx462FullLog].html"" | ||
| 7 | RepairCommand="/q /norestart /repair /ChainingPackage "[WixBundleName]" /log "[NetFx462FullLog].html"" | ||
| 8 | UninstallCommand="/uninstall /q /norestart /ChainingPackage "[WixBundleName]" /log "[NetFx462FullLog].html"" | ||
| 9 | PerMachine="yes" | ||
| 10 | DetectCondition="A" | ||
| 11 | InstallCondition="B" | ||
| 12 | Id="NetFx462Web" | ||
| 13 | Vital="yes" | ||
| 14 | Permanent="yes" | ||
| 15 | Protocol="netfx4" | ||
| 16 | DownloadUrl="C" | ||
| 17 | LogPathVariable="NetFx462FullLog" | ||
| 18 | Compressed="no" | ||
| 19 | Name="NDP462-KB3151802-Web.exe"> | ||
| 20 | <RemotePayload | ||
| 21 | CertificatePublicKey="52868DFCA6E3AF2632389E6C1EE7D0468D3797D0" | ||
| 22 | CertificateThumbprint="3BDA323E552DB1FDE5F4FBEE75D6D5B2B187EEDC" | ||
| 23 | Description="Microsoft .NET Framework 4.6.2 Setup" | ||
| 24 | Hash="C42E6ED280290648BBD59F664008852F4CFE4548" | ||
| 25 | ProductName="Microsoft .NET Framework 4.6.2" | ||
| 26 | Size="1429344" | ||
| 27 | Version="4.6.1590.0" /> | ||
| 28 | </ExePackage> | ||
| 29 | </PackageGroup> | ||
| 30 | </Fragment> | ||
| 31 | </Wix> | ||
diff --git a/src/test/WixToolsetTest.CoreIntegration/WixToolsetTest.CoreIntegration.csproj b/src/test/WixToolsetTest.CoreIntegration/WixToolsetTest.CoreIntegration.csproj index 13611770..60cbde85 100644 --- a/src/test/WixToolsetTest.CoreIntegration/WixToolsetTest.CoreIntegration.csproj +++ b/src/test/WixToolsetTest.CoreIntegration/WixToolsetTest.CoreIntegration.csproj | |||
| @@ -117,6 +117,8 @@ | |||
| 117 | <Content Include="TestData\SimpleBundle\Bundle.wxs" CopyToOutputDirectory="PreserveNewest" /> | 117 | <Content Include="TestData\SimpleBundle\Bundle.wxs" CopyToOutputDirectory="PreserveNewest" /> |
| 118 | <Content Include="TestData\SimpleBundle\MultiFileBootstrapperApplication.wxs" CopyToOutputDirectory="PreserveNewest" /> | 118 | <Content Include="TestData\SimpleBundle\MultiFileBootstrapperApplication.wxs" CopyToOutputDirectory="PreserveNewest" /> |
| 119 | <Content Include="TestData\SimpleBundle\MultiFileBundle.wxs" CopyToOutputDirectory="PreserveNewest" /> | 119 | <Content Include="TestData\SimpleBundle\MultiFileBundle.wxs" CopyToOutputDirectory="PreserveNewest" /> |
| 120 | <Content Include="TestData\SingleExeBundle\SingleExePackageGroup.wxs" CopyToOutputDirectory="PreserveNewest" /> | ||
| 121 | <Content Include="TestData\SingleExeBundle\SingleExeRemotePayload.wxs" CopyToOutputDirectory="PreserveNewest" /> | ||
| 120 | <Content Include="TestData\SingleFile\data\test.txt" CopyToOutputDirectory="PreserveNewest" /> | 122 | <Content Include="TestData\SingleFile\data\test.txt" CopyToOutputDirectory="PreserveNewest" /> |
| 121 | <Content Include="TestData\SingleFile\Package.en-us.wxl" CopyToOutputDirectory="PreserveNewest" /> | 123 | <Content Include="TestData\SingleFile\Package.en-us.wxl" CopyToOutputDirectory="PreserveNewest" /> |
| 122 | <Content Include="TestData\SingleFile\Package.wxs" CopyToOutputDirectory="PreserveNewest" /> | 124 | <Content Include="TestData\SingleFile\Package.wxs" CopyToOutputDirectory="PreserveNewest" /> |
