From 8ed8b5112a2c038bf1f62618f2c262a30997d894 Mon Sep 17 00:00:00 2001 From: Piotr Puszkiewicz Date: Tue, 16 Feb 2016 22:28:37 -0800 Subject: [PATCH] Remove deprecated Packaged Command Tests --- scripts/dotnet-cli-build/TestTargets.cs | 36 +------------------------ 1 file changed, 1 insertion(+), 35 deletions(-) diff --git a/scripts/dotnet-cli-build/TestTargets.cs b/scripts/dotnet-cli-build/TestTargets.cs index 318359858..4ef2c378e 100644 --- a/scripts/dotnet-cli-build/TestTargets.cs +++ b/scripts/dotnet-cli-build/TestTargets.cs @@ -130,7 +130,7 @@ namespace Microsoft.DotNet.Cli.Build return c.Success(); } - [Target(nameof(RunXUnitTests), nameof(RunPackageCommandTests))] + [Target(nameof(RunXUnitTests))] public static BuildTargetResult RunTests(BuildTargetContext c) => c.Success(); [Target] @@ -174,40 +174,6 @@ namespace Microsoft.DotNet.Cli.Build return c.Success(); } - [Target] - public static BuildTargetResult RunPackageCommandTests(BuildTargetContext c) - { - var dotnet = DotNetCli.Stage2; - var consumers = Path.Combine(c.BuildContext.BuildDirectory, "test", "PackagedCommands", "Consumers"); - - // Compile the consumer apps - foreach (var dir in Directory.EnumerateDirectories(consumers)) - { - dotnet.Build().WorkingDirectory(dir).Execute().EnsureSuccessful(); - } - - // Test the apps - foreach (var dir in Directory.EnumerateDirectories(consumers)) - { - var result = dotnet.Exec("hello").WorkingDirectory(dir) - .ForwardStdErr() - .ForwardStdOut() - .CaptureStdOut() - .CaptureStdErr() - .Execute(); - result.EnsureSuccessful(); - if (!string.Equals("Hello", result.StdOut.Trim(), StringComparison.Ordinal)) - { - var testName = Path.GetFileName(dir); - c.Error($"Packaged Commands Test '{testName}' failed"); - c.Error($" Expected 'Hello', but got: '{result.StdOut.Trim()}'"); - return c.Failed($"Packaged Commands Test failed '{testName}'"); - } - } - - return c.Success(); - } - [Target] public static BuildTargetResult ValidateDependencies(BuildTargetContext c) {