From 2724cfee4c163f3297ee25edfd2372767cfd4945 Mon Sep 17 00:00:00 2001 From: Rob Mensching Date: Thu, 19 Jul 2018 00:58:00 -0700 Subject: Move tool projects to Tools repo --- .../LightFixture.cs | 48 ------------ .../TestData/Wixout/Package.en-us.wxl | 11 --- .../TestData/Wixout/data/test.txt | 1 - .../TestData/Wixout/test.wixout | Bin 10354 -> 0 bytes .../Utility/DisposableFileSystem.cs | 86 --------------------- .../Utility/TestData.cs | 17 ---- .../WixToolsetTest.LightIntegration.csproj | 30 ------- 7 files changed, 193 deletions(-) delete mode 100644 src/test/WixToolsetTest.LightIntegration/LightFixture.cs delete mode 100644 src/test/WixToolsetTest.LightIntegration/TestData/Wixout/Package.en-us.wxl delete mode 100644 src/test/WixToolsetTest.LightIntegration/TestData/Wixout/data/test.txt delete mode 100644 src/test/WixToolsetTest.LightIntegration/TestData/Wixout/test.wixout delete mode 100644 src/test/WixToolsetTest.LightIntegration/Utility/DisposableFileSystem.cs delete mode 100644 src/test/WixToolsetTest.LightIntegration/Utility/TestData.cs delete mode 100644 src/test/WixToolsetTest.LightIntegration/WixToolsetTest.LightIntegration.csproj (limited to 'src/test/WixToolsetTest.LightIntegration') diff --git a/src/test/WixToolsetTest.LightIntegration/LightFixture.cs b/src/test/WixToolsetTest.LightIntegration/LightFixture.cs deleted file mode 100644 index 21c10be9..00000000 --- a/src/test/WixToolsetTest.LightIntegration/LightFixture.cs +++ /dev/null @@ -1,48 +0,0 @@ -// 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. - -namespace WixToolsetTest.LightIntegration -{ - using System.IO; - using System.Linq; - using WixToolset.Core; - using WixToolset.Tools; - using WixToolsetTest.LightIntegration.Utility; - using Xunit; - - public class LightFixture - { - [Fact] - public void CanBuildFromWixout() - { - var folder = TestData.Get(@"TestData\Wixout"); - - using (var fs = new DisposableFileSystem()) - { - var baseFolder = fs.GetFolder(); - var intermediateFolder = Path.Combine(baseFolder, "obj"); - - var program = new Light(); - var result = program.Run(new WixToolsetServiceProvider(), null, new[] - { - Path.Combine(folder, "test.wixout"), - "-loc", Path.Combine(folder, "Package.en-us.wxl"), - "-b", Path.Combine(folder, "data"), - "-intermediateFolder", intermediateFolder, - "-o", Path.Combine(baseFolder, @"bin\test.msi") - }); - - Assert.Equal(0, result); - - var binFolder = Path.Combine(baseFolder, @"bin\"); - var builtFiles = Directory.GetFiles(binFolder, "*", SearchOption.AllDirectories); - - Assert.Equal(new[]{ - "MsiPackage\\test.txt", - "test.msi", - "test.wir", - "test.wixpdb", - }, builtFiles.Select(f => f.Substring(binFolder.Length)).OrderBy(s => s).ToArray()); - } - } - } -} diff --git a/src/test/WixToolsetTest.LightIntegration/TestData/Wixout/Package.en-us.wxl b/src/test/WixToolsetTest.LightIntegration/TestData/Wixout/Package.en-us.wxl deleted file mode 100644 index 38c12ac1..00000000 --- a/src/test/WixToolsetTest.LightIntegration/TestData/Wixout/Package.en-us.wxl +++ /dev/null @@ -1,11 +0,0 @@ - - - - - - A newer version of [ProductName] is already installed. - MsiPackage - - diff --git a/src/test/WixToolsetTest.LightIntegration/TestData/Wixout/data/test.txt b/src/test/WixToolsetTest.LightIntegration/TestData/Wixout/data/test.txt deleted file mode 100644 index cd0db0e1..00000000 --- a/src/test/WixToolsetTest.LightIntegration/TestData/Wixout/data/test.txt +++ /dev/null @@ -1 +0,0 @@ -This is test.txt. \ No newline at end of file diff --git a/src/test/WixToolsetTest.LightIntegration/TestData/Wixout/test.wixout b/src/test/WixToolsetTest.LightIntegration/TestData/Wixout/test.wixout deleted file mode 100644 index 009b625f..00000000 Binary files a/src/test/WixToolsetTest.LightIntegration/TestData/Wixout/test.wixout and /dev/null differ diff --git a/src/test/WixToolsetTest.LightIntegration/Utility/DisposableFileSystem.cs b/src/test/WixToolsetTest.LightIntegration/Utility/DisposableFileSystem.cs deleted file mode 100644 index 3b8c0e19..00000000 --- a/src/test/WixToolsetTest.LightIntegration/Utility/DisposableFileSystem.cs +++ /dev/null @@ -1,86 +0,0 @@ -// 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. - -namespace WixToolsetTest.LightIntegration.Utility -{ - using System; - using System.Collections.Generic; - using System.IO; - - public class DisposableFileSystem : IDisposable - { - protected bool Disposed { get; private set; } - - private List CleanupPaths { get; } = new List(); - - protected string GetFile(bool create = false) - { - var path = Path.GetTempFileName(); - - if (!create) - { - File.Delete(path); - } - - this.CleanupPaths.Add(path); - - return path; - } - - public string GetFolder(bool create = false) - { - var path = Path.Combine(Path.GetTempPath(), Path.GetRandomFileName()); - - if (create) - { - Directory.CreateDirectory(path); - } - - this.CleanupPaths.Add(path); - - return path; - } - - - #region // IDisposable - - public void Dispose() - { - this.Dispose(true); - GC.SuppressFinalize(this); - } - - protected virtual void Dispose(bool disposing) - { - if (this.Disposed) - { - return; - } - - if (disposing) - { - foreach (var path in this.CleanupPaths) - { - try - { - if (File.Exists(path)) - { - File.Delete(path); - } - else if (Directory.Exists(path)) - { - Directory.Delete(path, true); - } - } - catch - { - // Best effort delete, so ignore any failures. - } - } - } - - this.Disposed = true; - } - - #endregion - } -} diff --git a/src/test/WixToolsetTest.LightIntegration/Utility/TestData.cs b/src/test/WixToolsetTest.LightIntegration/Utility/TestData.cs deleted file mode 100644 index c13e9d6d..00000000 --- a/src/test/WixToolsetTest.LightIntegration/Utility/TestData.cs +++ /dev/null @@ -1,17 +0,0 @@ -// 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. - -namespace WixToolsetTest.LightIntegration.Utility -{ - using System; - using System.IO; - - public class TestData - { - public static string LocalPath => Path.GetDirectoryName(new Uri(System.Reflection.Assembly.GetExecutingAssembly().CodeBase).LocalPath); - - public static string Get(params string[] paths) - { - return Path.Combine(LocalPath, Path.Combine(paths)); - } - } -} diff --git a/src/test/WixToolsetTest.LightIntegration/WixToolsetTest.LightIntegration.csproj b/src/test/WixToolsetTest.LightIntegration/WixToolsetTest.LightIntegration.csproj deleted file mode 100644 index 59068682..00000000 --- a/src/test/WixToolsetTest.LightIntegration/WixToolsetTest.LightIntegration.csproj +++ /dev/null @@ -1,30 +0,0 @@ - - - - - - net461 - false - embedded - - - - - - PreserveNewest - - - PreserveNewest - - - - - - - - - - - - - -- cgit v1.2.3-55-g6feb