Skip to content

Commit

Permalink
Introducing a new library to hold file system related abstractions. M…
Browse files Browse the repository at this point in the history
…aking the E2E tests work with dotnet test
  • Loading branch information
livarcocc committed Feb 4, 2016
1 parent 3048eb4 commit fd60435
Show file tree
Hide file tree
Showing 10 changed files with 102 additions and 25 deletions.
19 changes: 19 additions & 0 deletions Microsoft.DotNet.Cli.sln
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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 changes: 6 additions & 1 deletion src/Microsoft.DotNet.Cli.Utils/project.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,14 +9,19 @@
"NETStandard.Library": "1.0.0-rc2-23728",
"Microsoft.DotNet.ProjectModel": "1.0.0-*",
"System.Reflection.Metadata": "1.2.0-rc2-23728",
"Microsoft.Extensions.PlatformAbstractions": "1.0.0-rc2-16537"
"Microsoft.Extensions.PlatformAbstractions": "1.0.0-rc2-16537",
"Microsoft.DotNet.Files": {
"type": "build",
"version": "1.0.0-*"
}
},

"frameworks": {
"dnxcore50": {
"imports": "portable-net45+win8"
}
},

"scripts": {
}
}
1 change: 1 addition & 0 deletions src/Microsoft.DotNet.Compiler.Common/Executable.cs
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
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;
Expand Down
3 changes: 2 additions & 1 deletion src/Microsoft.DotNet.Compiler.Common/project.json
Original file line number Diff line number Diff line change
Expand Up @@ -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-*", "type": "build"}
},
"frameworks": {
"dnxcore50": {
Expand Down
Original file line number Diff line number Diff line change
@@ -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;
Expand All @@ -8,7 +8,7 @@
using Microsoft.DotNet.ProjectModel;
using Microsoft.DotNet.Tools.Common;

namespace Microsoft.Dotnet.Cli.Compiler.Common
namespace Microsoft.DotNet.Files
{
public class ContentFiles
{
Expand Down
18 changes: 18 additions & 0 deletions src/Microsoft.DotNet.Files/Microsoft.DotNet.Files.xproj
Original file line number Diff line number Diff line change
@@ -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 changes: 31 additions & 0 deletions src/Microsoft.DotNet.Files/project.json
Original file line number Diff line number Diff line change
@@ -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-23727",
"System.Linq.Expressions": "4.0.11-rc2-23727",

"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": {
}
}
4 changes: 3 additions & 1 deletion src/dotnet/commands/dotnet-publish/PublishCommand.cs
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
using System.IO;
using System.Linq;
using Microsoft.Extensions.PlatformAbstractions;
using Microsoft.DotNet.Files;
using Microsoft.DotNet.Tools.Common;
using Microsoft.DotNet.ProjectModel.Utilities;

Expand Down Expand Up @@ -141,7 +142,8 @@ private static bool PublishProjectContext(ProjectContext context, string outputP
}
}

CopyContents(context, outputPath);
var contentFiles = new ContentFiles(context);
contentFiles.StructuredCopyTo(outputPath);

// Publish a host if this is an application
if (options.EmitEntryPoint.GetValueOrDefault())
Expand Down
37 changes: 19 additions & 18 deletions test/E2E/project.json
Original file line number Diff line number Diff line change
@@ -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-45337-57"
},

"frameworks": {
"dnxcore50": {
"imports": "portable-net45+win8"
}
"frameworks": {
"dnxcore50": {
"imports": "portable-net45+win8"
}
},

"testRunner": "xunit"
}
3 changes: 1 addition & 2 deletions test/dotnet-publish.Tests/project.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,7 @@
"../TestProjects/CompileFail/**/*",
"../TestProjects/TestBindingRedirectGeneration/**/*",
"../TestProjects/TestAppCompilationContext/**/*",
"../TestProjects/TestAppWithContents/**/*",
"../TestProjects/global.json"
"../TestProjects/TestAppWithContents/**/*"
],

"testRunner": "xunit"
Expand Down

0 comments on commit fd60435

Please sign in to comment.