Merge pull request #1194 from livarcocc/dn_test
Changing some of our tests to use dotnet test
This commit is contained in:
commit
947807d457
26 changed files with 242 additions and 120 deletions
|
@ -63,6 +63,8 @@ Project("{8BB2217D-0F2D-49D1-97BC-3654ED321F3B}") = "dotnet-projectmodel-server.
|
|||
EndProject
|
||||
Project("{8BB2217D-0F2D-49D1-97BC-3654ED321F3B}") = "TestLibraryWithRunner", "test\TestProjects\TestLibraryWithRunner\TestLibraryWithRunner.xproj", "{B76591D6-D105-441D-AB40-AC7E78EAF84D}"
|
||||
EndProject
|
||||
Project("{8BB2217D-0F2D-49D1-97BC-3654ED321F3B}") = "Microsoft.DotNet.Files", "src\Microsoft.DotNet.Files\Microsoft.DotNet.Files.xproj", "{D521DD9F-0614-4929-93B4-D8FA5682C174}"
|
||||
EndProject
|
||||
Global
|
||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||
Debug|Any CPU = Debug|Any CPU
|
||||
|
@ -443,6 +445,22 @@ Global
|
|||
{B76591D6-D105-441D-AB40-AC7E78EAF84D}.RelWithDebInfo|Any CPU.Build.0 = Release|Any CPU
|
||||
{B76591D6-D105-441D-AB40-AC7E78EAF84D}.RelWithDebInfo|x64.ActiveCfg = Release|Any CPU
|
||||
{B76591D6-D105-441D-AB40-AC7E78EAF84D}.RelWithDebInfo|x64.Build.0 = Release|Any CPU
|
||||
{D521DD9F-0614-4929-93B4-D8FA5682C174}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{D521DD9F-0614-4929-93B4-D8FA5682C174}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{D521DD9F-0614-4929-93B4-D8FA5682C174}.Debug|x64.ActiveCfg = Debug|Any CPU
|
||||
{D521DD9F-0614-4929-93B4-D8FA5682C174}.Debug|x64.Build.0 = Debug|Any CPU
|
||||
{D521DD9F-0614-4929-93B4-D8FA5682C174}.MinSizeRel|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{D521DD9F-0614-4929-93B4-D8FA5682C174}.MinSizeRel|Any CPU.Build.0 = Debug|Any CPU
|
||||
{D521DD9F-0614-4929-93B4-D8FA5682C174}.MinSizeRel|x64.ActiveCfg = Debug|Any CPU
|
||||
{D521DD9F-0614-4929-93B4-D8FA5682C174}.MinSizeRel|x64.Build.0 = Debug|Any CPU
|
||||
{D521DD9F-0614-4929-93B4-D8FA5682C174}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{D521DD9F-0614-4929-93B4-D8FA5682C174}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{D521DD9F-0614-4929-93B4-D8FA5682C174}.Release|x64.ActiveCfg = Release|Any CPU
|
||||
{D521DD9F-0614-4929-93B4-D8FA5682C174}.Release|x64.Build.0 = Release|Any CPU
|
||||
{D521DD9F-0614-4929-93B4-D8FA5682C174}.RelWithDebInfo|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{D521DD9F-0614-4929-93B4-D8FA5682C174}.RelWithDebInfo|Any CPU.Build.0 = Release|Any CPU
|
||||
{D521DD9F-0614-4929-93B4-D8FA5682C174}.RelWithDebInfo|x64.ActiveCfg = Release|Any CPU
|
||||
{D521DD9F-0614-4929-93B4-D8FA5682C174}.RelWithDebInfo|x64.Build.0 = Release|Any CPU
|
||||
EndGlobalSection
|
||||
GlobalSection(SolutionProperties) = preSolution
|
||||
HideSolutionNode = FALSE
|
||||
|
@ -472,5 +490,6 @@ Global
|
|||
{386D412C-003C-47B1-8258-0E35865CB7C4} = {17735A9D-BFD9-4585-A7CB-3208CA6EA8A7}
|
||||
{11C77123-E4DA-499F-8900-80C88C2C69F2} = {17735A9D-BFD9-4585-A7CB-3208CA6EA8A7}
|
||||
{B76591D6-D105-441D-AB40-AC7E78EAF84D} = {713CBFBB-5392-438D-B766-A9A585EF1BB8}
|
||||
{D521DD9F-0614-4929-93B4-D8FA5682C174} = {ED2FE3E2-F7E7-4389-8231-B65123F2076F}
|
||||
EndGlobalSection
|
||||
EndGlobal
|
||||
|
|
|
@ -7,9 +7,10 @@
|
|||
|
||||
# Publish each test project
|
||||
loadTestProjectList | foreach {
|
||||
dotnet publish --framework "dnxcore50" --runtime "$Rid" --output "$TestBinRoot" --configuration "$Configuration" "$RepoRoot\test\$($_.ProjectName)"
|
||||
#we should use publish to an output path, we will once issue #1183 has been fixed and we can point dotnet test do a dll.
|
||||
dotnet build --framework "dnxcore50" --runtime "$Rid" --configuration "$Configuration" "$RepoRoot\test\$($_.ProjectName)"
|
||||
if (!$?) {
|
||||
Write-Host Command failed: dotnet publish --framework "dnxcore50" --runtime "$Rid" --output "$TestBinRoot" --configuration "$Configuration" "$RepoRoot\test\$($_.ProjectName)"
|
||||
Write-Host Command failed: dotnet publish --framework "dnxcore50" --runtime "$Rid" --configuration "$Configuration" "$RepoRoot\test\$($_.ProjectName)"
|
||||
exit 1
|
||||
}
|
||||
}
|
||||
|
|
|
@ -21,6 +21,7 @@ PROJECTS=$(loadTestProjectList)
|
|||
|
||||
for project in $PROJECTS
|
||||
do
|
||||
dotnet publish --framework "dnxcore50" --runtime "$RID" --output "$TEST_BIN_ROOT" --configuration "$CONFIGURATION" "$REPOROOT/test/$project"
|
||||
#we should use publish to an output path, we will once issue #1183 has been fixed and we can point dotnet test do a dll.
|
||||
dotnet build --framework "dnxcore50" --runtime "$RID" --configuration "$CONFIGURATION" "$REPOROOT/test/$project"
|
||||
done
|
||||
|
||||
|
|
|
@ -29,10 +29,13 @@ popd
|
|||
mkdir -Force "$TestBinRoot\TestProjects"
|
||||
cp -rec -Force "$RepoRoot\test\TestProjects\*" "$TestBinRoot\TestProjects"
|
||||
|
||||
pushd "$TestBinRoot"
|
||||
# Run each test project
|
||||
$TestProjects | foreach {
|
||||
& ".\corerun" "xunit.console.netcore.exe" "$($_.ProjectName).dll" -xml "$($_.ProjectName)-testResults.xml" -notrait category=failing
|
||||
# This is a workaroudn for issue #1184, where dotnet test needs to be executed from the folder containing the project.json.
|
||||
pushd "$RepoRoot\test\$($_.ProjectName)"
|
||||
dotnet test -xml "$TestBinRoot\$($_.ProjectName)-testResults.xml" -notrait category=failing
|
||||
popd
|
||||
|
||||
$exitCode = $LastExitCode
|
||||
if ($exitCode -ne 0) {
|
||||
$failingTests += "$($_.ProjectName)"
|
||||
|
@ -41,8 +44,6 @@ $TestProjects | foreach {
|
|||
$failCount += $exitCode
|
||||
}
|
||||
|
||||
popd
|
||||
|
||||
$TestScripts | foreach {
|
||||
$scriptName = "$($_.ProjectName).ps1"
|
||||
|
||||
|
|
|
@ -31,7 +31,11 @@ set +e
|
|||
|
||||
for project in $TestProjects
|
||||
do
|
||||
./corerun "xunit.console.netcore.exe" "$project.dll" -xml "${project}-testResults.xml" -notrait category=failing
|
||||
# This is a workaroudn for issue #1184, where dotnet test needs to be executed from the folder containing the project.json.
|
||||
pushd "$REPOROOT/test/$project"
|
||||
dotnet test -xml "$TEST_BIN_ROOT\$project-testResults.xml" -notrait category=failing
|
||||
popd
|
||||
|
||||
exitCode=$?
|
||||
failCount+=$exitCode
|
||||
if [ $exitCode -ne 0 ]; then
|
||||
|
|
|
@ -70,13 +70,22 @@ namespace Microsoft.DotNet.Tools.Common
|
|||
/// </summary>
|
||||
public static string GetRelativePath(string path1, string path2)
|
||||
{
|
||||
return GetRelativePath(path1, path2, Path.DirectorySeparatorChar);
|
||||
return GetRelativePath(path1, path2, Path.DirectorySeparatorChar, true);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Returns path2 relative to path1, with Path.DirectorySeparatorChar as separator but ignoring directory
|
||||
/// traversals.
|
||||
/// </summary>
|
||||
public static string GetRelativePathIgnoringDirectoryTraversals(string path1, string path2)
|
||||
{
|
||||
return GetRelativePath(path1, path2, Path.DirectorySeparatorChar, false);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Returns path2 relative to path1, with given path separator
|
||||
/// </summary>
|
||||
public static string GetRelativePath(string path1, string path2, char separator)
|
||||
public static string GetRelativePath(string path1, string path2, char separator, bool includeDirectoryTraversals)
|
||||
{
|
||||
if (string.IsNullOrEmpty(path1))
|
||||
{
|
||||
|
@ -138,10 +147,14 @@ namespace Microsoft.DotNet.Tools.Common
|
|||
return path;
|
||||
}
|
||||
|
||||
for (var i = index; len1 > i; ++i)
|
||||
if (includeDirectoryTraversals)
|
||||
{
|
||||
path += ".." + separator;
|
||||
for (var i = index; len1 > i; ++i)
|
||||
{
|
||||
path += ".." + separator;
|
||||
}
|
||||
}
|
||||
|
||||
for (var i = index; len2 - 1 > i; ++i)
|
||||
{
|
||||
path += path2Segments[i] + separator;
|
||||
|
|
|
@ -17,6 +17,7 @@
|
|||
"imports": "portable-net45+win8"
|
||||
}
|
||||
},
|
||||
|
||||
"scripts": {
|
||||
}
|
||||
}
|
||||
|
|
|
@ -7,6 +7,7 @@ using System.Linq;
|
|||
using System.Xml.Linq;
|
||||
using Microsoft.DotNet.Cli.Compiler.Common;
|
||||
using Microsoft.DotNet.Cli.Utils;
|
||||
using Microsoft.DotNet.Files;
|
||||
using Microsoft.DotNet.ProjectModel;
|
||||
using Microsoft.DotNet.ProjectModel.Compilation;
|
||||
using Microsoft.DotNet.ProjectModel.Graph;
|
||||
|
|
|
@ -10,7 +10,8 @@
|
|||
"System.CommandLine": "0.1.0-e160119-1",
|
||||
"Microsoft.CodeAnalysis.CSharp": "1.2.0-beta1-20160108-01",
|
||||
"Microsoft.DotNet.ProjectModel": "1.0.0-*",
|
||||
"Microsoft.DotNet.Cli.Utils": "1.0.0-*"
|
||||
"Microsoft.DotNet.Cli.Utils": "1.0.0-*",
|
||||
"Microsoft.DotNet.Files": {"version": "1.0.0-*", "target": "project"}
|
||||
},
|
||||
"frameworks": {
|
||||
"dnxcore50": {
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
// Copyright (c) .NET Foundation and contributors. All rights reserved.
|
||||
// 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;
|
||||
|
@ -8,7 +8,7 @@ using System.Linq;
|
|||
using Microsoft.DotNet.ProjectModel;
|
||||
using Microsoft.DotNet.Tools.Common;
|
||||
|
||||
namespace Microsoft.Dotnet.Cli.Compiler.Common
|
||||
namespace Microsoft.DotNet.Files
|
||||
{
|
||||
public class ContentFiles
|
||||
{
|
||||
|
@ -39,7 +39,7 @@ namespace Microsoft.Dotnet.Cli.Compiler.Common
|
|||
var pathMap = sourceFiles
|
||||
.ToDictionary(s => s,
|
||||
s => Path.Combine(targetDirectory,
|
||||
PathUtility.GetRelativePath(sourceDirectory, s)));
|
||||
PathUtility.GetRelativePathIgnoringDirectoryTraversals(sourceDirectory, s)));
|
||||
|
||||
foreach (var targetDir in pathMap.Values
|
||||
.Select(Path.GetDirectoryName)
|
18
src/Microsoft.DotNet.Files/Microsoft.DotNet.Files.xproj
Normal file
18
src/Microsoft.DotNet.Files/Microsoft.DotNet.Files.xproj
Normal file
|
@ -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>d521dd9f-0614-4929-93b4-d8fa5682c174</ProjectGuid>
|
||||
<RootNamespace>Microsoft.DotNet.Files</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>
|
31
src/Microsoft.DotNet.Files/project.json
Normal file
31
src/Microsoft.DotNet.Files/project.json
Normal file
|
@ -0,0 +1,31 @@
|
|||
{
|
||||
"version": "1.0.0-*",
|
||||
"compilationOptions": {
|
||||
"keyFile": "../../tools/Key.snk"
|
||||
},
|
||||
"description": "Abstraction to interact with the file system and file paths.",
|
||||
"dependencies": {
|
||||
"NETStandard.Library": "1.0.0-rc2-23728",
|
||||
"System.Linq.Expressions": "4.0.11-rc2-23728",
|
||||
|
||||
"Microsoft.Extensions.FileSystemGlobbing": "1.0.0-rc2-15975",
|
||||
|
||||
"Microsoft.DotNet.Cli.Utils": {
|
||||
"type": "build",
|
||||
"version": "1.0.0-*"
|
||||
},
|
||||
|
||||
"Microsoft.DotNet.ProjectModel": {
|
||||
"type": "build",
|
||||
"version": "1.0.0-*"
|
||||
}
|
||||
},
|
||||
|
||||
"frameworks": {
|
||||
"dnxcore50": {
|
||||
"imports": "portable-net45+win8"
|
||||
}
|
||||
},
|
||||
"scripts": {
|
||||
}
|
||||
}
|
|
@ -12,7 +12,7 @@
|
|||
"System.Security.Cryptography.Algorithms": "4.0.0-rc2-23728",
|
||||
"Microsoft.CSharp": "4.0.1-rc2-23728",
|
||||
"System.Xml.XDocument": "4.0.11-rc2-23728",
|
||||
"NuGet.Packaging": "3.4.0-beta-569",
|
||||
"NuGet.Packaging": "3.4.0-beta-583",
|
||||
|
||||
"Microsoft.Extensions.FileSystemGlobbing": "1.0.0-rc2-15996",
|
||||
"Microsoft.Extensions.JsonParser.Sources": {
|
||||
|
|
|
@ -10,6 +10,7 @@ using System.Collections.Generic;
|
|||
using System.IO;
|
||||
using System.Linq;
|
||||
using Microsoft.Extensions.PlatformAbstractions;
|
||||
using Microsoft.DotNet.Files;
|
||||
using Microsoft.DotNet.Tools.Common;
|
||||
using Microsoft.DotNet.ProjectModel.Utilities;
|
||||
|
||||
|
@ -141,7 +142,8 @@ namespace Microsoft.DotNet.Tools.Publish
|
|||
}
|
||||
}
|
||||
|
||||
CopyContents(context, outputPath);
|
||||
var contentFiles = new ContentFiles(context);
|
||||
contentFiles.StructuredCopyTo(outputPath);
|
||||
|
||||
// Publish a host if this is an application
|
||||
if (options.EmitEntryPoint.GetValueOrDefault())
|
||||
|
|
|
@ -22,7 +22,7 @@
|
|||
"Microsoft.FSharp.Compiler.netcore": "1.0.0-alpha-151218",
|
||||
"Microsoft.Net.CSharp.Interactive.netcore": "1.2.0-beta1-20160108-01",
|
||||
"Microsoft.CodeAnalysis.CSharp": "1.2.0-beta1-20160108-01",
|
||||
"NuGet.CommandLine.XPlat": "3.4.0-beta-569",
|
||||
"NuGet.CommandLine.XPlat": "3.4.0-beta-583",
|
||||
"System.CommandLine" : "0.1.0-e160119-1",
|
||||
|
||||
"Microsoft.DotNet.ProjectModel": "1.0.0-*",
|
||||
|
|
|
@ -3,21 +3,20 @@
|
|||
|
||||
"dependencies": {
|
||||
"NETStandard.Library": "1.0.0-rc2-23728",
|
||||
"Microsoft.NETCore.TestHost" : "1.0.0-rc2-23728",
|
||||
|
||||
"xunit": "2.1.0",
|
||||
"xunit.console.netcore": "1.0.2-prerelease-00101",
|
||||
"xunit.netcore.extensions": "1.0.0-prerelease-*",
|
||||
"xunit.runner.utility": "2.1.0",
|
||||
|
||||
"Microsoft.DotNet.Tools.Tests.Utilities": { "target": "project" },
|
||||
"Microsoft.DotNet.ProjectModel": { "target": "project" },
|
||||
"Microsoft.DotNet.Compiler.Common": { "target": "project" }
|
||||
"Microsoft.DotNet.Compiler.Common": { "target": "project" },
|
||||
|
||||
"xunit": "2.1.0",
|
||||
"dotnet-test-xunit": "1.0.0-dev-48273-16"
|
||||
},
|
||||
|
||||
"frameworks": {
|
||||
"dnxcore50": {
|
||||
"imports": "portable-net45+win8"
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
"testRunner": "xunit"
|
||||
}
|
||||
|
|
|
@ -1,25 +1,26 @@
|
|||
{
|
||||
"version": "1.0.0-*",
|
||||
"compilationOptions": {
|
||||
"emitEntryPoint": true
|
||||
},
|
||||
"version": "1.0.0-*",
|
||||
"compilationOptions": {
|
||||
"emitEntryPoint": true
|
||||
},
|
||||
|
||||
"dependencies": {
|
||||
"NETStandard.Library" : "1.0.0-rc2-23728",
|
||||
"dependencies": {
|
||||
"NETStandard.Library": "1.0.0-rc2-23728",
|
||||
|
||||
"xunit": "2.1.0",
|
||||
"xunit.console.netcore": "1.0.2-prerelease-00101",
|
||||
"xunit.netcore.extensions": "1.0.0-prerelease-00153",
|
||||
"xunit.runner.utility": "2.1.0",
|
||||
"Microsoft.DotNet.ProjectModel": { "target": "project" },
|
||||
"Microsoft.DotNet.Cli.Utils": { "target": "project" },
|
||||
"Microsoft.DotNet.Tools.Tests.Utilities": { "target": "project" },
|
||||
|
||||
"Microsoft.DotNet.ProjectModel": {"target":"project"},
|
||||
"Microsoft.DotNet.Cli.Utils": {"target":"project"},
|
||||
"Microsoft.DotNet.Tools.Tests.Utilities": {"target":"project"}
|
||||
},
|
||||
"xunit": "2.1.0",
|
||||
"xunit.netcore.extensions": "1.0.0-prerelease-*",
|
||||
"dotnet-test-xunit": "1.0.0-dev-48273-16"
|
||||
},
|
||||
|
||||
"frameworks": {
|
||||
"dnxcore50": {
|
||||
"imports": "portable-net45+win8"
|
||||
}
|
||||
"frameworks": {
|
||||
"dnxcore50": {
|
||||
"imports": "portable-net45+win8"
|
||||
}
|
||||
},
|
||||
|
||||
"testRunner": "xunit"
|
||||
}
|
||||
|
|
|
@ -7,20 +7,20 @@
|
|||
"dependencies": {
|
||||
"NETStandard.Library" : "1.0.0-rc2-23728",
|
||||
|
||||
"xunit": "2.1.0",
|
||||
"xunit.console.netcore": "1.0.2-prerelease-00101",
|
||||
"xunit.netcore.extensions": "1.0.0-prerelease-00153",
|
||||
"xunit.runner.utility": "2.1.0",
|
||||
|
||||
"Microsoft.DotNet.ProjectModel": { "target": "project" },
|
||||
"Microsoft.DotNet.Cli.Utils": { "target": "project" },
|
||||
|
||||
"Microsoft.DotNet.Tools.Tests.Utilities": { "target": "project" }
|
||||
"Microsoft.DotNet.Tools.Tests.Utilities": { "target": "project" },
|
||||
|
||||
"xunit": "2.1.0",
|
||||
"dotnet-test-xunit": "1.0.0-dev-48273-16"
|
||||
},
|
||||
|
||||
"frameworks": {
|
||||
"dnxcore50": {
|
||||
"imports": "portable-net45+win8"
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
"testRunner": "xunit"
|
||||
}
|
||||
|
|
|
@ -8,6 +8,7 @@
|
|||
"NETStandard.Library": "1.0.0-rc2-23728"
|
||||
},
|
||||
|
||||
"content": "testcontentfile.txt",
|
||||
|
||||
"frameworks": {
|
||||
"dnxcore50": { }
|
||||
|
|
|
@ -6,7 +6,6 @@ using System.Collections.Generic;
|
|||
using System.IO;
|
||||
using System.Linq;
|
||||
using Microsoft.DotNet.Cli.Utils;
|
||||
using Microsoft.DotNet.Tools.Test.Utilities;
|
||||
using Xunit;
|
||||
|
||||
namespace Microsoft.DotNet.Tools.Builder.Tests
|
||||
|
@ -16,7 +15,7 @@ namespace Microsoft.DotNet.Tools.Builder.Tests
|
|||
private string[] _projects = new[] { "L0", "L11", "L12", "L21", "L22" };
|
||||
|
||||
public ProjectToProjectDependenciesIncrementalTest() : base(
|
||||
Path.Combine("TestProjects", "TestProjectToProjectDependencies"),
|
||||
Path.Combine(AppContext.BaseDirectory, "TestProjects", "TestProjectToProjectDependencies"),
|
||||
"L0",
|
||||
"L0 L11 L12 L22 L21 L12 L22 " + Environment.NewLine)
|
||||
{
|
||||
|
|
|
@ -15,7 +15,7 @@ namespace Microsoft.DotNet.Tools.Builder.Tests
|
|||
{
|
||||
|
||||
public IncrementalTests() : base(
|
||||
Path.Combine("TestProjects", "TestSimpleIncrementalApp"),
|
||||
Path.Combine(AppContext.BaseDirectory, "TestProjects", "TestSimpleIncrementalApp"),
|
||||
"TestSimpleIncrementalApp",
|
||||
"Hello World!" + Environment.NewLine)
|
||||
{
|
||||
|
|
|
@ -1,25 +1,30 @@
|
|||
{
|
||||
"version": "1.0.0-*",
|
||||
"version": "1.0.0-*",
|
||||
|
||||
"dependencies": {
|
||||
"NETStandard.Library": "1.0.0-rc2-23728",
|
||||
|
||||
"dependencies": {
|
||||
"NETStandard.Library": "1.0.0-rc2-23728",
|
||||
"Microsoft.NETCore.TestHost" : "1.0.0-rc2-23728",
|
||||
|
||||
"xunit": "2.1.0",
|
||||
"xunit.console.netcore": "1.0.2-prerelease-00101",
|
||||
"xunit.netcore.extensions": "1.0.0-prerelease-*",
|
||||
"xunit.runner.utility": "2.1.0",
|
||||
|
||||
"Microsoft.DotNet.Tools.Tests.Utilities": { "target": "project" },
|
||||
"Microsoft.DotNet.Cli.Utils": {
|
||||
"target": "project",
|
||||
"type": "build"
|
||||
}
|
||||
"Microsoft.DotNet.Tools.Tests.Utilities": { "target": "project" },
|
||||
"Microsoft.DotNet.Cli.Utils": {
|
||||
"target": "project",
|
||||
"type": "build"
|
||||
},
|
||||
|
||||
"frameworks": {
|
||||
"dnxcore50": {
|
||||
"imports": "portable-net45+win8"
|
||||
}
|
||||
"xunit": "2.1.0",
|
||||
"dotnet-test-xunit": "1.0.0-dev-48273-16"
|
||||
},
|
||||
|
||||
"frameworks": {
|
||||
"dnxcore50": {
|
||||
"imports": "portable-net45+win8"
|
||||
}
|
||||
},
|
||||
|
||||
"content": [
|
||||
"../TestProjects/TestSimpleIncrementalApp/*",
|
||||
"../TestProjects/TestProjectToProjectDependencies/**/*",
|
||||
"../TestProjects/global.json"
|
||||
],
|
||||
|
||||
"testRunner": "xunit"
|
||||
}
|
||||
|
|
|
@ -6,11 +6,16 @@ using System.IO;
|
|||
using Microsoft.DotNet.Tools.Test.Utilities;
|
||||
using Xunit;
|
||||
|
||||
namespace Microsoft.DotNet.Tools.Publish.Tests
|
||||
namespace Microsoft.DotNet.Tools.Compiler.Tests
|
||||
{
|
||||
public class CompilerTests : TestBase
|
||||
{
|
||||
private string _testProjectsRoot = @"TestProjects";
|
||||
private readonly string _testProjectsRoot;
|
||||
|
||||
public CompilerTests()
|
||||
{
|
||||
_testProjectsRoot = Path.Combine(AppContext.BaseDirectory, @"TestProjects");
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public void XmlDocumentationFileIsGenerated()
|
||||
|
@ -20,8 +25,9 @@ namespace Microsoft.DotNet.Tools.Publish.Tests
|
|||
root.CopyFile(Path.Combine(_testProjectsRoot, "global.json"));
|
||||
|
||||
var testLibDir = root.CreateDirectory("TestLibrary");
|
||||
var sourceTestLibDir = Path.Combine(_testProjectsRoot, "TestLibrary");
|
||||
|
||||
CopyProjectToTempDir(Path.Combine(_testProjectsRoot, "TestLibrary"), testLibDir);
|
||||
CopyProjectToTempDir(sourceTestLibDir, testLibDir);
|
||||
|
||||
// run compile
|
||||
var outputDir = Path.Combine(testLibDir.Path, "bin");
|
||||
|
@ -39,11 +45,12 @@ namespace Microsoft.DotNet.Tools.Publish.Tests
|
|||
|
||||
[Fact]
|
||||
public void LibraryWithAnalyzer()
|
||||
{
|
||||
{
|
||||
var root = Temp.CreateDirectory();
|
||||
var testLibDir = root.CreateDirectory("TestLibraryWithAnalyzer");
|
||||
|
||||
CopyProjectToTempDir(Path.Combine(_testProjectsRoot, "TestLibraryWithAnalyzer"), testLibDir);
|
||||
var sourceTestLibDir = Path.Combine(_testProjectsRoot, "TestLibraryWithAnalyzer");
|
||||
|
||||
CopyProjectToTempDir(sourceTestLibDir, testLibDir);
|
||||
|
||||
// run compile
|
||||
var outputDir = Path.Combine(testLibDir.Path, "bin");
|
||||
|
|
|
@ -1,25 +1,30 @@
|
|||
{
|
||||
"version": "1.0.0-*",
|
||||
"version": "1.0.0-*",
|
||||
|
||||
"dependencies": {
|
||||
"NETStandard.Library": "1.0.0-rc2-23728",
|
||||
"Microsoft.NETCore.TestHost" : "1.0.0-rc2-23728",
|
||||
|
||||
"xunit": "2.1.0",
|
||||
"xunit.console.netcore": "1.0.2-prerelease-00101",
|
||||
"xunit.netcore.extensions": "1.0.0-prerelease-*",
|
||||
"xunit.runner.utility": "2.1.0",
|
||||
|
||||
"Microsoft.DotNet.Tools.Tests.Utilities": { "target": "project" },
|
||||
"Microsoft.DotNet.Cli.Utils": {
|
||||
"target": "project",
|
||||
"type": "build"
|
||||
}
|
||||
"dependencies": {
|
||||
"NETStandard.Library": "1.0.0-rc2-23728",
|
||||
|
||||
"Microsoft.DotNet.Tools.Tests.Utilities": { "target": "project" },
|
||||
"Microsoft.DotNet.Cli.Utils": {
|
||||
"target": "project",
|
||||
"type": "build"
|
||||
},
|
||||
|
||||
"frameworks": {
|
||||
"dnxcore50": {
|
||||
"imports": "portable-net45+win8"
|
||||
}
|
||||
"xunit": "2.1.0",
|
||||
"dotnet-test-xunit": "1.0.0-dev-48273-16"
|
||||
},
|
||||
|
||||
"frameworks": {
|
||||
"dnxcore50": {
|
||||
"imports": "portable-net451+win8"
|
||||
}
|
||||
},
|
||||
|
||||
"content": [
|
||||
"../TestProjects/TestLibraryWithAnalyzer/*",
|
||||
"../TestProjects/TestLibrary/*",
|
||||
"../TestProjects/global.json"
|
||||
],
|
||||
|
||||
"testRunner": "xunit"
|
||||
}
|
||||
|
|
|
@ -8,13 +8,17 @@ using Microsoft.DotNet.Tools.Test.Utilities;
|
|||
using Microsoft.Extensions.PlatformAbstractions;
|
||||
using Xunit;
|
||||
using System;
|
||||
using System.Text;
|
||||
|
||||
namespace Microsoft.DotNet.Tools.Publish.Tests
|
||||
{
|
||||
public class PublishTests : TestBase
|
||||
{
|
||||
private string _testProjectsRoot = @"TestProjects";
|
||||
private readonly string _testProjectsRoot;
|
||||
|
||||
public PublishTests()
|
||||
{
|
||||
_testProjectsRoot = Path.Combine(AppContext.BaseDirectory, @"TestProjects");
|
||||
}
|
||||
|
||||
public static IEnumerable<object[]> PublishOptions
|
||||
{
|
||||
|
@ -68,7 +72,6 @@ namespace Microsoft.DotNet.Tools.Publish.Tests
|
|||
}
|
||||
|
||||
[Fact]
|
||||
[ActiveIssue(491)]
|
||||
public void ProjectWithContentsTest()
|
||||
{
|
||||
// create unique directories in the 'temp' folder
|
||||
|
|
|
@ -1,25 +1,34 @@
|
|||
{
|
||||
"version": "1.0.0-*",
|
||||
"version": "1.0.0-*",
|
||||
|
||||
"dependencies": {
|
||||
"NETStandard.Library": "1.0.0-rc2-23728",
|
||||
"Microsoft.NETCore.TestHost": "1.0.0-rc2-*",
|
||||
"dependencies": {
|
||||
"NETStandard.Library": "1.0.0-rc2-23728",
|
||||
|
||||
"xunit": "2.1.0",
|
||||
"xunit.console.netcore": "1.0.2-prerelease-00101",
|
||||
"xunit.netcore.extensions": "1.0.0-prerelease-*",
|
||||
"xunit.runner.utility": "2.1.0",
|
||||
|
||||
"Microsoft.DotNet.Tools.Tests.Utilities": { "target": "project" },
|
||||
"Microsoft.DotNet.Cli.Utils": {
|
||||
"target": "project",
|
||||
"type": "build"
|
||||
}
|
||||
"Microsoft.DotNet.Tools.Tests.Utilities": { "target": "project" },
|
||||
"Microsoft.DotNet.Cli.Utils": {
|
||||
"target": "project",
|
||||
"type": "build"
|
||||
},
|
||||
|
||||
"frameworks": {
|
||||
"dnxcore50": {
|
||||
"imports": "portable-net45+win8"
|
||||
}
|
||||
"xunit": "2.1.0",
|
||||
"xunit.netcore.extensions": "1.0.0-prerelease-*",
|
||||
"dotnet-test-xunit": "1.0.0-dev-48273-16"
|
||||
},
|
||||
|
||||
"frameworks": {
|
||||
"dnxcore50": {
|
||||
"imports": "portable-net45+win8"
|
||||
}
|
||||
},
|
||||
|
||||
"content": [
|
||||
"../TestProjects/TestApp/**/*",
|
||||
"../TestProjects/TestLibrary/**/*",
|
||||
"../TestProjects/CompileFail/**/*",
|
||||
"../TestProjects/TestBindingRedirectGeneration/**/*",
|
||||
"../TestProjects/TestAppCompilationContext/**/*",
|
||||
"../TestProjects/TestAppWithContents/**/*"
|
||||
],
|
||||
|
||||
"testRunner": "xunit"
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue