Enable tests
This commit is contained in:
parent
ac23150af3
commit
96c79f9661
26 changed files with 288 additions and 394 deletions
|
@ -11,11 +11,9 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "redist", "src\redist\redist
|
||||||
EndProject
|
EndProject
|
||||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "EndToEnd.Tests", "test\EndToEnd\EndToEnd.Tests.csproj", "{1BFF54F9-4E35-49DB-893C-AF2047722FC6}"
|
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "EndToEnd.Tests", "test\EndToEnd\EndToEnd.Tests.csproj", "{1BFF54F9-4E35-49DB-893C-AF2047722FC6}"
|
||||||
EndProject
|
EndProject
|
||||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.DotNet.Tools.Tests.Utilities", "test\Microsoft.DotNet.Tools.Tests.Utilities\Microsoft.DotNet.Tools.Tests.Utilities.csproj", "{48E260F4-6F3F-4387-B61F-D15BABD06D9A}"
|
|
||||||
EndProject
|
|
||||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "core-sdk-tasks", "src\core-sdk-tasks\core-sdk-tasks.csproj", "{53AF2D01-B69F-4CD0-86A7-8FD95967D23C}"
|
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "core-sdk-tasks", "src\core-sdk-tasks\core-sdk-tasks.csproj", "{53AF2D01-B69F-4CD0-86A7-8FD95967D23C}"
|
||||||
EndProject
|
EndProject
|
||||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.DotNet.TestFramework", "test\Microsoft.DotNet.TestFramework\Microsoft.DotNet.TestFramework.csproj", "{D03CF1D2-39D1-4825-9AF0-4A4D3882CB69}"
|
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.DotNet.Tools.Tests.Utilities", "test\Microsoft.DotNet.Tools.Tests.Utilities\Microsoft.DotNet.Tools.Tests.Utilities.csproj", "{78E15EC1-7732-41E3-8591-934E9F583254}"
|
||||||
EndProject
|
EndProject
|
||||||
Global
|
Global
|
||||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||||
|
@ -81,30 +79,6 @@ Global
|
||||||
{1BFF54F9-4E35-49DB-893C-AF2047722FC6}.RelWithDebInfo|x64.Build.0 = Release|Any CPU
|
{1BFF54F9-4E35-49DB-893C-AF2047722FC6}.RelWithDebInfo|x64.Build.0 = Release|Any CPU
|
||||||
{1BFF54F9-4E35-49DB-893C-AF2047722FC6}.RelWithDebInfo|x86.ActiveCfg = Release|Any CPU
|
{1BFF54F9-4E35-49DB-893C-AF2047722FC6}.RelWithDebInfo|x86.ActiveCfg = Release|Any CPU
|
||||||
{1BFF54F9-4E35-49DB-893C-AF2047722FC6}.RelWithDebInfo|x86.Build.0 = Release|Any CPU
|
{1BFF54F9-4E35-49DB-893C-AF2047722FC6}.RelWithDebInfo|x86.Build.0 = Release|Any CPU
|
||||||
{48E260F4-6F3F-4387-B61F-D15BABD06D9A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
|
||||||
{48E260F4-6F3F-4387-B61F-D15BABD06D9A}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
|
||||||
{48E260F4-6F3F-4387-B61F-D15BABD06D9A}.Debug|x64.ActiveCfg = Release|Any CPU
|
|
||||||
{48E260F4-6F3F-4387-B61F-D15BABD06D9A}.Debug|x64.Build.0 = Release|Any CPU
|
|
||||||
{48E260F4-6F3F-4387-B61F-D15BABD06D9A}.Debug|x86.ActiveCfg = Release|Any CPU
|
|
||||||
{48E260F4-6F3F-4387-B61F-D15BABD06D9A}.Debug|x86.Build.0 = Release|Any CPU
|
|
||||||
{48E260F4-6F3F-4387-B61F-D15BABD06D9A}.MinSizeRel|Any CPU.ActiveCfg = Release|Any CPU
|
|
||||||
{48E260F4-6F3F-4387-B61F-D15BABD06D9A}.MinSizeRel|Any CPU.Build.0 = Release|Any CPU
|
|
||||||
{48E260F4-6F3F-4387-B61F-D15BABD06D9A}.MinSizeRel|x64.ActiveCfg = Release|Any CPU
|
|
||||||
{48E260F4-6F3F-4387-B61F-D15BABD06D9A}.MinSizeRel|x64.Build.0 = Release|Any CPU
|
|
||||||
{48E260F4-6F3F-4387-B61F-D15BABD06D9A}.MinSizeRel|x86.ActiveCfg = Release|Any CPU
|
|
||||||
{48E260F4-6F3F-4387-B61F-D15BABD06D9A}.MinSizeRel|x86.Build.0 = Release|Any CPU
|
|
||||||
{48E260F4-6F3F-4387-B61F-D15BABD06D9A}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
|
||||||
{48E260F4-6F3F-4387-B61F-D15BABD06D9A}.Release|Any CPU.Build.0 = Release|Any CPU
|
|
||||||
{48E260F4-6F3F-4387-B61F-D15BABD06D9A}.Release|x64.ActiveCfg = Release|Any CPU
|
|
||||||
{48E260F4-6F3F-4387-B61F-D15BABD06D9A}.Release|x64.Build.0 = Release|Any CPU
|
|
||||||
{48E260F4-6F3F-4387-B61F-D15BABD06D9A}.Release|x86.ActiveCfg = Release|Any CPU
|
|
||||||
{48E260F4-6F3F-4387-B61F-D15BABD06D9A}.Release|x86.Build.0 = Release|Any CPU
|
|
||||||
{48E260F4-6F3F-4387-B61F-D15BABD06D9A}.RelWithDebInfo|Any CPU.ActiveCfg = Release|Any CPU
|
|
||||||
{48E260F4-6F3F-4387-B61F-D15BABD06D9A}.RelWithDebInfo|Any CPU.Build.0 = Release|Any CPU
|
|
||||||
{48E260F4-6F3F-4387-B61F-D15BABD06D9A}.RelWithDebInfo|x64.ActiveCfg = Release|Any CPU
|
|
||||||
{48E260F4-6F3F-4387-B61F-D15BABD06D9A}.RelWithDebInfo|x64.Build.0 = Release|Any CPU
|
|
||||||
{48E260F4-6F3F-4387-B61F-D15BABD06D9A}.RelWithDebInfo|x86.ActiveCfg = Release|Any CPU
|
|
||||||
{48E260F4-6F3F-4387-B61F-D15BABD06D9A}.RelWithDebInfo|x86.Build.0 = Release|Any CPU
|
|
||||||
{53AF2D01-B69F-4CD0-86A7-8FD95967D23C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
{53AF2D01-B69F-4CD0-86A7-8FD95967D23C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||||
{53AF2D01-B69F-4CD0-86A7-8FD95967D23C}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
{53AF2D01-B69F-4CD0-86A7-8FD95967D23C}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||||
{53AF2D01-B69F-4CD0-86A7-8FD95967D23C}.Debug|x64.ActiveCfg = Debug|Any CPU
|
{53AF2D01-B69F-4CD0-86A7-8FD95967D23C}.Debug|x64.ActiveCfg = Debug|Any CPU
|
||||||
|
@ -129,30 +103,30 @@ Global
|
||||||
{53AF2D01-B69F-4CD0-86A7-8FD95967D23C}.RelWithDebInfo|x64.Build.0 = Release|Any CPU
|
{53AF2D01-B69F-4CD0-86A7-8FD95967D23C}.RelWithDebInfo|x64.Build.0 = Release|Any CPU
|
||||||
{53AF2D01-B69F-4CD0-86A7-8FD95967D23C}.RelWithDebInfo|x86.ActiveCfg = Release|Any CPU
|
{53AF2D01-B69F-4CD0-86A7-8FD95967D23C}.RelWithDebInfo|x86.ActiveCfg = Release|Any CPU
|
||||||
{53AF2D01-B69F-4CD0-86A7-8FD95967D23C}.RelWithDebInfo|x86.Build.0 = Release|Any CPU
|
{53AF2D01-B69F-4CD0-86A7-8FD95967D23C}.RelWithDebInfo|x86.Build.0 = Release|Any CPU
|
||||||
{D03CF1D2-39D1-4825-9AF0-4A4D3882CB69}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
{78E15EC1-7732-41E3-8591-934E9F583254}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||||
{D03CF1D2-39D1-4825-9AF0-4A4D3882CB69}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
{78E15EC1-7732-41E3-8591-934E9F583254}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||||
{D03CF1D2-39D1-4825-9AF0-4A4D3882CB69}.Debug|x64.ActiveCfg = Debug|Any CPU
|
{78E15EC1-7732-41E3-8591-934E9F583254}.Debug|x64.ActiveCfg = Debug|Any CPU
|
||||||
{D03CF1D2-39D1-4825-9AF0-4A4D3882CB69}.Debug|x64.Build.0 = Debug|Any CPU
|
{78E15EC1-7732-41E3-8591-934E9F583254}.Debug|x64.Build.0 = Debug|Any CPU
|
||||||
{D03CF1D2-39D1-4825-9AF0-4A4D3882CB69}.Debug|x86.ActiveCfg = Debug|Any CPU
|
{78E15EC1-7732-41E3-8591-934E9F583254}.Debug|x86.ActiveCfg = Debug|Any CPU
|
||||||
{D03CF1D2-39D1-4825-9AF0-4A4D3882CB69}.Debug|x86.Build.0 = Debug|Any CPU
|
{78E15EC1-7732-41E3-8591-934E9F583254}.Debug|x86.Build.0 = Debug|Any CPU
|
||||||
{D03CF1D2-39D1-4825-9AF0-4A4D3882CB69}.MinSizeRel|Any CPU.ActiveCfg = Debug|Any CPU
|
{78E15EC1-7732-41E3-8591-934E9F583254}.MinSizeRel|Any CPU.ActiveCfg = Debug|Any CPU
|
||||||
{D03CF1D2-39D1-4825-9AF0-4A4D3882CB69}.MinSizeRel|Any CPU.Build.0 = Debug|Any CPU
|
{78E15EC1-7732-41E3-8591-934E9F583254}.MinSizeRel|Any CPU.Build.0 = Debug|Any CPU
|
||||||
{D03CF1D2-39D1-4825-9AF0-4A4D3882CB69}.MinSizeRel|x64.ActiveCfg = Debug|Any CPU
|
{78E15EC1-7732-41E3-8591-934E9F583254}.MinSizeRel|x64.ActiveCfg = Debug|Any CPU
|
||||||
{D03CF1D2-39D1-4825-9AF0-4A4D3882CB69}.MinSizeRel|x64.Build.0 = Debug|Any CPU
|
{78E15EC1-7732-41E3-8591-934E9F583254}.MinSizeRel|x64.Build.0 = Debug|Any CPU
|
||||||
{D03CF1D2-39D1-4825-9AF0-4A4D3882CB69}.MinSizeRel|x86.ActiveCfg = Debug|Any CPU
|
{78E15EC1-7732-41E3-8591-934E9F583254}.MinSizeRel|x86.ActiveCfg = Debug|Any CPU
|
||||||
{D03CF1D2-39D1-4825-9AF0-4A4D3882CB69}.MinSizeRel|x86.Build.0 = Debug|Any CPU
|
{78E15EC1-7732-41E3-8591-934E9F583254}.MinSizeRel|x86.Build.0 = Debug|Any CPU
|
||||||
{D03CF1D2-39D1-4825-9AF0-4A4D3882CB69}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
{78E15EC1-7732-41E3-8591-934E9F583254}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||||
{D03CF1D2-39D1-4825-9AF0-4A4D3882CB69}.Release|Any CPU.Build.0 = Release|Any CPU
|
{78E15EC1-7732-41E3-8591-934E9F583254}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||||
{D03CF1D2-39D1-4825-9AF0-4A4D3882CB69}.Release|x64.ActiveCfg = Release|Any CPU
|
{78E15EC1-7732-41E3-8591-934E9F583254}.Release|x64.ActiveCfg = Release|Any CPU
|
||||||
{D03CF1D2-39D1-4825-9AF0-4A4D3882CB69}.Release|x64.Build.0 = Release|Any CPU
|
{78E15EC1-7732-41E3-8591-934E9F583254}.Release|x64.Build.0 = Release|Any CPU
|
||||||
{D03CF1D2-39D1-4825-9AF0-4A4D3882CB69}.Release|x86.ActiveCfg = Release|Any CPU
|
{78E15EC1-7732-41E3-8591-934E9F583254}.Release|x86.ActiveCfg = Release|Any CPU
|
||||||
{D03CF1D2-39D1-4825-9AF0-4A4D3882CB69}.Release|x86.Build.0 = Release|Any CPU
|
{78E15EC1-7732-41E3-8591-934E9F583254}.Release|x86.Build.0 = Release|Any CPU
|
||||||
{D03CF1D2-39D1-4825-9AF0-4A4D3882CB69}.RelWithDebInfo|Any CPU.ActiveCfg = Release|Any CPU
|
{78E15EC1-7732-41E3-8591-934E9F583254}.RelWithDebInfo|Any CPU.ActiveCfg = Release|Any CPU
|
||||||
{D03CF1D2-39D1-4825-9AF0-4A4D3882CB69}.RelWithDebInfo|Any CPU.Build.0 = Release|Any CPU
|
{78E15EC1-7732-41E3-8591-934E9F583254}.RelWithDebInfo|Any CPU.Build.0 = Release|Any CPU
|
||||||
{D03CF1D2-39D1-4825-9AF0-4A4D3882CB69}.RelWithDebInfo|x64.ActiveCfg = Release|Any CPU
|
{78E15EC1-7732-41E3-8591-934E9F583254}.RelWithDebInfo|x64.ActiveCfg = Release|Any CPU
|
||||||
{D03CF1D2-39D1-4825-9AF0-4A4D3882CB69}.RelWithDebInfo|x64.Build.0 = Release|Any CPU
|
{78E15EC1-7732-41E3-8591-934E9F583254}.RelWithDebInfo|x64.Build.0 = Release|Any CPU
|
||||||
{D03CF1D2-39D1-4825-9AF0-4A4D3882CB69}.RelWithDebInfo|x86.ActiveCfg = Release|Any CPU
|
{78E15EC1-7732-41E3-8591-934E9F583254}.RelWithDebInfo|x86.ActiveCfg = Release|Any CPU
|
||||||
{D03CF1D2-39D1-4825-9AF0-4A4D3882CB69}.RelWithDebInfo|x86.Build.0 = Release|Any CPU
|
{78E15EC1-7732-41E3-8591-934E9F583254}.RelWithDebInfo|x86.Build.0 = Release|Any CPU
|
||||||
EndGlobalSection
|
EndGlobalSection
|
||||||
GlobalSection(SolutionProperties) = preSolution
|
GlobalSection(SolutionProperties) = preSolution
|
||||||
HideSolutionNode = FALSE
|
HideSolutionNode = FALSE
|
||||||
|
@ -160,9 +134,8 @@ Global
|
||||||
GlobalSection(NestedProjects) = preSolution
|
GlobalSection(NestedProjects) = preSolution
|
||||||
{098D9321-1201-4974-A75E-F58EBCD98ACF} = {ED2FE3E2-F7E7-4389-8231-B65123F2076F}
|
{098D9321-1201-4974-A75E-F58EBCD98ACF} = {ED2FE3E2-F7E7-4389-8231-B65123F2076F}
|
||||||
{1BFF54F9-4E35-49DB-893C-AF2047722FC6} = {17735A9D-BFD9-4585-A7CB-3208CA6EA8A7}
|
{1BFF54F9-4E35-49DB-893C-AF2047722FC6} = {17735A9D-BFD9-4585-A7CB-3208CA6EA8A7}
|
||||||
{48E260F4-6F3F-4387-B61F-D15BABD06D9A} = {17735A9D-BFD9-4585-A7CB-3208CA6EA8A7}
|
|
||||||
{53AF2D01-B69F-4CD0-86A7-8FD95967D23C} = {ED2FE3E2-F7E7-4389-8231-B65123F2076F}
|
{53AF2D01-B69F-4CD0-86A7-8FD95967D23C} = {ED2FE3E2-F7E7-4389-8231-B65123F2076F}
|
||||||
{D03CF1D2-39D1-4825-9AF0-4A4D3882CB69} = {17735A9D-BFD9-4585-A7CB-3208CA6EA8A7}
|
{78E15EC1-7732-41E3-8591-934E9F583254} = {17735A9D-BFD9-4585-A7CB-3208CA6EA8A7}
|
||||||
EndGlobalSection
|
EndGlobalSection
|
||||||
GlobalSection(ExtensibilityGlobals) = postSolution
|
GlobalSection(ExtensibilityGlobals) = postSolution
|
||||||
SolutionGuid = {B526D2CE-EE2D-4AD4-93EF-1867D90FF1F5}
|
SolutionGuid = {B526D2CE-EE2D-4AD4-93EF-1867D90FF1F5}
|
||||||
|
|
3
TestAssets/Directory.Build.targets
Normal file
3
TestAssets/Directory.Build.targets
Normal file
|
@ -0,0 +1,3 @@
|
||||||
|
<Project>
|
||||||
|
<!-- Empty Directory.Build.targets file to prevent test asset projects from picking up the repo's Directory.Build.props' -->
|
||||||
|
</Project>
|
|
@ -1,21 +1,16 @@
|
||||||
<Project>
|
<Project Sdk="Microsoft.NET.Sdk">
|
||||||
<Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), testAsset.props))\testAsset.props" />
|
|
||||||
<Import Sdk="Microsoft.NET.Sdk" Project="Sdk.props" />
|
|
||||||
|
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<VersionPrefix>1.0.0-rc</VersionPrefix>
|
<VersionPrefix>1.0.0-rc</VersionPrefix>
|
||||||
<TargetFramework>$(CliTargetFramework)</TargetFramework>
|
<TargetFramework>netcoreapp3.0</TargetFramework>
|
||||||
<OutputType>Exe</OutputType>
|
<OutputType>Exe</OutputType>
|
||||||
<VersionSuffix></VersionSuffix>
|
<VersionSuffix></VersionSuffix>
|
||||||
<RuntimeFrameworkVersion>$(MicrosoftNETCoreAppPackageVersion)</RuntimeFrameworkVersion>
|
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<PackageReference Include="NuGet.Frameworks" Version="$(NuGetFrameworksPackageVersion)" />
|
<PackageReference Include="NuGet.Frameworks" Version="4.8.0-rtm.5348" />
|
||||||
<PackageReference Include="Microsoft.DotNet.Cli.Utils" Version="$(MicrosoftDotNetCliUtilsPackageVersion)" />
|
<PackageReference Include="Microsoft.DotNet.Cli.Utils" Version="3.0.100-alpha1-20180711-1" />
|
||||||
<PackageReference Include="Microsoft.DotNet.Cli.CommandLine" Version="$(MicrosoftDotNetCliCommandLinePackageVersion)" />
|
<PackageReference Include="Microsoft.DotNet.Cli.CommandLine" Version="0.1.1" />
|
||||||
<PackageReference Include="System.Linq" Version="4.3.0" />
|
<PackageReference Include="System.Linq" Version="4.3.0" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
<Import Sdk="Microsoft.NET.Sdk" Project="Sdk.targets" />
|
|
||||||
</Project>
|
</Project>
|
||||||
|
|
|
@ -1,8 +1,6 @@
|
||||||
<Project Sdk="Microsoft.NET.Sdk" ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
<Project Sdk="Microsoft.NET.Sdk">
|
||||||
<Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), testAsset.props))\testAsset.props" />
|
|
||||||
|
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<TargetFramework>$(CliTargetFramework)</TargetFramework>
|
<TargetFramework>netcoreapp3.0</TargetFramework>
|
||||||
<OutputType>Exe</OutputType>
|
<OutputType>Exe</OutputType>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
|
||||||
|
|
|
@ -1,8 +1,6 @@
|
||||||
<Project Sdk="Microsoft.NET.Sdk" ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
<Project Sdk="Microsoft.NET.Sdk">
|
||||||
<Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), testAsset.props))\testAsset.props" />
|
|
||||||
|
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<TargetFramework>$(CliTargetFramework)</TargetFramework>
|
<TargetFramework>netcoreapp3.0</TargetFramework>
|
||||||
<OutputType>Exe</OutputType>
|
<OutputType>Exe</OutputType>
|
||||||
<VersionSuffix></VersionSuffix>
|
<VersionSuffix></VersionSuffix>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
|
|
@ -1,10 +1,8 @@
|
||||||
<Project Sdk="Microsoft.NET.Sdk" ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
<Project Sdk="Microsoft.NET.Sdk" ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||||
<Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), testAsset.props))\testAsset.props" />
|
|
||||||
|
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<OutputType>Exe</OutputType>
|
<OutputType>Exe</OutputType>
|
||||||
<TargetFramework>$(CliTargetFramework)</TargetFramework>
|
<TargetFramework>netcoreapp3.0</TargetFramework>
|
||||||
<RuntimeIdentifiers>win7-x64;win7-x86;osx.10.12-x64;ubuntu.14.04-x64;ubuntu.16.04-x64;ubuntu.16.10-x64;rhel.6-x64;centos.7-x64;rhel.7-x64;debian.8-x64;fedora.24-x64;opensuse.42.1-x64;linux-musl-x64</RuntimeIdentifiers>
|
|
||||||
<RestoreAdditionalProjectSources Condition="'$(TEST_PACKAGES)' != ''">$(TEST_PACKAGES)</RestoreAdditionalProjectSources>
|
<RestoreAdditionalProjectSources Condition="'$(TEST_PACKAGES)' != ''">$(TEST_PACKAGES)</RestoreAdditionalProjectSources>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
|
||||||
|
|
|
@ -1,9 +1,8 @@
|
||||||
<Project Sdk="Microsoft.NET.Sdk">
|
<Project Sdk="Microsoft.NET.Sdk">
|
||||||
<Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), testAsset.props))\testAsset.props" />
|
|
||||||
|
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<OutputType>Exe</OutputType>
|
<OutputType>Exe</OutputType>
|
||||||
<TargetFramework>$(CliTargetFramework)</TargetFramework>
|
<TargetFramework>netcoreapp3.0</TargetFramework>
|
||||||
<RestoreAdditionalProjectSources Condition="'$(TEST_PACKAGES)' != ''">$(TEST_PACKAGES)</RestoreAdditionalProjectSources>
|
<RestoreAdditionalProjectSources Condition="'$(TEST_PACKAGES)' != ''">$(TEST_PACKAGES)</RestoreAdditionalProjectSources>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
|
||||||
|
|
|
@ -4,14 +4,10 @@
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<!-- <Content Include="..\..\artifacts\*\stage2\sdk\*\.version">
|
<!-- Copy empty Directory.Build files to stop tests from getting repo build logic -->
|
||||||
<Link>.version</Link>
|
<Content Include="$(RepoRoot)TestAssets\Directory.Build.props" LinkBase="Tests" CopyToOutputDirectory="PreserveNewest" />
|
||||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
<Content Include="$(RepoRoot)TestAssets\Directory.Build.targets" LinkBase="Tests" CopyToOutputDirectory="PreserveNewest" />
|
||||||
</Content> -->
|
|
||||||
</ItemGroup>
|
|
||||||
|
|
||||||
<ItemGroup>
|
|
||||||
<ProjectReference Include="..\Microsoft.DotNet.Tools.Tests.Utilities\Microsoft.DotNet.Tools.Tests.Utilities.csproj" />
|
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
|
@ -19,4 +15,8 @@
|
||||||
<PackageReference Include="xunit" Version="2.2.0" /> -->
|
<PackageReference Include="xunit" Version="2.2.0" /> -->
|
||||||
<PackageReference Include="Microsoft.DotNet.PlatformAbstractions" Version="$(MicrosoftDotNetPlatformAbstractionsPackageVersion)" />
|
<PackageReference Include="Microsoft.DotNet.PlatformAbstractions" Version="$(MicrosoftDotNetPlatformAbstractionsPackageVersion)" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
|
<ItemGroup>
|
||||||
|
<ProjectReference Include="..\Microsoft.DotNet.Tools.Tests.Utilities\Microsoft.DotNet.Tools.Tests.Utilities.csproj" />
|
||||||
|
</ItemGroup>
|
||||||
</Project>
|
</Project>
|
||||||
|
|
|
@ -175,30 +175,29 @@ namespace EndToEnd
|
||||||
[Fact(Skip = "https://github.com/dotnet/core-sdk/issues/21")]
|
[Fact(Skip = "https://github.com/dotnet/core-sdk/issues/21")]
|
||||||
public void WeCoverLatestAspNetCoreAppRollForward()
|
public void WeCoverLatestAspNetCoreAppRollForward()
|
||||||
{
|
{
|
||||||
|
var directory = TestAssets.CreateTestDirectory();
|
||||||
|
string projectDirectory = directory.FullName;
|
||||||
|
|
||||||
// Run "dotnet new web", get TargetFramework property, and make sure it's covered in SupportedAspNetCoreAppVersions
|
// Run "dotnet new web", get TargetFramework property, and make sure it's covered in SupportedAspNetCoreAppVersions
|
||||||
using (DisposableDirectory directory = Temp.CreateDirectory())
|
|
||||||
{
|
|
||||||
string projectDirectory = directory.Path;
|
|
||||||
|
|
||||||
new NewCommandShim()
|
new NewCommandShim()
|
||||||
.WithWorkingDirectory(projectDirectory)
|
.WithWorkingDirectory(projectDirectory)
|
||||||
.Execute("web --no-restore")
|
.Execute("web --no-restore")
|
||||||
.Should().Pass();
|
.Should().Pass();
|
||||||
|
|
||||||
string projectPath = Path.Combine(projectDirectory, Path.GetFileName(projectDirectory) + ".csproj");
|
string projectPath = Path.Combine(projectDirectory, Path.GetFileName(projectDirectory) + ".csproj");
|
||||||
|
|
||||||
var project = XDocument.Load(projectPath);
|
var project = XDocument.Load(projectPath);
|
||||||
var ns = project.Root.Name.Namespace;
|
var ns = project.Root.Name.Namespace;
|
||||||
|
|
||||||
string targetFramework = project.Root.Element(ns + "PropertyGroup")
|
string targetFramework = project.Root.Element(ns + "PropertyGroup")
|
||||||
.Element(ns + "TargetFramework")
|
.Element(ns + "TargetFramework")
|
||||||
.Value;
|
.Value;
|
||||||
|
|
||||||
SupportedAspNetCoreAppVersions.Select(v => $"netcoreapp{v[0]}")
|
SupportedAspNetCoreAppVersions.Select(v => $"netcoreapp{v[0]}")
|
||||||
.Should().Contain(targetFramework, $"the {nameof(SupportedAspNetCoreAppVersions)} property should include the default version " +
|
.Should().Contain(targetFramework, $"the {nameof(SupportedAspNetCoreAppVersions)} property should include the default version " +
|
||||||
"of Microsoft.AspNetCore.App used by the templates created by \"dotnet new web\"");
|
"of Microsoft.AspNetCore.App used by the templates created by \"dotnet new web\"");
|
||||||
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private NuGetVersion GetAspNetCoreAppVersion(LockFile lockFile, bool portable = false)
|
private NuGetVersion GetAspNetCoreAppVersion(LockFile lockFile, bool portable = false)
|
||||||
|
|
|
@ -5,6 +5,7 @@ using System;
|
||||||
using System.IO;
|
using System.IO;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
using System.Xml.Linq;
|
using System.Xml.Linq;
|
||||||
|
using Microsoft.DotNet.TestFramework;
|
||||||
using Microsoft.DotNet.Tools.Test.Utilities;
|
using Microsoft.DotNet.Tools.Test.Utilities;
|
||||||
using Xunit;
|
using Xunit;
|
||||||
|
|
||||||
|
@ -14,50 +15,61 @@ namespace Microsoft.DotNet.Tests.EndToEnd
|
||||||
{
|
{
|
||||||
public class GivenDotNetUsesMSBuild : TestBase
|
public class GivenDotNetUsesMSBuild : TestBase
|
||||||
{
|
{
|
||||||
|
private string _testPackagesDirectory;
|
||||||
|
private string _testNuGetCache;
|
||||||
|
|
||||||
|
public GivenDotNetUsesMSBuild()
|
||||||
|
{
|
||||||
|
_testPackagesDirectory = SetupTestPackages();
|
||||||
|
|
||||||
|
_testNuGetCache = TestAssets.CreateTestDirectory(testProjectName: string.Empty,
|
||||||
|
callingMethod: "packages",
|
||||||
|
identifier: string.Empty)
|
||||||
|
.FullName;
|
||||||
|
}
|
||||||
|
|
||||||
[Fact]
|
[Fact]
|
||||||
public void ItCanNewRestoreBuildRunCleanMSBuildProject()
|
public void ItCanNewRestoreBuildRunCleanMSBuildProject()
|
||||||
{
|
{
|
||||||
using (DisposableDirectory directory = Temp.CreateDirectory())
|
var directory = TestAssets.CreateTestDirectory();
|
||||||
{
|
string projectDirectory = directory.FullName;
|
||||||
string projectDirectory = directory.Path;
|
|
||||||
|
string newArgs = "console --debug:ephemeral-hive --no-restore";
|
||||||
|
new NewCommandShim()
|
||||||
|
.WithWorkingDirectory(projectDirectory)
|
||||||
|
.Execute(newArgs)
|
||||||
|
.Should().Pass();
|
||||||
|
|
||||||
string newArgs = "console --debug:ephemeral-hive --no-restore";
|
new RestoreCommand()
|
||||||
new NewCommandShim()
|
.WithWorkingDirectory(projectDirectory)
|
||||||
.WithWorkingDirectory(projectDirectory)
|
.Execute("/p:SkipInvalidConfigurations=true")
|
||||||
.Execute(newArgs)
|
.Should().Pass();
|
||||||
.Should().Pass();
|
|
||||||
|
|
||||||
new RestoreCommand()
|
new BuildCommand()
|
||||||
.WithWorkingDirectory(projectDirectory)
|
.WithWorkingDirectory(projectDirectory)
|
||||||
.Execute("/p:SkipInvalidConfigurations=true")
|
.Execute()
|
||||||
.Should().Pass();
|
.Should().Pass();
|
||||||
|
|
||||||
new BuildCommand()
|
var runCommand = new RunCommand()
|
||||||
.WithWorkingDirectory(projectDirectory)
|
.WithWorkingDirectory(projectDirectory);
|
||||||
.Execute()
|
|
||||||
.Should().Pass();
|
|
||||||
|
|
||||||
var runCommand = new RunCommand()
|
// Set DOTNET_ROOT as workaround for https://github.com/dotnet/cli/issues/10196
|
||||||
.WithWorkingDirectory(projectDirectory);
|
runCommand = runCommand.WithEnvironmentVariable(Environment.Is64BitProcess ? "DOTNET_ROOT" : "DOTNET_ROOT(x86)",
|
||||||
|
Path.GetDirectoryName(DotnetUnderTest.FullName));
|
||||||
|
|
||||||
// Set DOTNET_ROOT as workaround for https://github.com/dotnet/cli/issues/10196
|
runCommand.ExecuteWithCapturedOutput()
|
||||||
runCommand = runCommand.WithEnvironmentVariable(Environment.Is64BitProcess ? "DOTNET_ROOT" : "DOTNET_ROOT(x86)",
|
.Should().Pass()
|
||||||
Path.GetDirectoryName(DotnetUnderTest.FullName));
|
.And.HaveStdOutContaining("Hello World!");
|
||||||
|
|
||||||
runCommand.ExecuteWithCapturedOutput()
|
var binDirectory = new DirectoryInfo(projectDirectory).Sub("bin");
|
||||||
.Should().Pass()
|
binDirectory.Should().HaveFilesMatching("*.dll", SearchOption.AllDirectories);
|
||||||
.And.HaveStdOutContaining("Hello World!");
|
|
||||||
|
|
||||||
var binDirectory = new DirectoryInfo(projectDirectory).Sub("bin");
|
new CleanCommand()
|
||||||
binDirectory.Should().HaveFilesMatching("*.dll", SearchOption.AllDirectories);
|
.WithWorkingDirectory(projectDirectory)
|
||||||
|
.Execute()
|
||||||
|
.Should().Pass();
|
||||||
|
|
||||||
new CleanCommand()
|
binDirectory.Should().NotHaveFilesMatching("*.dll", SearchOption.AllDirectories);
|
||||||
.WithWorkingDirectory(projectDirectory)
|
|
||||||
.Execute()
|
|
||||||
.Should().Pass();
|
|
||||||
|
|
||||||
binDirectory.Should().NotHaveFilesMatching("*.dll", SearchOption.AllDirectories);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
[Fact]
|
[Fact]
|
||||||
|
@ -65,13 +77,22 @@ namespace Microsoft.DotNet.Tests.EndToEnd
|
||||||
{
|
{
|
||||||
var testInstance = TestAssets.Get("MSBuildTestApp")
|
var testInstance = TestAssets.Get("MSBuildTestApp")
|
||||||
.CreateInstance()
|
.CreateInstance()
|
||||||
.WithSourceFiles()
|
.WithSourceFiles();
|
||||||
.WithRestoreFiles();
|
|
||||||
|
|
||||||
var testProjectDirectory = testInstance.Root;
|
var testProjectDirectory = testInstance.Root;
|
||||||
|
|
||||||
|
new RestoreCommand()
|
||||||
|
.WithWorkingDirectory(testProjectDirectory)
|
||||||
|
.WithEnvironmentVariable("NUGET_PACKAGES", _testNuGetCache)
|
||||||
|
.WithEnvironmentVariable("TEST_PACKAGES", _testPackagesDirectory)
|
||||||
|
.Execute()
|
||||||
|
.Should()
|
||||||
|
.Pass();
|
||||||
|
|
||||||
new DotnetCommand()
|
new DotnetCommand()
|
||||||
.WithWorkingDirectory(testInstance.Root)
|
.WithWorkingDirectory(testInstance.Root)
|
||||||
|
.WithEnvironmentVariable("NUGET_PACKAGES", _testNuGetCache)
|
||||||
|
.WithEnvironmentVariable("TEST_PACKAGES", _testPackagesDirectory)
|
||||||
.ExecuteWithCapturedOutput("-d portable")
|
.ExecuteWithCapturedOutput("-d portable")
|
||||||
.Should()
|
.Should()
|
||||||
.Pass()
|
.Pass()
|
||||||
|
@ -79,49 +100,133 @@ namespace Microsoft.DotNet.Tests.EndToEnd
|
||||||
.HaveStdOutContaining("Hello Portable World!");;
|
.HaveStdOutContaining("Hello Portable World!");;
|
||||||
}
|
}
|
||||||
|
|
||||||
[Fact(Skip="https://github.com/dotnet/cli/issues/9688")]
|
[Fact]
|
||||||
public void ItCanRunToolsThatPrefersTheCliRuntimeEvenWhenTheToolItselfDeclaresADifferentRuntime()
|
public void ItCanRunToolsThatPrefersTheCliRuntimeEvenWhenTheToolItselfDeclaresADifferentRuntime()
|
||||||
{
|
{
|
||||||
var testInstance = TestAssets.Get("MSBuildTestApp")
|
var testInstance = TestAssets.Get("MSBuildTestApp")
|
||||||
.CreateInstance()
|
.CreateInstance()
|
||||||
.WithSourceFiles()
|
.WithSourceFiles();
|
||||||
.WithRestoreFiles();
|
|
||||||
|
|
||||||
var testProjectDirectory = testInstance.Root;
|
var testProjectDirectory = testInstance.Root;
|
||||||
|
|
||||||
|
new RestoreCommand()
|
||||||
|
.WithWorkingDirectory(testProjectDirectory)
|
||||||
|
.WithEnvironmentVariable("NUGET_PACKAGES", _testNuGetCache)
|
||||||
|
.WithEnvironmentVariable("TEST_PACKAGES", _testPackagesDirectory)
|
||||||
|
.Execute()
|
||||||
|
.Should()
|
||||||
|
.Pass();
|
||||||
|
|
||||||
|
|
||||||
new DotnetCommand()
|
new DotnetCommand()
|
||||||
.WithWorkingDirectory(testInstance.Root)
|
.WithWorkingDirectory(testInstance.Root)
|
||||||
|
.WithEnvironmentVariable("NUGET_PACKAGES", _testNuGetCache)
|
||||||
|
.WithEnvironmentVariable("TEST_PACKAGES", _testPackagesDirectory)
|
||||||
.ExecuteWithCapturedOutput("-d prefercliruntime")
|
.ExecuteWithCapturedOutput("-d prefercliruntime")
|
||||||
.Should().Pass()
|
.Should().Pass()
|
||||||
.And.HaveStdOutContaining("Hello I prefer the cli runtime World!");;
|
.And.HaveStdOutContaining("Hello I prefer the cli runtime World!");;
|
||||||
}
|
}
|
||||||
|
|
||||||
[Fact(Skip="https://github.com/dotnet/cli/issues/9688")]
|
[Fact]
|
||||||
public void ItCanRunAToolThatInvokesADependencyToolInACSProj()
|
public void ItCanRunAToolThatInvokesADependencyToolInACSProj()
|
||||||
{
|
{
|
||||||
var repoDirectoriesProvider = new RepoDirectoriesProvider();
|
var repoDirectoriesProvider = new RepoDirectoriesProvider();
|
||||||
|
|
||||||
var testInstance = TestAssets.Get("TestAppWithProjDepTool")
|
var testInstance = TestAssets.Get("TestAppWithProjDepTool")
|
||||||
.CreateInstance()
|
.CreateInstance()
|
||||||
.WithSourceFiles()
|
.WithSourceFiles();
|
||||||
.WithRestoreFiles();
|
|
||||||
|
|
||||||
var configuration = "Debug";
|
var configuration = "Debug";
|
||||||
|
|
||||||
var testProjectDirectory = testInstance.Root;
|
var testProjectDirectory = testInstance.Root;
|
||||||
|
|
||||||
|
new RestoreCommand()
|
||||||
|
.WithWorkingDirectory(testProjectDirectory)
|
||||||
|
.WithEnvironmentVariable("NUGET_PACKAGES", _testNuGetCache)
|
||||||
|
.WithEnvironmentVariable("TEST_PACKAGES", _testPackagesDirectory)
|
||||||
|
.Execute()
|
||||||
|
.Should()
|
||||||
|
.Pass();
|
||||||
|
|
||||||
new BuildCommand()
|
new BuildCommand()
|
||||||
.WithWorkingDirectory(testProjectDirectory)
|
.WithWorkingDirectory(testProjectDirectory)
|
||||||
|
.WithEnvironmentVariable("NUGET_PACKAGES", _testNuGetCache)
|
||||||
|
.WithEnvironmentVariable("TEST_PACKAGES", _testPackagesDirectory)
|
||||||
.Execute($"-c {configuration} ")
|
.Execute($"-c {configuration} ")
|
||||||
.Should()
|
.Should()
|
||||||
.Pass();
|
.Pass();
|
||||||
|
|
||||||
new DotnetCommand()
|
new DotnetCommand()
|
||||||
.WithWorkingDirectory(testProjectDirectory)
|
.WithWorkingDirectory(testProjectDirectory)
|
||||||
|
.WithEnvironmentVariable("NUGET_PACKAGES", _testNuGetCache)
|
||||||
|
.WithEnvironmentVariable("TEST_PACKAGES", _testPackagesDirectory)
|
||||||
.ExecuteWithCapturedOutput(
|
.ExecuteWithCapturedOutput(
|
||||||
$"-d dependency-tool-invoker -c {configuration} -f netcoreapp3.0 portable")
|
$"-d dependency-tool-invoker -c {configuration} -f netcoreapp3.0 portable")
|
||||||
.Should().Pass()
|
.Should().Pass()
|
||||||
.And.HaveStdOutContaining("Hello Portable World!");;
|
.And.HaveStdOutContaining("Hello Portable World!");
|
||||||
|
}
|
||||||
|
|
||||||
|
[Fact]
|
||||||
|
public void BuildTestPackages()
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
private string SetupTestPackages()
|
||||||
|
{
|
||||||
|
var directory = TestAssets.CreateTestDirectory(
|
||||||
|
testProjectName: string.Empty,
|
||||||
|
callingMethod: "TestPackages",
|
||||||
|
identifier: string.Empty);
|
||||||
|
|
||||||
|
string testPackagesDirectory = Path.Combine(directory.FullName, "testPackages");
|
||||||
|
|
||||||
|
if (!Directory.Exists(testPackagesDirectory))
|
||||||
|
{
|
||||||
|
new DirectoryInfo(testPackagesDirectory).Create();
|
||||||
|
//Directory.CreateDirectory(testPackagesDirectory);
|
||||||
|
}
|
||||||
|
|
||||||
|
var testPackageNames = new[]
|
||||||
|
{
|
||||||
|
"dotnet-portable",
|
||||||
|
"dotnet-prefercliruntime",
|
||||||
|
"dotnet-dependency-tool-invoker"
|
||||||
|
};
|
||||||
|
|
||||||
|
foreach (var testPackageName in testPackageNames)
|
||||||
|
{
|
||||||
|
|
||||||
|
|
||||||
|
var assetInfo = TestAssets.Get(TestAssetKinds.TestPackages, testPackageName);
|
||||||
|
|
||||||
|
var testProjectDirectory = new DirectoryInfo(Path.Combine(directory.FullName, testPackageName));
|
||||||
|
|
||||||
|
if (!testProjectDirectory.Exists)
|
||||||
|
{
|
||||||
|
testProjectDirectory.Create();
|
||||||
|
}
|
||||||
|
|
||||||
|
var testInstance = new TestAssetInstance(assetInfo, testProjectDirectory)
|
||||||
|
.WithSourceFiles()
|
||||||
|
.WithRestoreFiles();
|
||||||
|
|
||||||
|
new PackCommand()
|
||||||
|
.WithWorkingDirectory(testProjectDirectory)
|
||||||
|
.Execute()
|
||||||
|
.Should()
|
||||||
|
.Pass();
|
||||||
|
|
||||||
|
string nupkgFilePathInOutput = Directory.GetFiles(Path.Combine(testProjectDirectory.FullName, "bin", "Debug"), "*.nupkg")
|
||||||
|
.Single();
|
||||||
|
|
||||||
|
string nupkgFile = Path.Combine(testPackagesDirectory, Path.GetFileName(nupkgFilePathInOutput));
|
||||||
|
|
||||||
|
File.Copy(nupkgFilePathInOutput, nupkgFile);
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
return testPackagesDirectory;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -40,8 +40,6 @@ namespace EndToEnd
|
||||||
{
|
{
|
||||||
var _testInstance = TestAssets.Get("TestAppSimple")
|
var _testInstance = TestAssets.Get("TestAppSimple")
|
||||||
.CreateInstance(identifier: packageName + "_" + minorVersion)
|
.CreateInstance(identifier: packageName + "_" + minorVersion)
|
||||||
// scope the feed to only dotnet-core feed to avoid flaky when different feed has a newer / lower version
|
|
||||||
.WithNuGetConfig(new RepoDirectoriesProvider().TestPackages)
|
|
||||||
.WithSourceFiles();
|
.WithSourceFiles();
|
||||||
|
|
||||||
string projectDirectory = _testInstance.Root.FullName;
|
string projectDirectory = _testInstance.Root.FullName;
|
||||||
|
|
|
@ -141,57 +141,55 @@ namespace EndToEnd
|
||||||
public void WeCoverLatestNetCoreAppRollForward()
|
public void WeCoverLatestNetCoreAppRollForward()
|
||||||
{
|
{
|
||||||
// Run "dotnet new console", get TargetFramework property, and make sure it's covered in SupportedNetCoreAppVersions
|
// Run "dotnet new console", get TargetFramework property, and make sure it's covered in SupportedNetCoreAppVersions
|
||||||
using (DisposableDirectory directory = Temp.CreateDirectory())
|
var directory = TestAssets.CreateTestDirectory();
|
||||||
{
|
string projectDirectory = directory.FullName;
|
||||||
string projectDirectory = directory.Path;
|
|
||||||
|
|
||||||
new NewCommandShim()
|
new NewCommandShim()
|
||||||
.WithWorkingDirectory(projectDirectory)
|
.WithWorkingDirectory(projectDirectory)
|
||||||
.Execute("console --no-restore")
|
.Execute("console --no-restore")
|
||||||
.Should().Pass();
|
.Should().Pass();
|
||||||
|
|
||||||
string projectPath = Path.Combine(projectDirectory, Path.GetFileName(projectDirectory) + ".csproj");
|
string projectPath = Path.Combine(projectDirectory, Path.GetFileName(projectDirectory) + ".csproj");
|
||||||
|
|
||||||
var project = XDocument.Load(projectPath);
|
var project = XDocument.Load(projectPath);
|
||||||
var ns = project.Root.Name.Namespace;
|
var ns = project.Root.Name.Namespace;
|
||||||
|
|
||||||
string targetFramework = project.Root.Element(ns + "PropertyGroup")
|
string targetFramework = project.Root.Element(ns + "PropertyGroup")
|
||||||
.Element(ns + "TargetFramework")
|
.Element(ns + "TargetFramework")
|
||||||
.Value;
|
.Value;
|
||||||
|
|
||||||
SupportedNetCoreAppVersions.Versions.Select(v => $"netcoreapp{v}")
|
SupportedNetCoreAppVersions.Versions.Select(v => $"netcoreapp{v}")
|
||||||
.Should().Contain(targetFramework, $"the {nameof(SupportedNetCoreAppVersions)}.{nameof(SupportedNetCoreAppVersions.Versions)} property should include the default version " +
|
.Should().Contain(targetFramework, $"the {nameof(SupportedNetCoreAppVersions)}.{nameof(SupportedNetCoreAppVersions.Versions)} property should include the default version " +
|
||||||
"of .NET Core created by \"dotnet new\"");
|
"of .NET Core created by \"dotnet new\"");
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
[Fact]
|
[Fact]
|
||||||
public void WeCoverLatestAspNetCoreAppRollForward()
|
public void WeCoverLatestAspNetCoreAppRollForward()
|
||||||
{
|
{
|
||||||
|
var directory = TestAssets.CreateTestDirectory();
|
||||||
|
string projectDirectory = directory.FullName;
|
||||||
|
|
||||||
// Run "dotnet new web", get TargetFramework property, and make sure it's covered in SupportedAspNetCoreAppVersions
|
// Run "dotnet new web", get TargetFramework property, and make sure it's covered in SupportedAspNetCoreAppVersions
|
||||||
using (DisposableDirectory directory = Temp.CreateDirectory())
|
|
||||||
{
|
|
||||||
string projectDirectory = directory.Path;
|
|
||||||
|
|
||||||
new NewCommandShim()
|
new NewCommandShim()
|
||||||
.WithWorkingDirectory(projectDirectory)
|
.WithWorkingDirectory(projectDirectory)
|
||||||
.Execute("web --no-restore")
|
.Execute("web --no-restore")
|
||||||
.Should().Pass();
|
.Should().Pass();
|
||||||
|
|
||||||
string projectPath = Path.Combine(projectDirectory, Path.GetFileName(projectDirectory) + ".csproj");
|
string projectPath = Path.Combine(projectDirectory, Path.GetFileName(projectDirectory) + ".csproj");
|
||||||
|
|
||||||
var project = XDocument.Load(projectPath);
|
var project = XDocument.Load(projectPath);
|
||||||
var ns = project.Root.Name.Namespace;
|
var ns = project.Root.Name.Namespace;
|
||||||
|
|
||||||
string targetFramework = project.Root.Element(ns + "PropertyGroup")
|
string targetFramework = project.Root.Element(ns + "PropertyGroup")
|
||||||
.Element(ns + "TargetFramework")
|
.Element(ns + "TargetFramework")
|
||||||
.Value;
|
.Value;
|
||||||
|
|
||||||
SupportedAspNetCoreVersions.Versions.Select(v => $"netcoreapp{v}")
|
SupportedAspNetCoreVersions.Versions.Select(v => $"netcoreapp{v}")
|
||||||
.Should().Contain(targetFramework, $"the {nameof(SupportedAspNetCoreVersions)} should include the default version " +
|
.Should().Contain(targetFramework, $"the {nameof(SupportedAspNetCoreVersions)} should include the default version " +
|
||||||
"of Microsoft.AspNetCore.App used by the templates created by \"dotnet new web\"");
|
"of Microsoft.AspNetCore.App used by the templates created by \"dotnet new web\"");
|
||||||
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,19 +0,0 @@
|
||||||
<Project Sdk="Microsoft.NET.Sdk" ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
|
||||||
|
|
||||||
<PropertyGroup>
|
|
||||||
<TargetFramework>netstandard2.0</TargetFramework>
|
|
||||||
|
|
||||||
<!-- Use this key because that's what Microsoft.DotNet.Cli.Utils is using for InternalsVisibleTo-->
|
|
||||||
<AssemblyOriginatorKeyFile>$(RepoRoot)eng\Key.snk</AssemblyOriginatorKeyFile>
|
|
||||||
|
|
||||||
<!-- Stop the arcade SDK from overriding the key -->
|
|
||||||
<StrongNameKeyId>Custom</StrongNameKeyId>
|
|
||||||
<PublicKey>0024000004800000940000000602000000240000525341310004000001000100f33a29044fa9d740c9b3213a93e57c84b472c84e0b8a0e1ae48e67a9f8f6de9d5f7f3d52ac23e48ac51801f1dc950abe901da34d2a9e3baadb141a17c77ef3c565dd5ee5054b91cf63bb3c6ab83f72ab3aafe93d0fc3c2348b764fafb0b1c0733de51459aeab46580384bf9d74c4e28164b7cde247f891ba07891c9d872ad2bb</PublicKey>
|
|
||||||
<PublicKeyToken>adb9793829ddae60</PublicKeyToken>
|
|
||||||
</PropertyGroup>
|
|
||||||
|
|
||||||
<ItemGroup>
|
|
||||||
<PackageReference Include="Microsoft.DotNet.Cli.Utils" Version="$(MicrosoftDotNetCliUtilsPackageVersion)" />
|
|
||||||
</ItemGroup>
|
|
||||||
|
|
||||||
</Project>
|
|
|
@ -1,6 +0,0 @@
|
||||||
// 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.Reflection;
|
|
||||||
|
|
||||||
[assembly: AssemblyMetadataAttribute("Serviceable", "True")]
|
|
|
@ -238,9 +238,6 @@ namespace Microsoft.DotNet.Tools.Test.Utilities
|
||||||
psi.Environment[item.Key] = item.Value;
|
psi.Environment[item.Key] = item.Value;
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
// Flow the TEST_PACKAGES environment variable to the child process
|
|
||||||
psi.Environment["TEST_PACKAGES"] = System.Environment.GetEnvironmentVariable("TEST_PACKAGES");
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private void AddWorkingDirectoryTo(ProcessStartInfo psi)
|
private void AddWorkingDirectoryTo(ProcessStartInfo psi)
|
||||||
|
|
|
@ -25,16 +25,6 @@ namespace Microsoft.DotNet.Tools.Test.Utilities
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public static string WithBackwardsCompatibleRuntimes
|
|
||||||
{
|
|
||||||
get
|
|
||||||
{
|
|
||||||
return Path.Combine(
|
|
||||||
new RepoDirectoriesProvider().Stage2WithBackwardsCompatibleRuntimesDirectory,
|
|
||||||
"dotnet");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public static bool IsLocalized()
|
public static bool IsLocalized()
|
||||||
{
|
{
|
||||||
for (var culture = CultureInfo.CurrentUICulture; !culture.Equals(CultureInfo.InvariantCulture); culture = culture.Parent)
|
for (var culture = CultureInfo.CurrentUICulture; !culture.Equals(CultureInfo.InvariantCulture); culture = culture.Parent)
|
||||||
|
|
|
@ -3,10 +3,6 @@
|
||||||
<TargetFramework>netstandard2.0</TargetFramework>
|
<TargetFramework>netstandard2.0</TargetFramework>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
|
||||||
<ProjectReference Include="..\Microsoft.DotNet.TestFramework\Microsoft.DotNet.TestFramework.csproj" />
|
|
||||||
</ItemGroup>
|
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<PackageReference Include="FluentAssertions" Version="4.18.0" />
|
<PackageReference Include="FluentAssertions" Version="4.18.0" />
|
||||||
<PackageReference Include="xunit" Version="2.2.0" />
|
<PackageReference Include="xunit" Version="2.2.0" />
|
||||||
|
|
|
@ -4,6 +4,7 @@
|
||||||
using System;
|
using System;
|
||||||
using System.IO;
|
using System.IO;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
|
using System.Runtime.InteropServices;
|
||||||
using System.Xml.Linq;
|
using System.Xml.Linq;
|
||||||
using Microsoft.DotNet.PlatformAbstractions;
|
using Microsoft.DotNet.PlatformAbstractions;
|
||||||
|
|
||||||
|
@ -11,128 +12,54 @@ namespace Microsoft.DotNet.Tools.Test.Utilities
|
||||||
{
|
{
|
||||||
public class RepoDirectoriesProvider
|
public class RepoDirectoriesProvider
|
||||||
{
|
{
|
||||||
private static string s_repoRoot;
|
public readonly static string RepoRoot;
|
||||||
private static string s_buildRid;
|
|
||||||
|
public readonly static string TestWorkingFolder;
|
||||||
|
public readonly static string DotnetUnderTest;
|
||||||
|
|
||||||
private string _artifacts;
|
static RepoDirectoriesProvider()
|
||||||
private string _dotnetRoot;
|
|
||||||
private string _builtDotnet;
|
|
||||||
private string _nugetPackages;
|
|
||||||
private string _stage2Sdk;
|
|
||||||
private string _stage2WithBackwardsCompatibleRuntimesDirectory;
|
|
||||||
private string _testPackages;
|
|
||||||
private string _testWorkingFolder;
|
|
||||||
private string _testArtifactsFolder;
|
|
||||||
|
|
||||||
public static string RepoRoot
|
|
||||||
{
|
{
|
||||||
get
|
|
||||||
{
|
|
||||||
if (!string.IsNullOrEmpty(s_repoRoot))
|
|
||||||
{
|
|
||||||
return s_repoRoot;
|
|
||||||
}
|
|
||||||
|
|
||||||
#if NET451
|
#if NET451
|
||||||
string directory = AppDomain.CurrentDomain.BaseDirectory;
|
string directory = AppDomain.CurrentDomain.BaseDirectory;
|
||||||
#else
|
#else
|
||||||
string directory = AppContext.BaseDirectory;
|
string directory = AppContext.BaseDirectory;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
while (directory != null)
|
while (directory != null)
|
||||||
{
|
|
||||||
var gitDirOrFile = Path.Combine(directory, ".git");
|
|
||||||
if (Directory.Exists(gitDirOrFile) || File.Exists(gitDirOrFile))
|
|
||||||
{
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
directory = Directory.GetParent(directory)?.FullName;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (directory == null)
|
|
||||||
{
|
|
||||||
throw new Exception("Cannot find the git repository root");
|
|
||||||
}
|
|
||||||
|
|
||||||
s_repoRoot = directory;
|
|
||||||
return s_repoRoot;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public static string BuildRid
|
|
||||||
{
|
|
||||||
get
|
|
||||||
{
|
{
|
||||||
if (string.IsNullOrEmpty(s_buildRid))
|
var gitDirOrFile = Path.Combine(directory, ".git");
|
||||||
|
if (Directory.Exists(gitDirOrFile) || File.Exists(gitDirOrFile))
|
||||||
{
|
{
|
||||||
var buildInfoPath = Path.Combine(RepoRoot, "bin", "obj", "BuildInfo.props");
|
break;
|
||||||
var root = XDocument.Load(buildInfoPath).Root;
|
|
||||||
var ns = root.Name.Namespace;
|
|
||||||
|
|
||||||
s_buildRid = root
|
|
||||||
.Elements(ns + "PropertyGroup")
|
|
||||||
.Elements(ns + "Rid")
|
|
||||||
.FirstOrDefault()
|
|
||||||
?.Value;
|
|
||||||
|
|
||||||
if (string.IsNullOrEmpty(s_buildRid))
|
|
||||||
{
|
|
||||||
throw new InvalidOperationException($"Could not find a property named 'Rid' in {buildInfoPath}");
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
directory = Directory.GetParent(directory)?.FullName;
|
||||||
return s_buildRid;
|
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
public string Artifacts => _artifacts;
|
RepoRoot = directory;
|
||||||
public string BuiltDotnet => _builtDotnet;
|
|
||||||
public string DotnetRoot => _dotnetRoot;
|
|
||||||
public string NugetPackages => _nugetPackages;
|
|
||||||
public string Stage2Sdk => _stage2Sdk;
|
|
||||||
public string Stage2WithBackwardsCompatibleRuntimesDirectory => _stage2WithBackwardsCompatibleRuntimesDirectory;
|
|
||||||
public string TestPackages => _testPackages;
|
|
||||||
public string TestWorkingFolder => _testWorkingFolder;
|
|
||||||
public string TestArtifactsFolder => _testArtifactsFolder;
|
|
||||||
|
|
||||||
public RepoDirectoriesProvider(
|
TestWorkingFolder = Environment.GetEnvironmentVariable("CORESDK_TEST_FOLDER");
|
||||||
string artifacts = null,
|
if (string.IsNullOrEmpty(TestWorkingFolder))
|
||||||
string builtDotnet = null,
|
|
||||||
string nugetPackages = null,
|
|
||||||
string corehostPackages = null,
|
|
||||||
string corehostDummyPackages = null)
|
|
||||||
{
|
|
||||||
// Ideally this wouldn't be hardcoded, so that you could use stage n to build stage n + 1, and then use stage n + 1 to run tests
|
|
||||||
int previousStage = 2;
|
|
||||||
|
|
||||||
_artifacts = artifacts ?? Path.Combine(RepoRoot,
|
|
||||||
"bin",
|
|
||||||
previousStage.ToString(),
|
|
||||||
BuildRid);
|
|
||||||
_builtDotnet = builtDotnet ?? Path.Combine(_artifacts, "intermediate", "sharedFrameworkPublish");
|
|
||||||
_dotnetRoot = Path.Combine(_artifacts, "dotnet");
|
|
||||||
_nugetPackages = nugetPackages ?? Path.Combine(RepoRoot, ".nuget", "packages");
|
|
||||||
_stage2Sdk = Directory
|
|
||||||
.EnumerateDirectories(Path.Combine(_artifacts, "dotnet", "sdk"))
|
|
||||||
.First(d => !d.Contains("NuGetFallbackFolder"));
|
|
||||||
|
|
||||||
_stage2WithBackwardsCompatibleRuntimesDirectory =
|
|
||||||
Path.Combine(_artifacts, "dotnetWithBackwardsCompatibleRuntimes");
|
|
||||||
|
|
||||||
_testPackages = Environment.GetEnvironmentVariable("TEST_PACKAGES");
|
|
||||||
if (string.IsNullOrEmpty(_testPackages))
|
|
||||||
{
|
{
|
||||||
_testPackages = Path.Combine(_artifacts, "test", "packages");
|
TestWorkingFolder = Path.Combine(AppContext.BaseDirectory, "Tests");
|
||||||
}
|
}
|
||||||
|
|
||||||
_testArtifactsFolder = Path.Combine(_artifacts, "test", "artifacts");
|
DotnetUnderTest = Environment.GetEnvironmentVariable("DOTNET_UNDER_TEST");
|
||||||
|
string dotnetExtension = RuntimeInformation.IsOSPlatform(OSPlatform.Windows) ? ".exe" : "";
|
||||||
_testWorkingFolder = Path.Combine(RepoRoot,
|
if (string.IsNullOrEmpty(DotnetUnderTest))
|
||||||
"bin",
|
{
|
||||||
(previousStage + 1).ToString(),
|
if (RepoRoot == null)
|
||||||
BuildRid,
|
{
|
||||||
"test");
|
DotnetUnderTest = "dotnet" + dotnetExtension;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
string configuration = new DirectoryInfo(AppContext.BaseDirectory).Parent.Name;
|
||||||
|
// TODO: Don't put in framework-specific folder (so we don't need to sync TFM here)
|
||||||
|
DotnetUnderTest = Path.Combine(RepoRoot, "artifacts", "bin", "redist", configuration, "netcoreapp3.0", "publish", "dotnet" + dotnetExtension);
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -12,6 +12,7 @@ using System.Threading.Tasks;
|
||||||
using System.Xml.Linq;
|
using System.Xml.Linq;
|
||||||
using Microsoft.DotNet.Cli.Utils;
|
using Microsoft.DotNet.Cli.Utils;
|
||||||
using Microsoft.DotNet.Tools.Common;
|
using Microsoft.DotNet.Tools.Common;
|
||||||
|
using Microsoft.DotNet.Tools.Test.Utilities;
|
||||||
|
|
||||||
namespace Microsoft.DotNet.TestFramework
|
namespace Microsoft.DotNet.TestFramework
|
||||||
{
|
{
|
||||||
|
@ -29,8 +30,6 @@ namespace Microsoft.DotNet.TestFramework
|
||||||
|
|
||||||
private bool _built = false;
|
private bool _built = false;
|
||||||
|
|
||||||
public static string CurrentRuntimeFrameworkVersion = new Muxer().SharedFxVersion;
|
|
||||||
|
|
||||||
public TestAssetInstance(TestAssetInfo testAssetInfo, DirectoryInfo root)
|
public TestAssetInstance(TestAssetInfo testAssetInfo, DirectoryInfo root)
|
||||||
{
|
{
|
||||||
if (testAssetInfo == null)
|
if (testAssetInfo == null)
|
||||||
|
@ -171,23 +170,6 @@ namespace Microsoft.DotNet.TestFramework
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
public TestAssetInstance UseCurrentRuntimeFrameworkVersion()
|
|
||||||
{
|
|
||||||
return WithProjectChanges(project =>
|
|
||||||
{
|
|
||||||
var ns = project.Root.Name.Namespace;
|
|
||||||
|
|
||||||
var propertyGroup = project.Root.Elements(ns + "PropertyGroup").LastOrDefault();
|
|
||||||
if (propertyGroup == null)
|
|
||||||
{
|
|
||||||
propertyGroup = new XElement(ns + "PropertyGroup");
|
|
||||||
project.Root.Add(propertyGroup);
|
|
||||||
}
|
|
||||||
|
|
||||||
propertyGroup.Add(new XElement(ns + "RuntimeFrameworkVersion", CurrentRuntimeFrameworkVersion));
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
private static string RebasePath(string path, string oldBaseDirectory, string newBaseDirectory)
|
private static string RebasePath(string path, string oldBaseDirectory, string newBaseDirectory)
|
||||||
{
|
{
|
||||||
path = Path.IsPathRooted(path) ? PathUtility.GetRelativePath(PathUtility.EnsureTrailingSlash(oldBaseDirectory), path) : path;
|
path = Path.IsPathRooted(path) ? PathUtility.GetRelativePath(PathUtility.EnsureTrailingSlash(oldBaseDirectory), path) : path;
|
||||||
|
@ -285,18 +267,7 @@ namespace Microsoft.DotNet.TestFramework
|
||||||
.CaptureStdErr()
|
.CaptureStdErr()
|
||||||
.Execute();
|
.Execute();
|
||||||
|
|
||||||
int exitCode = commandResult.ExitCode;
|
commandResult.Should().Pass();
|
||||||
|
|
||||||
if (exitCode != 0)
|
|
||||||
{
|
|
||||||
Console.WriteLine(commandResult.StdOut);
|
|
||||||
|
|
||||||
Console.WriteLine(commandResult.StdErr);
|
|
||||||
|
|
||||||
string message = string.Format($"TestAsset Restore '{TestAssetInfo.AssetName}'@'{projectFile.FullName}' Failed with {exitCode}");
|
|
||||||
|
|
||||||
throw new Exception(message);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private void RestoreAllProjects()
|
private void RestoreAllProjects()
|
|
@ -1,33 +0,0 @@
|
||||||
// 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;
|
|
||||||
using System.IO;
|
|
||||||
using System.Linq;
|
|
||||||
using System.Reflection;
|
|
||||||
using System.Runtime.CompilerServices;
|
|
||||||
using System.Text;
|
|
||||||
using System.Threading.Tasks;
|
|
||||||
using System.Xml.Linq;
|
|
||||||
using Microsoft.DotNet.Cli.Utils;
|
|
||||||
using Microsoft.DotNet.TestFramework;
|
|
||||||
using Microsoft.DotNet.Tools.Common;
|
|
||||||
|
|
||||||
namespace Microsoft.DotNet.Tools.Test.Utilities
|
|
||||||
{
|
|
||||||
public static class TestAssetInstanceExtensions
|
|
||||||
{
|
|
||||||
public static TestAssetInstance WithNuGetConfigAndExternalRestoreSources(
|
|
||||||
this TestAssetInstance testAssetInstance, string nugetCache)
|
|
||||||
{
|
|
||||||
var externalRestoreSourcesForTests = Path.Combine(
|
|
||||||
new RepoDirectoriesProvider().TestArtifactsFolder, "ExternalRestoreSourcesForTestsContainer.txt");
|
|
||||||
var externalRestoreSources = File.Exists(externalRestoreSourcesForTests) ?
|
|
||||||
File.ReadAllText(externalRestoreSourcesForTests) :
|
|
||||||
string.Empty;
|
|
||||||
|
|
||||||
return testAssetInstance.WithNuGetConfig(nugetCache, externalRestoreSources);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -18,5 +18,7 @@ namespace Microsoft.DotNet.TestFramework
|
||||||
public static string TestProjects = "TestProjects";
|
public static string TestProjects = "TestProjects";
|
||||||
|
|
||||||
public static string NonRestoredTestProjects = "NonRestoredTestProjects";
|
public static string NonRestoredTestProjects = "NonRestoredTestProjects";
|
||||||
|
|
||||||
|
public static string TestPackages = "TestPackages";
|
||||||
}
|
}
|
||||||
}
|
}
|
|
@ -64,7 +64,7 @@ namespace Microsoft.DotNet.TestFramework
|
||||||
this);
|
this);
|
||||||
}
|
}
|
||||||
|
|
||||||
public DirectoryInfo CreateTestDirectory(string testProjectName = "temp", [CallerMemberName] string callingMethod = "", string identifier = "")
|
public DirectoryInfo CreateTestDirectory(string testProjectName = "", [CallerMemberName] string callingMethod = "", string identifier = "")
|
||||||
{
|
{
|
||||||
var testDestination = GetTestDestinationDirectoryPath(testProjectName, callingMethod, identifier);
|
var testDestination = GetTestDestinationDirectoryPath(testProjectName, callingMethod, identifier);
|
||||||
|
|
||||||
|
@ -85,7 +85,12 @@ namespace Microsoft.DotNet.TestFramework
|
||||||
// Find the name of the assembly the test comes from based on the the base directory and how the output path has been constructed
|
// Find the name of the assembly the test comes from based on the the base directory and how the output path has been constructed
|
||||||
string testAssemblyName = new DirectoryInfo(baseDirectory).Parent.Parent.Name;
|
string testAssemblyName = new DirectoryInfo(baseDirectory).Parent.Parent.Name;
|
||||||
|
|
||||||
return Path.Combine(_testWorkingFolder, testAssemblyName, callingMethod + identifier, testProjectName);
|
string directory = Path.Combine(_testWorkingFolder, testAssemblyName, callingMethod + identifier);
|
||||||
|
if (!string.IsNullOrEmpty(testProjectName))
|
||||||
|
{
|
||||||
|
directory = Path.Combine(directory, testProjectName);
|
||||||
|
}
|
||||||
|
return directory;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
|
@ -53,7 +53,7 @@ namespace Microsoft.DotNet.Tools.Test.Utilities
|
||||||
s_testAssets = new TestAssets(
|
s_testAssets = new TestAssets(
|
||||||
new DirectoryInfo(assetsRoot),
|
new DirectoryInfo(assetsRoot),
|
||||||
new FileInfo(new Muxer().MuxerPath),
|
new FileInfo(new Muxer().MuxerPath),
|
||||||
new RepoDirectoriesProvider().TestWorkingFolder);
|
RepoDirectoriesProvider.TestWorkingFolder);
|
||||||
}
|
}
|
||||||
|
|
||||||
return s_testAssets;
|
return s_testAssets;
|
||||||
|
|
Loading…
Add table
Reference in a new issue