diff options
| author | Rob Mensching <rob@firegiant.com> | 2021-04-22 17:57:31 -0700 |
|---|---|---|
| committer | Rob Mensching <rob@firegiant.com> | 2021-04-29 16:49:19 -0700 |
| commit | 03d5c46cbbb94f73ac468709345fc6a0e50def8d (patch) | |
| tree | 9460f73cc308ead863e7a28a68fdeb6d85a2e69e /src/test/WixToolsetTest.BuildTasks | |
| parent | 35606d2cd04a7b1bec1d669f9619501dff2bf9dc (diff) | |
| download | wix-03d5c46cbbb94f73ac468709345fc6a0e50def8d.tar.gz wix-03d5c46cbbb94f73ac468709345fc6a0e50def8d.tar.bz2 wix-03d5c46cbbb94f73ac468709345fc6a0e50def8d.zip | |
Move Tools into wix
Diffstat (limited to 'src/test/WixToolsetTest.BuildTasks')
3 files changed, 0 insertions, 110 deletions
diff --git a/src/test/WixToolsetTest.BuildTasks/WixBuildTaskFixture.cs b/src/test/WixToolsetTest.BuildTasks/WixBuildTaskFixture.cs deleted file mode 100644 index 9d132f66..00000000 --- a/src/test/WixToolsetTest.BuildTasks/WixBuildTaskFixture.cs +++ /dev/null | |||
| @@ -1,67 +0,0 @@ | |||
| 1 | // Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information. | ||
| 2 | |||
| 3 | namespace WixToolsetTest.BuildTasks | ||
| 4 | { | ||
| 5 | using System.IO; | ||
| 6 | using System.Linq; | ||
| 7 | using Microsoft.Build.Utilities; | ||
| 8 | using WixBuildTools.TestSupport; | ||
| 9 | using WixToolset.BuildTasks; | ||
| 10 | using WixToolset.Data; | ||
| 11 | using WixToolset.Data.Symbols; | ||
| 12 | using Xunit; | ||
| 13 | |||
| 14 | public class WixBuildTaskFixture | ||
| 15 | { | ||
| 16 | [Fact] | ||
| 17 | public void CanBuildSimpleMsiPackage() | ||
| 18 | { | ||
| 19 | var folder = TestData.Get(@"TestData\SimpleMsiPackage\MsiPackage"); | ||
| 20 | |||
| 21 | using (var fs = new DisposableFileSystem()) | ||
| 22 | { | ||
| 23 | var baseFolder = fs.GetFolder(); | ||
| 24 | var intermediateFolder = Path.Combine(baseFolder, "obj"); | ||
| 25 | var pdbPath = Path.Combine(baseFolder, @"bin\testpackage.wixpdb"); | ||
| 26 | var engine = new FakeBuildEngine(); | ||
| 27 | |||
| 28 | var task = new WixBuild | ||
| 29 | { | ||
| 30 | BuildEngine = engine, | ||
| 31 | SourceFiles = new[] | ||
| 32 | { | ||
| 33 | new TaskItem(Path.Combine(folder, "Package.wxs")), | ||
| 34 | new TaskItem(Path.Combine(folder, "PackageComponents.wxs")), | ||
| 35 | }, | ||
| 36 | LocalizationFiles = new[] | ||
| 37 | { | ||
| 38 | new TaskItem(Path.Combine(folder, "Package.en-us.wxl")), | ||
| 39 | }, | ||
| 40 | BindInputPaths = new[] | ||
| 41 | { | ||
| 42 | new TaskItem(Path.Combine(folder, "data")), | ||
| 43 | }, | ||
| 44 | IntermediateDirectory = new TaskItem(intermediateFolder), | ||
| 45 | OutputFile = new TaskItem(Path.Combine(baseFolder, @"bin\test.msi")), | ||
| 46 | PdbType = "Full", | ||
| 47 | PdbFile = new TaskItem(pdbPath), | ||
| 48 | DefaultCompressionLevel = "nOnE", | ||
| 49 | }; | ||
| 50 | |||
| 51 | var result = task.Execute(); | ||
| 52 | Assert.True(result, $"MSBuild task failed unexpectedly. Output:\r\n{engine.Output}"); | ||
| 53 | |||
| 54 | Assert.True(File.Exists(Path.Combine(baseFolder, @"bin\test.msi"))); | ||
| 55 | Assert.True(File.Exists(pdbPath)); | ||
| 56 | Assert.True(File.Exists(Path.Combine(baseFolder, @"bin\cab1.cab"))); | ||
| 57 | |||
| 58 | var intermediate = Intermediate.Load(pdbPath); | ||
| 59 | var section = intermediate.Sections.Single(); | ||
| 60 | |||
| 61 | var fileSymbol = section.Symbols.OfType<FileSymbol>().Single(); | ||
| 62 | Assert.Equal(Path.Combine(folder, @"data\test.txt"), fileSymbol[FileSymbolFields.Source].AsPath().Path); | ||
| 63 | Assert.Equal(@"test.txt", fileSymbol[FileSymbolFields.Source].PreviousValue.AsPath().Path); | ||
| 64 | } | ||
| 65 | } | ||
| 66 | } | ||
| 67 | } | ||
diff --git a/src/test/WixToolsetTest.BuildTasks/WixToolsetTest.BuildTasks.csproj b/src/test/WixToolsetTest.BuildTasks/WixToolsetTest.BuildTasks.csproj deleted file mode 100644 index c01860cd..00000000 --- a/src/test/WixToolsetTest.BuildTasks/WixToolsetTest.BuildTasks.csproj +++ /dev/null | |||
| @@ -1,35 +0,0 @@ | |||
| 1 | <?xml version="1.0" encoding="utf-8"?> | ||
| 2 | <!-- Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information. --> | ||
| 3 | |||
| 4 | <Project Sdk="Microsoft.NET.Sdk"> | ||
| 5 | <PropertyGroup> | ||
| 6 | <TargetFramework>net461</TargetFramework> | ||
| 7 | <IsPackable>false</IsPackable> | ||
| 8 | <DebugType>embedded</DebugType> | ||
| 9 | <RuntimeIdentifier>win-x86</RuntimeIdentifier> | ||
| 10 | </PropertyGroup> | ||
| 11 | |||
| 12 | <ItemGroup> | ||
| 13 | <Content Include="..\WixToolsetTest.Sdk\TestData\SimpleMsiPackage\MsiPackage\Package.en-us.wxl" Link="TestData\SimpleMsiPackage\MsiPackage\Package.en-us.wxl" CopyToOutputDirectory="PreserveNewest" /> | ||
| 14 | <Content Include="..\WixToolsetTest.Sdk\TestData\SimpleMsiPackage\MsiPackage\Package.wxs" Link="TestData\SimpleMsiPackage\MsiPackage\Package.wxs" CopyToOutputDirectory="PreserveNewest" /> | ||
| 15 | <Content Include="..\WixToolsetTest.Sdk\TestData\SimpleMsiPackage\MsiPackage\PackageComponents.wxs" Link="TestData\SimpleMsiPackage\MsiPackage\PackageComponents.wxs" CopyToOutputDirectory="PreserveNewest" /> | ||
| 16 | <Content Include="..\WixToolsetTest.Sdk\TestData\SimpleMsiPackage\MsiPackage\data\test.txt" Link="TestData\SimpleMsiPackage\MsiPackage\data\test.txt" CopyToOutputDirectory="PreserveNewest" /> | ||
| 17 | </ItemGroup> | ||
| 18 | |||
| 19 | <ItemGroup> | ||
| 20 | <ProjectReference Include="..\..\WixToolset.BuildTasks\WixToolset.BuildTasks.csproj" /> | ||
| 21 | </ItemGroup> | ||
| 22 | |||
| 23 | <ItemGroup> | ||
| 24 | <PackageReference Include="Microsoft.Build.Tasks.Core" Version="14.3" Condition="'$(TargetFramework)'=='net461' or '$(TargetFramework)'=='net472'" /> | ||
| 25 | <PackageReference Include="Microsoft.Build.Tasks.Core" Version="15.7.179" Condition="'$(TargetFramework)'=='netcoreapp3.1' " /> | ||
| 26 | <PackageReference Include="WixBuildTools.TestSupport" Version="4.0.*" /> | ||
| 27 | <PackageReference Include="WixToolset.Core.TestPackage" Version="4.0.*" /> | ||
| 28 | </ItemGroup> | ||
| 29 | |||
| 30 | <ItemGroup> | ||
| 31 | <PackageReference Include="Microsoft.NET.Test.Sdk" Version="16.3.0" /> | ||
| 32 | <PackageReference Include="xunit" Version="2.4.1" /> | ||
| 33 | <PackageReference Include="xunit.runner.visualstudio" Version="2.4.1" PrivateAssets="All" /> | ||
| 34 | </ItemGroup> | ||
| 35 | </Project> | ||
diff --git a/src/test/WixToolsetTest.BuildTasks/WixToolsetTest.BuildTasks.v3.ncrunchproject b/src/test/WixToolsetTest.BuildTasks/WixToolsetTest.BuildTasks.v3.ncrunchproject deleted file mode 100644 index f1d03cd7..00000000 --- a/src/test/WixToolsetTest.BuildTasks/WixToolsetTest.BuildTasks.v3.ncrunchproject +++ /dev/null | |||
| @@ -1,8 +0,0 @@ | |||
| 1 | <ProjectConfiguration> | ||
| 2 | <Settings> | ||
| 3 | <HiddenComponentWarnings /> | ||
| 4 | <IgnoredTests> | ||
| 5 | <AllTestsSelector /> | ||
| 6 | </IgnoredTests> | ||
| 7 | </Settings> | ||
| 8 | </ProjectConfiguration> \ No newline at end of file | ||
