This repository has been archived by the owner on Dec 18, 2017. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 228
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Ignore global.json files when emitting projects during publish to fix #…
- Loading branch information
Showing
9 changed files
with
104 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
{ | ||
"projects": [ | ||
"src" | ||
], | ||
"packages": "packages" | ||
} |
9 changes: 9 additions & 0 deletions
9
misc/GlobalJsonInProjectDir/Expected/approot/src/Project/project.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
{ | ||
"dependencies": { | ||
}, | ||
|
||
"frameworks" : { | ||
"dnx451": { }, | ||
"dnxcore50": { } | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
{ | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
{ | ||
"dependencies": { | ||
}, | ||
|
||
"frameworks" : { | ||
"dnx451": { }, | ||
"dnxcore50": { } | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
34 changes: 34 additions & 0 deletions
34
test/Microsoft.Dnx.Tooling.FunctionalTests/DnuPublishTests2.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
// 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. | ||
|
||
using System.IO; | ||
using Microsoft.Dnx.Testing; | ||
using Xunit; | ||
|
||
namespace Microsoft.Dnx.Tooling.FunctionalTests | ||
{ | ||
[Collection(nameof(ToolingFunctionalTestCollection))] | ||
public class DnuPublishTests2 : DnxSdkFunctionalTestBase | ||
{ | ||
[Theory] | ||
[MemberData(nameof(DnxSdks))] | ||
public void GlobalJsonInProjectDir(DnxSdk sdk) | ||
{ | ||
const string solutionName = "GlobalJsonInProjectDir"; | ||
|
||
var solution = TestUtils.GetSolution<DnuPublishTests>(sdk, solutionName); | ||
var projectPath = Path.Combine(solution.RootPath, "Project"); | ||
var outputPath = Path.Combine(solution.RootPath, "Output"); | ||
var expectedOutputPath = Path.Combine(solution.RootPath, "Expected"); | ||
|
||
var result = sdk.Dnu.Publish( | ||
projectPath, | ||
outputPath); | ||
result.EnsureSuccess(); | ||
|
||
var actualOutputStructure = new Dir(outputPath); | ||
var expectedOutputStructure = new Dir(expectedOutputPath); | ||
DirAssert.Equal(expectedOutputStructure, actualOutputStructure); | ||
} | ||
} | ||
} |
13 changes: 13 additions & 0 deletions
13
test/Microsoft.Dnx.Tooling.FunctionalTests/ToolingFunctionalTestCollection.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
// 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. | ||
|
||
using Xunit; | ||
|
||
namespace Microsoft.Dnx.Tooling.FunctionalTests | ||
{ | ||
|
||
[CollectionDefinition(nameof(ToolingFunctionalTestCollection))] | ||
public class ToolingFunctionalTestCollection : ICollectionFixture<ToolingFunctionalTestFixture> | ||
{ | ||
} | ||
} |
29 changes: 29 additions & 0 deletions
29
test/Microsoft.Dnx.Tooling.FunctionalTests/ToolingFunctionalTestFixture.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
// 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. | ||
|
||
using System; | ||
using Microsoft.Dnx.Testing; | ||
|
||
namespace Microsoft.Dnx.Tooling.FunctionalTests | ||
{ | ||
public class ToolingFunctionalTestFixture : IDisposable | ||
{ | ||
public ToolingFunctionalTestFixture() | ||
{ | ||
Console.WriteLine($@" | ||
Environment information: | ||
DNX_HOME: {Environment.GetEnvironmentVariable("DNX_HOME")} | ||
DNX_SDK_VERSION_FOR_TESTING: {Environment.GetEnvironmentVariable("DNX_SDK_VERSION_FOR_TESTING")} | ||
Information of DNX under testing: | ||
DNX Home: {DnxSdk.GetRuntimeHome()} | ||
DNX Version: {DnxSdkFunctionalTestBase.SdkVersionForTesting} | ||
"); | ||
} | ||
|
||
public void Dispose() | ||
{ | ||
|
||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters