From 59656291b1f5572867ebcdad607788c24236b616 Mon Sep 17 00:00:00 2001 From: Mattias Karlsson Date: Sun, 16 Apr 2017 23:43:01 +0200 Subject: [PATCH] (GH-1570) Upgrade integration tests to .NET Core SDK 1.0.1 --- tests/integration/.gitignore | 1 + .../Tools/DotNetCore/DotNetCoreAliases.cake | 16 ++--- tests/integration/build.ps1 | 6 +- tests/integration/build.sh | 4 +- .../hwapp.common/hwapp.common.csproj | 11 ++++ .../DotNetCore/hwapp.common/project.json | 14 ----- .../Cake.Common/Tools/DotNetCore/hwapp.sln | 62 +++++++++++++++++++ .../DotNetCore/hwapp.tests/hwapp.tests.csproj | 24 +++++++ .../Tools/DotNetCore/hwapp.tests/project.json | 30 --------- .../Tools/DotNetCore/hwapp/hwapp.csproj | 17 +++++ .../Tools/DotNetCore/hwapp/project.json | 24 ------- 11 files changed, 128 insertions(+), 81 deletions(-) create mode 100644 tests/integration/resources/Cake.Common/Tools/DotNetCore/hwapp.common/hwapp.common.csproj delete mode 100644 tests/integration/resources/Cake.Common/Tools/DotNetCore/hwapp.common/project.json create mode 100644 tests/integration/resources/Cake.Common/Tools/DotNetCore/hwapp.sln create mode 100644 tests/integration/resources/Cake.Common/Tools/DotNetCore/hwapp.tests/hwapp.tests.csproj delete mode 100644 tests/integration/resources/Cake.Common/Tools/DotNetCore/hwapp.tests/project.json create mode 100644 tests/integration/resources/Cake.Common/Tools/DotNetCore/hwapp/hwapp.csproj delete mode 100644 tests/integration/resources/Cake.Common/Tools/DotNetCore/hwapp/project.json diff --git a/tests/integration/.gitignore b/tests/integration/.gitignore index 2b0494013c..26cb49da06 100644 --- a/tests/integration/.gitignore +++ b/tests/integration/.gitignore @@ -1,6 +1,7 @@ # Misc folders tools/ temp/ +.dotnet/ # Windows Thumbs.db diff --git a/tests/integration/Cake.Common/Tools/DotNetCore/DotNetCoreAliases.cake b/tests/integration/Cake.Common/Tools/DotNetCore/DotNetCoreAliases.cake index e496d2c445..ee64f25c2e 100644 --- a/tests/integration/Cake.Common/Tools/DotNetCore/DotNetCoreAliases.cake +++ b/tests/integration/Cake.Common/Tools/DotNetCore/DotNetCoreAliases.cake @@ -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") @@ -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 @@ -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); @@ -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); @@ -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); @@ -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"), @@ -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, diff --git a/tests/integration/build.ps1 b/tests/integration/build.ps1 index 4ac843b1be..b6a66fd602 100644 --- a/tests/integration/build.ps1 +++ b/tests/integration/build.ps1 @@ -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. diff --git a/tests/integration/build.sh b/tests/integration/build.sh index 1358a933b3..5877ca58f5 100755 --- a/tests/integration/build.sh +++ b/tests/integration/build.sh @@ -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 diff --git a/tests/integration/resources/Cake.Common/Tools/DotNetCore/hwapp.common/hwapp.common.csproj b/tests/integration/resources/Cake.Common/Tools/DotNetCore/hwapp.common/hwapp.common.csproj new file mode 100644 index 0000000000..c02d7d5dd4 --- /dev/null +++ b/tests/integration/resources/Cake.Common/Tools/DotNetCore/hwapp.common/hwapp.common.csproj @@ -0,0 +1,11 @@ + + + + netstandard1.6 + portable + hwapp.common + hwapp.common + 1.6.0 + + + diff --git a/tests/integration/resources/Cake.Common/Tools/DotNetCore/hwapp.common/project.json b/tests/integration/resources/Cake.Common/Tools/DotNetCore/hwapp.common/project.json deleted file mode 100644 index 6f1ec549e4..0000000000 --- a/tests/integration/resources/Cake.Common/Tools/DotNetCore/hwapp.common/project.json +++ /dev/null @@ -1,14 +0,0 @@ -{ - "version": "1.0.0-*", - "buildOptions": { - "debugType": "portable" - }, - "dependencies": {}, - "frameworks": { - "netstandard1.6": { - "dependencies": { - "NETStandard.Library": "1.6.0" - } - } - } -} diff --git a/tests/integration/resources/Cake.Common/Tools/DotNetCore/hwapp.sln b/tests/integration/resources/Cake.Common/Tools/DotNetCore/hwapp.sln new file mode 100644 index 0000000000..b187004f95 --- /dev/null +++ b/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 diff --git a/tests/integration/resources/Cake.Common/Tools/DotNetCore/hwapp.tests/hwapp.tests.csproj b/tests/integration/resources/Cake.Common/Tools/DotNetCore/hwapp.tests/hwapp.tests.csproj new file mode 100644 index 0000000000..6abab2d70e --- /dev/null +++ b/tests/integration/resources/Cake.Common/Tools/DotNetCore/hwapp.tests/hwapp.tests.csproj @@ -0,0 +1,24 @@ + + + + netcoreapp1.0 + portable + hwapp.tests + hwapp.tests + true + $(PackageTargetFallback);dotnet5.4;portable-net451+win8 + 1.0.4 + + + + + + + + + + + + + + diff --git a/tests/integration/resources/Cake.Common/Tools/DotNetCore/hwapp.tests/project.json b/tests/integration/resources/Cake.Common/Tools/DotNetCore/hwapp.tests/project.json deleted file mode 100644 index 0584e6dc28..0000000000 --- a/tests/integration/resources/Cake.Common/Tools/DotNetCore/hwapp.tests/project.json +++ /dev/null @@ -1,30 +0,0 @@ -{ - "version": "1.0.0-*", - "buildOptions": { - "debugType": "portable" - }, - "dependencies": { - "System.Runtime.Serialization.Primitives": "4.1.1", - "xunit": "2.1.0", - "dotnet-test-xunit": "1.0.0-rc2-build10015", - "hwapp.common":{ - "version":"1.0.0", - "target":"project" - }, - }, - "testRunner": "xunit", - "frameworks": { - "netcoreapp1.0": { - "dependencies": { - "Microsoft.NETCore.App": { - "type": "platform", - "version": "1.0.0" - } - }, - "imports": [ - "dotnet5.4", - "portable-net451+win8" - ] - } - } -} diff --git a/tests/integration/resources/Cake.Common/Tools/DotNetCore/hwapp/hwapp.csproj b/tests/integration/resources/Cake.Common/Tools/DotNetCore/hwapp/hwapp.csproj new file mode 100644 index 0000000000..883e92eea4 --- /dev/null +++ b/tests/integration/resources/Cake.Common/Tools/DotNetCore/hwapp/hwapp.csproj @@ -0,0 +1,17 @@ + + + + netcoreapp1.0 + portable + hwapp + Exe + hwapp + $(PackageTargetFallback);dnxcore50 + 1.0.4 + + + + + + + diff --git a/tests/integration/resources/Cake.Common/Tools/DotNetCore/hwapp/project.json b/tests/integration/resources/Cake.Common/Tools/DotNetCore/hwapp/project.json deleted file mode 100644 index 73422df163..0000000000 --- a/tests/integration/resources/Cake.Common/Tools/DotNetCore/hwapp/project.json +++ /dev/null @@ -1,24 +0,0 @@ -{ - "version": "1.0.0-*", - "buildOptions": { - "debugType": "portable", - "emitEntryPoint": true - }, - "dependencies": { - "hwapp.common":{ - "version":"1.0.0", - "target":"project" - }, - }, - "frameworks": { - "netcoreapp1.0": { - "dependencies": { - "Microsoft.NETCore.App": { - "type": "platform", - "version": "1.0.0" - } - }, - "imports": "dnxcore50" - } - } -}