add dotnet-test
This commit is contained in:
parent
5f102aee31
commit
407c933480
21 changed files with 152 additions and 43 deletions
|
@ -51,6 +51,10 @@ Project("{8BB2217D-0F2D-49D1-97BC-3654ED321F3B}") = "Microsoft.DotNet.ProjectMod
|
|||
EndProject
|
||||
Project("{8BB2217D-0F2D-49D1-97BC-3654ED321F3B}") = "Microsoft.DotNet.Runtime", "src\Microsoft.DotNet.Runtime\Microsoft.DotNet.Runtime.xproj", "{DB29F219-DC92-4AF7-A2EE-E89FFBB3F5F0}"
|
||||
EndProject
|
||||
Project("{8BB2217D-0F2D-49D1-97BC-3654ED321F3B}") = "Microsoft.Extensions.Testing.Abstractions", "src\Microsoft.Extensions.Testing.Abstractions\Microsoft.Extensions.Testing.Abstractions.xproj", "{DCDFE282-03DE-4DBC-B90C-CC3CE3EC8162}"
|
||||
EndProject
|
||||
Project("{8BB2217D-0F2D-49D1-97BC-3654ED321F3B}") = "Microsoft.DotNet.Tools.Test", "src\Microsoft.DotNet.Tools.Test\Microsoft.DotNet.Tools.Test.xproj", "{F003F228-2AE2-4E9D-877B-93EB773B5061}"
|
||||
EndProject
|
||||
Global
|
||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||
Debug|Any CPU = Debug|Any CPU
|
||||
|
@ -355,6 +359,38 @@ Global
|
|||
{DB29F219-DC92-4AF7-A2EE-E89FFBB3F5F0}.RelWithDebInfo|Any CPU.Build.0 = Release|Any CPU
|
||||
{DB29F219-DC92-4AF7-A2EE-E89FFBB3F5F0}.RelWithDebInfo|x64.ActiveCfg = Release|Any CPU
|
||||
{DB29F219-DC92-4AF7-A2EE-E89FFBB3F5F0}.RelWithDebInfo|x64.Build.0 = Release|Any CPU
|
||||
{DCDFE282-03DE-4DBC-B90C-CC3CE3EC8162}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{DCDFE282-03DE-4DBC-B90C-CC3CE3EC8162}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{DCDFE282-03DE-4DBC-B90C-CC3CE3EC8162}.Debug|x64.ActiveCfg = Debug|Any CPU
|
||||
{DCDFE282-03DE-4DBC-B90C-CC3CE3EC8162}.Debug|x64.Build.0 = Debug|Any CPU
|
||||
{DCDFE282-03DE-4DBC-B90C-CC3CE3EC8162}.MinSizeRel|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{DCDFE282-03DE-4DBC-B90C-CC3CE3EC8162}.MinSizeRel|Any CPU.Build.0 = Debug|Any CPU
|
||||
{DCDFE282-03DE-4DBC-B90C-CC3CE3EC8162}.MinSizeRel|x64.ActiveCfg = Debug|Any CPU
|
||||
{DCDFE282-03DE-4DBC-B90C-CC3CE3EC8162}.MinSizeRel|x64.Build.0 = Debug|Any CPU
|
||||
{DCDFE282-03DE-4DBC-B90C-CC3CE3EC8162}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{DCDFE282-03DE-4DBC-B90C-CC3CE3EC8162}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{DCDFE282-03DE-4DBC-B90C-CC3CE3EC8162}.Release|x64.ActiveCfg = Release|Any CPU
|
||||
{DCDFE282-03DE-4DBC-B90C-CC3CE3EC8162}.Release|x64.Build.0 = Release|Any CPU
|
||||
{DCDFE282-03DE-4DBC-B90C-CC3CE3EC8162}.RelWithDebInfo|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{DCDFE282-03DE-4DBC-B90C-CC3CE3EC8162}.RelWithDebInfo|Any CPU.Build.0 = Release|Any CPU
|
||||
{DCDFE282-03DE-4DBC-B90C-CC3CE3EC8162}.RelWithDebInfo|x64.ActiveCfg = Release|Any CPU
|
||||
{DCDFE282-03DE-4DBC-B90C-CC3CE3EC8162}.RelWithDebInfo|x64.Build.0 = Release|Any CPU
|
||||
{F003F228-2AE2-4E9D-877B-93EB773B5061}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{F003F228-2AE2-4E9D-877B-93EB773B5061}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{F003F228-2AE2-4E9D-877B-93EB773B5061}.Debug|x64.ActiveCfg = Debug|Any CPU
|
||||
{F003F228-2AE2-4E9D-877B-93EB773B5061}.Debug|x64.Build.0 = Debug|Any CPU
|
||||
{F003F228-2AE2-4E9D-877B-93EB773B5061}.MinSizeRel|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{F003F228-2AE2-4E9D-877B-93EB773B5061}.MinSizeRel|Any CPU.Build.0 = Debug|Any CPU
|
||||
{F003F228-2AE2-4E9D-877B-93EB773B5061}.MinSizeRel|x64.ActiveCfg = Debug|Any CPU
|
||||
{F003F228-2AE2-4E9D-877B-93EB773B5061}.MinSizeRel|x64.Build.0 = Debug|Any CPU
|
||||
{F003F228-2AE2-4E9D-877B-93EB773B5061}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{F003F228-2AE2-4E9D-877B-93EB773B5061}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{F003F228-2AE2-4E9D-877B-93EB773B5061}.Release|x64.ActiveCfg = Release|Any CPU
|
||||
{F003F228-2AE2-4E9D-877B-93EB773B5061}.Release|x64.Build.0 = Release|Any CPU
|
||||
{F003F228-2AE2-4E9D-877B-93EB773B5061}.RelWithDebInfo|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{F003F228-2AE2-4E9D-877B-93EB773B5061}.RelWithDebInfo|Any CPU.Build.0 = Release|Any CPU
|
||||
{F003F228-2AE2-4E9D-877B-93EB773B5061}.RelWithDebInfo|x64.ActiveCfg = Release|Any CPU
|
||||
{F003F228-2AE2-4E9D-877B-93EB773B5061}.RelWithDebInfo|x64.Build.0 = Release|Any CPU
|
||||
EndGlobalSection
|
||||
GlobalSection(SolutionProperties) = preSolution
|
||||
HideSolutionNode = FALSE
|
||||
|
@ -380,5 +416,7 @@ Global
|
|||
{0F480791-4BA0-44E3-8CC4-C71656664175} = {ED2FE3E2-F7E7-4389-8231-B65123F2076F}
|
||||
{BD7833F8-3209-4682-BF75-B4BCA883E279} = {ED2FE3E2-F7E7-4389-8231-B65123F2076F}
|
||||
{DB29F219-DC92-4AF7-A2EE-E89FFBB3F5F0} = {ED2FE3E2-F7E7-4389-8231-B65123F2076F}
|
||||
{DCDFE282-03DE-4DBC-B90C-CC3CE3EC8162} = {ED2FE3E2-F7E7-4389-8231-B65123F2076F}
|
||||
{F003F228-2AE2-4E9D-877B-93EB773B5061} = {ED2FE3E2-F7E7-4389-8231-B65123F2076F}
|
||||
EndGlobalSection
|
||||
EndGlobal
|
||||
|
|
|
@ -40,12 +40,13 @@ compilers, package managers and other utilities that developers need.",
|
|||
"bin/dotnet" : "usr/bin/dotnet",
|
||||
"bin/dotnet-compile" : "usr/bin/dotnet-compile",
|
||||
"bin/dotnet-compile-csc" : "usr/bin/dotnet-compile-csc",
|
||||
"bin/dotnet-compile-native" : "/usr/bin/dotnet-compile-native",
|
||||
"bin/dotnet-init":"usr/bin/dotnet-init",
|
||||
"bin/dotnet-publish" : "usr/bin/dotnet-publish",
|
||||
"bin/dotnet-repl" : "usr/bin/dotnet-repl",
|
||||
"bin/dotnet-repl-csi" : "usr/bin/dotnet-repl-csi",
|
||||
"bin/dotnet-restore" : "usr/bin/dotnet-restore",
|
||||
"bin/dotnet-compile-native" : "/usr/bin/dotnet-compile-native",
|
||||
"bin/resgen" : "usr/bin/resgen",
|
||||
"bin/dotnet-init":"usr/bin/dotnet-init"
|
||||
"bin/dotnet-test" : "usr/bin/dotnet-test",
|
||||
"bin/resgen" : "usr/bin/resgen"
|
||||
}
|
||||
}
|
||||
|
|
|
@ -15,14 +15,15 @@ $Projects = @(
|
|||
"Microsoft.DotNet.Cli",
|
||||
"Microsoft.DotNet.Tools.Compiler",
|
||||
"Microsoft.DotNet.Tools.Compiler.Csc",
|
||||
"Microsoft.DotNet.Tools.Compiler.Native",
|
||||
"Microsoft.DotNet.Tools.Init",
|
||||
"Microsoft.DotNet.Tools.Pack",
|
||||
"Microsoft.DotNet.Tools.Publish",
|
||||
"Microsoft.DotNet.Tools.Repl",
|
||||
"Microsoft.DotNet.Tools.Repl.Csi",
|
||||
"Microsoft.DotNet.Tools.Resgen",
|
||||
"Microsoft.DotNet.Tools.Run",
|
||||
"Microsoft.DotNet.Tools.Init",
|
||||
"Microsoft.DotNet.Tools.Compiler.Native"
|
||||
"Microsoft.DotNet.Tools.Test"
|
||||
)
|
||||
|
||||
$BinariesForCoreHost = @(
|
||||
|
|
|
@ -27,14 +27,15 @@ PROJECTS=( \
|
|||
Microsoft.DotNet.Cli \
|
||||
Microsoft.DotNet.Tools.Compiler \
|
||||
Microsoft.DotNet.Tools.Compiler.Csc \
|
||||
Microsoft.DotNet.Tools.Publish \
|
||||
Microsoft.DotNet.Tools.Compiler.Native \
|
||||
Microsoft.DotNet.Tools.Init \
|
||||
Microsoft.DotNet.Tools.Pack \
|
||||
Microsoft.DotNet.Tools.Publish \
|
||||
Microsoft.DotNet.Tools.Repl \
|
||||
Microsoft.DotNet.Tools.Repl.Csi \
|
||||
Microsoft.DotNet.Tools.Resgen \
|
||||
Microsoft.DotNet.Tools.Run \
|
||||
Microsoft.DotNet.Tools.Init \
|
||||
Microsoft.DotNet.Tools.Compiler.Native \
|
||||
Microsoft.DotNet.Tools.Test \
|
||||
)
|
||||
|
||||
BINARIES_FOR_COREHOST=( \
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
// Copyright (c) .NET Foundation. All rights reserved.
|
||||
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
|
||||
// Copyright (c) .NET Foundation and contributors. All rights reserved.
|
||||
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
|
||||
|
||||
using System;
|
||||
using System.IO;
|
||||
|
|
|
@ -201,6 +201,9 @@ namespace Microsoft.DotNet.Cli.Utils
|
|||
Reporter.Verbose.WriteLine($"> {FormatProcessInfo(_process.StartInfo)}".White());
|
||||
#endif
|
||||
_process.Start();
|
||||
|
||||
Reporter.Verbose.WriteLine($"Process ID: {_process.Id}");
|
||||
|
||||
_process.BeginOutputReadLine();
|
||||
_process.BeginErrorReadLine();
|
||||
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
// Copyright (c) .NET Foundation. All rights reserved.
|
||||
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
|
||||
// Copyright (c) .NET Foundation and contributors. All rights reserved.
|
||||
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
|
||||
|
||||
namespace Microsoft.DotNet.Cli.Utils.CommandParsing
|
||||
{
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
// Copyright (c) .NET Foundation. All rights reserved.
|
||||
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
|
||||
// Copyright (c) .NET Foundation and contributors. All rights reserved.
|
||||
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
|
||||
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
// Copyright (c) .NET Foundation. All rights reserved.
|
||||
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
|
||||
// Copyright (c) .NET Foundation and contributors. All rights reserved.
|
||||
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
|
||||
|
||||
namespace Microsoft.DotNet.Cli.Utils.CommandParsing
|
||||
{
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
// Copyright (c) .NET Foundation. All rights reserved.
|
||||
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
|
||||
// Copyright (c) .NET Foundation and contributors. All rights reserved.
|
||||
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
|
||||
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
// Copyright (c) .NET Foundation. All rights reserved.
|
||||
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
|
||||
// Copyright (c) .NET Foundation and contributors. All rights reserved.
|
||||
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
|
||||
|
||||
namespace Microsoft.DotNet.Cli.Utils.CommandParsing
|
||||
{
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
// Copyright (c) .NET Foundation. All rights reserved.
|
||||
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
|
||||
// Copyright (c) .NET Foundation and contributors. All rights reserved.
|
||||
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
|
||||
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
// Copyright (c) .NET Foundation. All rights reserved.
|
||||
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
|
||||
// Copyright (c) .NET Foundation and contributors. All rights reserved.
|
||||
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
|
||||
|
||||
namespace Microsoft.DotNet.Cli.Utils.CommandParsing
|
||||
{
|
||||
|
|
|
@ -1,17 +0,0 @@
|
|||
using System.Linq;
|
||||
|
||||
namespace System.Collections.Generic
|
||||
{
|
||||
internal static class DictionaryExtensions
|
||||
{
|
||||
public static IEnumerable<V> GetOrEmpty<K, V>(this IDictionary<K, IEnumerable<V>> self, K key)
|
||||
{
|
||||
IEnumerable<V> val;
|
||||
if (!self.TryGetValue(key, out val))
|
||||
{
|
||||
return Enumerable.Empty<V>();
|
||||
}
|
||||
return val;
|
||||
}
|
||||
}
|
||||
}
|
|
@ -76,6 +76,8 @@ namespace Microsoft.DotNet.ProjectModel
|
|||
|
||||
public string CompilerName { get; set; }
|
||||
|
||||
public string TestRunner { get; set; }
|
||||
|
||||
public ProjectFilesCollection Files { get; set; }
|
||||
|
||||
public IDictionary<string, string> Commands { get; } = new Dictionary<string, string>(StringComparer.OrdinalIgnoreCase);
|
||||
|
|
|
@ -140,6 +140,7 @@ namespace Microsoft.DotNet.ProjectModel
|
|||
project.LicenseUrl = rawProject.ValueAsString("licenseUrl");
|
||||
project.IconUrl = rawProject.ValueAsString("iconUrl");
|
||||
project.CompilerName = rawProject.ValueAsString("compilerName");
|
||||
project.TestRunner = rawProject.ValueAsString("testRunner");
|
||||
|
||||
project.Authors = rawProject.ValueAsStringArray("authors") ?? Array.Empty<string>();
|
||||
project.Owners = rawProject.ValueAsStringArray("owners") ?? Array.Empty<string>();
|
||||
|
|
|
@ -1,10 +1,22 @@
|
|||
// Copyright (c) .NET Foundation and contributors. All rights reserved.
|
||||
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
|
||||
|
||||
namespace System.Collections.Generic
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
|
||||
namespace Microsoft.DotNet.ProjectModel.Utilities
|
||||
{
|
||||
internal static class DictionaryExtensions
|
||||
public static class DictionaryExtensions
|
||||
{
|
||||
public static IEnumerable<V> GetOrEmpty<K, V>(this IDictionary<K, IEnumerable<V>> self, K key)
|
||||
{
|
||||
IEnumerable<V> val;
|
||||
return !self.TryGetValue(key, out val)
|
||||
? Enumerable.Empty<V>()
|
||||
: val;
|
||||
}
|
||||
|
||||
public static TValue GetOrAdd<TKey, TValue>(this IDictionary<TKey, TValue> dictionary, TKey key, Func<TKey, TValue> factory)
|
||||
{
|
||||
lock (dictionary)
|
||||
|
|
|
@ -14,6 +14,7 @@ using Microsoft.DotNet.Tools.Common;
|
|||
using Microsoft.DotNet.ProjectModel;
|
||||
using Microsoft.DotNet.ProjectModel.Compilation;
|
||||
using NuGet.Frameworks;
|
||||
using Microsoft.DotNet.ProjectModel.Utilities;
|
||||
|
||||
namespace Microsoft.DotNet.Tools.Compiler
|
||||
{
|
||||
|
|
|
@ -0,0 +1,17 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="14.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<PropertyGroup>
|
||||
<VisualStudioVersion Condition="'$(VisualStudioVersion)' == ''">14.0</VisualStudioVersion>
|
||||
<VSToolsPath Condition="'$(VSToolsPath)' == ''">$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion)</VSToolsPath>
|
||||
</PropertyGroup>
|
||||
<Import Project="$(VSToolsPath)\DNX\Microsoft.DNX.Props" Condition="'$(VSToolsPath)' != ''" />
|
||||
<PropertyGroup Label="Globals">
|
||||
<ProjectGuid>f003f228-2ae2-4e9d-877b-93eb773b5061</ProjectGuid>
|
||||
<BaseIntermediateOutputPath Condition="'$(BaseIntermediateOutputPath)'=='' ">..\..\artifacts\obj\$(MSBuildProjectName)</BaseIntermediateOutputPath>
|
||||
<OutputPath Condition="'$(OutputPath)'=='' ">..\..\artifacts\bin\$(MSBuildProjectName)\</OutputPath>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup>
|
||||
<SchemaVersion>2.0</SchemaVersion>
|
||||
</PropertyGroup>
|
||||
<Import Project="$(VSToolsPath)\DNX\Microsoft.DNX.targets" Condition="'$(VSToolsPath)' != ''" />
|
||||
</Project>
|
|
@ -0,0 +1,18 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="14.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<PropertyGroup>
|
||||
<VisualStudioVersion Condition="'$(VisualStudioVersion)' == ''">14.0</VisualStudioVersion>
|
||||
<VSToolsPath Condition="'$(VSToolsPath)' == ''">$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion)</VSToolsPath>
|
||||
</PropertyGroup>
|
||||
<Import Project="$(VSToolsPath)\DNX\Microsoft.DNX.Props" Condition="'$(VSToolsPath)' != ''" />
|
||||
<PropertyGroup Label="Globals">
|
||||
<ProjectGuid>dcdfe282-03de-4dbc-b90c-cc3ce3ec8162</ProjectGuid>
|
||||
<RootNamespace>Microsoft.Extensions.Testing.Abstractions</RootNamespace>
|
||||
<BaseIntermediateOutputPath Condition="'$(BaseIntermediateOutputPath)'=='' ">..\..\artifacts\obj\$(MSBuildProjectName)</BaseIntermediateOutputPath>
|
||||
<OutputPath Condition="'$(OutputPath)'=='' ">..\..\artifacts\bin\$(MSBuildProjectName)\</OutputPath>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup>
|
||||
<SchemaVersion>2.0</SchemaVersion>
|
||||
</PropertyGroup>
|
||||
<Import Project="$(VSToolsPath)\DNX\Microsoft.DNX.targets" Condition="'$(VSToolsPath)' != ''" />
|
||||
</Project>
|
|
@ -0,0 +1,31 @@
|
|||
using System.IO;
|
||||
using Microsoft.DotNet.ProjectModel;
|
||||
|
||||
namespace Microsoft.Extensions.Testing.Abstractions
|
||||
{
|
||||
public static class ProjectContextExtensions
|
||||
{
|
||||
public static string AssemblyPath(this ProjectContext projectContext, string buildConfiguration)
|
||||
{
|
||||
return Path.Combine(
|
||||
projectContext.OutputDirectoryPath(buildConfiguration),
|
||||
projectContext.ProjectFile.Name + FileNameSuffixes.DotNet.DynamicLib);
|
||||
}
|
||||
public static string PdbPath(this ProjectContext projectContext, string buildConfiguration)
|
||||
{
|
||||
return Path.Combine(
|
||||
projectContext.OutputDirectoryPath(buildConfiguration),
|
||||
projectContext.ProjectFile.Name + FileNameSuffixes.DotNet.ProgramDatabase);
|
||||
}
|
||||
|
||||
private static string OutputDirectoryPath(this ProjectContext projectContext, string buildConfiguration)
|
||||
{
|
||||
return Path.Combine(
|
||||
projectContext.ProjectDirectory,
|
||||
DirectoryNames.Bin,
|
||||
buildConfiguration,
|
||||
projectContext.TargetFramework.GetShortFolderName(),
|
||||
RuntimeIdentifier.Current);
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Add table
Reference in a new issue