Skip to content

Commit

Permalink
(GH-1570) Upgrade integration tests to .NET Core SDK 1.0.1
Browse files Browse the repository at this point in the history
  • Loading branch information
devlead committed Apr 16, 2017
1 parent fbf725b commit 5965629
Show file tree
Hide file tree
Showing 11 changed files with 128 additions and 81 deletions.
1 change: 1 addition & 0 deletions tests/integration/.gitignore
@@ -1,6 +1,7 @@
# Misc folders
tools/
temp/
.dotnet/

# Windows
Thumbs.db
Expand Up @@ -18,7 +18,7 @@ Task("Cake.Common.Tools.DotNetCore.DotNetCoreAliases.DotNetCoreRestore")
var root = Paths.Temp.Combine("./Cake.Common/Tools/DotNetCore");
// When
DotNetCoreRestore(root.FullPath, new DotNetCoreRestoreSettings { Verbosity = DotNetCoreRestoreVerbosity.Warning });
DotNetCoreRestore(root.FullPath, new DotNetCoreRestoreSettings { Verbosity = DotNetCoreVerbosity.Minimal });
});

Task("Cake.Common.Tools.DotNetCore.DotNetCoreAliases.DotNetCoreBuild")
Expand All @@ -27,7 +27,7 @@ Task("Cake.Common.Tools.DotNetCore.DotNetCoreAliases.DotNetCoreBuild")
{
// Given
var path = Paths.Temp.Combine("./Cake.Common/Tools/DotNetCore");
var project = path.CombineWithFilePath("hwapp/project.json");
var project = path.CombineWithFilePath("hwapp/hwapp.csproj");
var assembly = path.CombineWithFilePath("hwapp/bin/Debug/netcoreapp1.0/hwapp.dll");
// When
Expand All @@ -43,7 +43,7 @@ Task("Cake.Common.Tools.DotNetCore.DotNetCoreAliases.DotNetCoreTest")
{
// Given
var path = Paths.Temp.Combine("./Cake.Common/Tools/DotNetCore");
var project = path.CombineWithFilePath("hwapp.tests/project.json");
var project = path.CombineWithFilePath("hwapp.tests/hwapp.tests.csproj");
// When
DotNetCoreTest(project.FullPath);
Expand All @@ -55,7 +55,7 @@ Task("Cake.Common.Tools.DotNetCore.DotNetCoreAliases.DotNetCoreRun")
{
// Given
var path = Paths.Temp.Combine("./Cake.Common/Tools/DotNetCore");
var project = path.CombineWithFilePath("hwapp/project.json");
var project = path.CombineWithFilePath("hwapp/hwapp.csproj");
// When
DotNetCoreRun(project.FullPath);
Expand All @@ -67,14 +67,14 @@ Task("Cake.Common.Tools.DotNetCore.DotNetCoreAliases.DotNetCorePack")
{
// Given
var path = Paths.Temp.Combine("./Cake.Common/Tools/DotNetCore");
var project = path.CombineWithFilePath("hwapp/project.json");
var project = path.CombineWithFilePath("hwapp/hwapp.csproj");
var outputPath = path.Combine("DotNetCorePack");
var nuget = outputPath.CombineWithFilePath("hwapp.1.0.0.nupkg");
var nugetSymbols = outputPath.CombineWithFilePath("hwapp.1.0.0.symbols.nupkg");
EnsureDirectoryExist(outputPath);
// When
DotNetCorePack(project.FullPath, new DotNetCorePackSettings { OutputDirectory = outputPath });
DotNetCorePack(project.FullPath, new DotNetCorePackSettings { OutputDirectory = outputPath, IncludeSymbols = true });
// Then
Assert.True(System.IO.File.Exists(nuget.FullPath), "Path:" + nuget.FullPath);
Expand All @@ -87,7 +87,7 @@ Task("Cake.Common.Tools.DotNetCore.DotNetCoreAliases.DotNetCorePublish")
{
// Given
var path = Paths.Temp.Combine("./Cake.Common/Tools/DotNetCore");
var project = path.CombineWithFilePath("hwapp/project.json");
var project = path.CombineWithFilePath("hwapp/hwapp.csproj");
var outputPath = path.Combine("DotNetCorePublish");
var publishFiles = new [] {
outputPath.CombineWithFilePath("hwapp.common.dll"),
Expand Down Expand Up @@ -128,7 +128,7 @@ Task("Cake.Common.Tools.DotNetCore.DotNetCoreAliases.DotNetCoreTest.Fail")
{
// Given
var path = Paths.Temp.Combine("./Cake.Common/Tools/DotNetCore");
var project = path.CombineWithFilePath("hwapp.tests/project.json");
var project = path.CombineWithFilePath("hwapp.tests/hwapp.tests.csproj");
// When
var exception = Record.Exception(()=>DotNetCoreTest(project.FullPath,
Expand Down
6 changes: 3 additions & 3 deletions tests/integration/build.ps1
Expand Up @@ -55,9 +55,9 @@ $Script = (Join-Path $PSScriptRoot "windows.cake")
$MonoScript = (Join-Path $PSScriptRoot "build.cake")
$ToolsPath = Join-Path $PSScriptRoot "tools"
$NuGetPath = Join-Path $ToolsPath "nuget.exe"
$DotNetChannel = "preview"
$DotNetVersion = "1.0.0-preview2-003121"
$DotNetInstallerUri = "https://raw.githubusercontent.com/dotnet/cli/rel/1.0.0-preview2/scripts/obtain/dotnet-install.ps1"
$DotNetChannel = "rel-1.0.1"
$DotNetVersion = "1.0.1"
$DotNetInstallerUri = "https://raw.githubusercontent.com/dotnet/cli/v1.0.1/scripts/obtain/dotnet-install.ps1"
$NuGetUrl = "https://dist.nuget.org/win-x86-commandline/latest/nuget.exe"

# Make sure the tools directory exist.
Expand Down
4 changes: 2 additions & 2 deletions tests/integration/build.sh
Expand Up @@ -60,8 +60,8 @@ echo "Installing .NET CLI..."
if [ ! -d "$SCRIPT_DIR/.dotnet" ]; then
mkdir "$SCRIPT_DIR/.dotnet"
fi
curl -Lsfo "$SCRIPT_DIR/.dotnet/dotnet-install.sh" https://raw.githubusercontent.com/dotnet/cli/rel/1.0.0-preview2/scripts/obtain/dotnet-install.sh
sudo bash "$SCRIPT_DIR/.dotnet/dotnet-install.sh" --version 1.0.0-preview2-003121 --install-dir .dotnet --no-path
curl -Lsfo "$SCRIPT_DIR/.dotnet/dotnet-install.sh" https://raw.githubusercontent.com/dotnet/cli/v1.0.1/scripts/obtain/dotnet-install.sh
sudo bash "$SCRIPT_DIR/.dotnet/dotnet-install.sh" --version 1.0.1 --install-dir .dotnet --no-path
export PATH="$SCRIPT_DIR/.dotnet":$PATH
export DOTNET_SKIP_FIRST_TIME_EXPERIENCE=1
export DOTNET_CLI_TELEMETRY_OPTOUT=1
Expand Down
@@ -0,0 +1,11 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>netstandard1.6</TargetFramework>
<DebugType>portable</DebugType>
<AssemblyName>hwapp.common</AssemblyName>
<PackageId>hwapp.common</PackageId>
<NetStandardImplicitPackageVersion>1.6.0</NetStandardImplicitPackageVersion>
</PropertyGroup>

</Project>

This file was deleted.

62 changes: 62 additions & 0 deletions tests/integration/resources/Cake.Common/Tools/DotNetCore/hwapp.sln
@@ -0,0 +1,62 @@

Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio 15
VisualStudioVersion = 15.0.26124.0
MinimumVisualStudioVersion = 15.0.26124.0
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "hwapp", "hwapp\hwapp.csproj", "{85525223-E691-4A92-83B9-91BCA748FFC4}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "hwapp.common", "hwapp.common\hwapp.common.csproj", "{EBAE0A98-D9AC-44D1-BF16-7DB576254CD4}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "hwapp.tests", "hwapp.tests\hwapp.tests.csproj", "{58ED0A23-39F3-4F89-A527-2E838947FA59}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Debug|x64 = Debug|x64
Debug|x86 = Debug|x86
Release|Any CPU = Release|Any CPU
Release|x64 = Release|x64
Release|x86 = Release|x86
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{85525223-E691-4A92-83B9-91BCA748FFC4}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{85525223-E691-4A92-83B9-91BCA748FFC4}.Debug|Any CPU.Build.0 = Debug|Any CPU
{85525223-E691-4A92-83B9-91BCA748FFC4}.Debug|x64.ActiveCfg = Debug|x64
{85525223-E691-4A92-83B9-91BCA748FFC4}.Debug|x64.Build.0 = Debug|x64
{85525223-E691-4A92-83B9-91BCA748FFC4}.Debug|x86.ActiveCfg = Debug|x86
{85525223-E691-4A92-83B9-91BCA748FFC4}.Debug|x86.Build.0 = Debug|x86
{85525223-E691-4A92-83B9-91BCA748FFC4}.Release|Any CPU.ActiveCfg = Release|Any CPU
{85525223-E691-4A92-83B9-91BCA748FFC4}.Release|Any CPU.Build.0 = Release|Any CPU
{85525223-E691-4A92-83B9-91BCA748FFC4}.Release|x64.ActiveCfg = Release|x64
{85525223-E691-4A92-83B9-91BCA748FFC4}.Release|x64.Build.0 = Release|x64
{85525223-E691-4A92-83B9-91BCA748FFC4}.Release|x86.ActiveCfg = Release|x86
{85525223-E691-4A92-83B9-91BCA748FFC4}.Release|x86.Build.0 = Release|x86
{EBAE0A98-D9AC-44D1-BF16-7DB576254CD4}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{EBAE0A98-D9AC-44D1-BF16-7DB576254CD4}.Debug|Any CPU.Build.0 = Debug|Any CPU
{EBAE0A98-D9AC-44D1-BF16-7DB576254CD4}.Debug|x64.ActiveCfg = Debug|x64
{EBAE0A98-D9AC-44D1-BF16-7DB576254CD4}.Debug|x64.Build.0 = Debug|x64
{EBAE0A98-D9AC-44D1-BF16-7DB576254CD4}.Debug|x86.ActiveCfg = Debug|x86
{EBAE0A98-D9AC-44D1-BF16-7DB576254CD4}.Debug|x86.Build.0 = Debug|x86
{EBAE0A98-D9AC-44D1-BF16-7DB576254CD4}.Release|Any CPU.ActiveCfg = Release|Any CPU
{EBAE0A98-D9AC-44D1-BF16-7DB576254CD4}.Release|Any CPU.Build.0 = Release|Any CPU
{EBAE0A98-D9AC-44D1-BF16-7DB576254CD4}.Release|x64.ActiveCfg = Release|x64
{EBAE0A98-D9AC-44D1-BF16-7DB576254CD4}.Release|x64.Build.0 = Release|x64
{EBAE0A98-D9AC-44D1-BF16-7DB576254CD4}.Release|x86.ActiveCfg = Release|x86
{EBAE0A98-D9AC-44D1-BF16-7DB576254CD4}.Release|x86.Build.0 = Release|x86
{58ED0A23-39F3-4F89-A527-2E838947FA59}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{58ED0A23-39F3-4F89-A527-2E838947FA59}.Debug|Any CPU.Build.0 = Debug|Any CPU
{58ED0A23-39F3-4F89-A527-2E838947FA59}.Debug|x64.ActiveCfg = Debug|x64
{58ED0A23-39F3-4F89-A527-2E838947FA59}.Debug|x64.Build.0 = Debug|x64
{58ED0A23-39F3-4F89-A527-2E838947FA59}.Debug|x86.ActiveCfg = Debug|x86
{58ED0A23-39F3-4F89-A527-2E838947FA59}.Debug|x86.Build.0 = Debug|x86
{58ED0A23-39F3-4F89-A527-2E838947FA59}.Release|Any CPU.ActiveCfg = Release|Any CPU
{58ED0A23-39F3-4F89-A527-2E838947FA59}.Release|Any CPU.Build.0 = Release|Any CPU
{58ED0A23-39F3-4F89-A527-2E838947FA59}.Release|x64.ActiveCfg = Release|x64
{58ED0A23-39F3-4F89-A527-2E838947FA59}.Release|x64.Build.0 = Release|x64
{58ED0A23-39F3-4F89-A527-2E838947FA59}.Release|x86.ActiveCfg = Release|x86
{58ED0A23-39F3-4F89-A527-2E838947FA59}.Release|x86.Build.0 = Release|x86
EndGlobalSection
EndGlobal
@@ -0,0 +1,24 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>netcoreapp1.0</TargetFramework>
<DebugType>portable</DebugType>
<AssemblyName>hwapp.tests</AssemblyName>
<PackageId>hwapp.tests</PackageId>
<GenerateRuntimeConfigurationFiles>true</GenerateRuntimeConfigurationFiles>
<PackageTargetFallback>$(PackageTargetFallback);dotnet5.4;portable-net451+win8</PackageTargetFallback>
<RuntimeFrameworkVersion>1.0.4</RuntimeFrameworkVersion>
</PropertyGroup>

<ItemGroup>
<ProjectReference Include="..\hwapp.common\hwapp.common.csproj" />
</ItemGroup>

<ItemGroup>
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="15.0.0" />
<PackageReference Include="xunit.runner.visualstudio" Version="2.2.0" />
<PackageReference Include="System.Runtime.Serialization.Primitives" Version="4.1.1" />
<PackageReference Include="xunit" Version="2.2.0" />
</ItemGroup>

</Project>

This file was deleted.

@@ -0,0 +1,17 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>netcoreapp1.0</TargetFramework>
<DebugType>portable</DebugType>
<AssemblyName>hwapp</AssemblyName>
<OutputType>Exe</OutputType>
<PackageId>hwapp</PackageId>
<PackageTargetFallback>$(PackageTargetFallback);dnxcore50</PackageTargetFallback>
<RuntimeFrameworkVersion>1.0.4</RuntimeFrameworkVersion>
</PropertyGroup>

<ItemGroup>
<ProjectReference Include="..\hwapp.common\hwapp.common.csproj" />
</ItemGroup>

</Project>

This file was deleted.

0 comments on commit 5965629

Please sign in to comment.