From 8b2bd91c9341edfc4b0a22fb2c71a8188d301ec3 Mon Sep 17 00:00:00 2001 From: Hao Kung Date: Wed, 18 Mar 2020 14:38:23 -0700 Subject: [PATCH 01/19] See if framework tests work now --- src/Framework/test/Microsoft.AspNetCore.App.UnitTests.csproj | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/Framework/test/Microsoft.AspNetCore.App.UnitTests.csproj b/src/Framework/test/Microsoft.AspNetCore.App.UnitTests.csproj index 8d9b26e7d086..2308c473ee03 100644 --- a/src/Framework/test/Microsoft.AspNetCore.App.UnitTests.csproj +++ b/src/Framework/test/Microsoft.AspNetCore.App.UnitTests.csproj @@ -3,9 +3,8 @@ $(DefaultNetCoreTargetFramework) Microsoft.AspNetCore - - false true + true From aac02145058e17bd0d5fb0cb1d32b6d2638e7626 Mon Sep 17 00:00:00 2001 From: Hao Kung Date: Wed, 18 Mar 2020 20:37:37 -0700 Subject: [PATCH 02/19] Fix sharedfx root for helix runs --- src/Framework/test/SharedFxTests.cs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/Framework/test/SharedFxTests.cs b/src/Framework/test/SharedFxTests.cs index 558fc344398b..9bfbd89e47bc 100644 --- a/src/Framework/test/SharedFxTests.cs +++ b/src/Framework/test/SharedFxTests.cs @@ -23,7 +23,10 @@ public SharedFxTests(ITestOutputHelper output) _output = output; _expectedTfm = "netcoreapp" + TestData.GetSharedFxVersion().Substring(0, 3); _expectedRid = TestData.GetSharedFxRuntimeIdentifier(); - _sharedFxRoot = Path.Combine(TestData.GetTestDataValue("SharedFrameworkLayoutRoot"), "shared", "Microsoft.AspNetCore.App", TestData.GetTestDataValue("RuntimePackageVersion")); + var root = string.IsNullOrEmpty(Environment.GetEnvironmentVariable("helix")) + ? TestData.GetTestDataValue("SharedFrameworkLayoutRoot") + : Environment.GetEnvironmentVariable("DOTNET_ROOT"); + _sharedFxRoot = Path.Combine(root, "shared", "Microsoft.AspNetCore.App", TestData.GetTestDataValue("RuntimePackageVersion")) } [Fact] From dc1a955db616452e89e6ba46e52fcd99524f5d36 Mon Sep 17 00:00:00 2001 From: Hao Kung Date: Wed, 18 Mar 2020 20:41:21 -0700 Subject: [PATCH 03/19] Look for targeting pack in right place --- src/Framework/test/TargetingPackTests.cs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/Framework/test/TargetingPackTests.cs b/src/Framework/test/TargetingPackTests.cs index 54da276513c6..ff59abad6c58 100644 --- a/src/Framework/test/TargetingPackTests.cs +++ b/src/Framework/test/TargetingPackTests.cs @@ -26,6 +26,9 @@ public TargetingPackTests(ITestOutputHelper output) { _output = output; _expectedRid = TestData.GetSharedFxRuntimeIdentifier(); + var root = string.IsNullOrEmpty(Environment.GetEnvironmentVariable("helix")) + ? TestData.GetTestDataValue("TargetingPackLayoutRoot") + : Environment.GetEnvironmentVariable("DOTNET_ROOT"); _targetingPackRoot = Path.Combine(TestData.GetTestDataValue("TargetingPackLayoutRoot"), "packs", "Microsoft.AspNetCore.App.Ref", TestData.GetTestDataValue("TargetingPackVersion")); _isTargetingPackBuilding = bool.Parse(TestData.GetTestDataValue("IsTargetingPackBuilding")); } From 34802dc47966c420fcdda9f9d0566814e98458dc Mon Sep 17 00:00:00 2001 From: Hao Kung Date: Wed, 18 Mar 2020 20:46:08 -0700 Subject: [PATCH 04/19] Add TestDependsOnAspnetRef logic --- eng/targets/Helix.targets | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/eng/targets/Helix.targets b/eng/targets/Helix.targets index 154ce92ee6f2..b0e3b12c2a9d 100644 --- a/eng/targets/Helix.targets +++ b/eng/targets/Helix.targets @@ -21,6 +21,11 @@ + + + + + From 9b50e8fd6755a0f68e2f07941b17a0b0ae60fb8c Mon Sep 17 00:00:00 2001 From: Hao Kung Date: Wed, 18 Mar 2020 20:53:02 -0700 Subject: [PATCH 05/19] Install ref package --- eng/helix/content/InstallAspNetRef.ps1 | 40 ++++++++++++++++++++++++++ 1 file changed, 40 insertions(+) create mode 100644 eng/helix/content/InstallAspNetRef.ps1 diff --git a/eng/helix/content/InstallAspNetRef.ps1 b/eng/helix/content/InstallAspNetRef.ps1 new file mode 100644 index 000000000000..b05cf40af357 --- /dev/null +++ b/eng/helix/content/InstallAspNetRef.ps1 @@ -0,0 +1,40 @@ + <# + .SYNOPSIS + Unzips an AspNetCore.App.Ref nupkg + .DESCRIPTION + This script unzips an AspNetCore.App.Ref nupkg + .PARAMETER RefPath + The path to the AspNetCore.App.Ref package to install. + .PARAMETER InstallDir + The directory to install to. + #> +param( + [Parameter(Mandatory = $true)] + $RefPath, + + [Parameter(Mandatory = $true)] + $InstallDir, +) + +$ErrorActionPreference = 'Stop' +$ProgressPreference = 'SilentlyContinue' # Workaround PowerShell/PowerShell#2138 + +Set-StrictMode -Version 1 + +Write-Host "Extracting to $InstallDir" + +$zipPackage = [io.path]::ChangeExtension($RefPath, ".zip") +Write-Host "Renaming to $zipPackage" +Rename-Item -Path $RefPath -NewName $zipPackage +if (Get-Command -Name 'Microsoft.PowerShell.Archive\Expand-Archive' -ErrorAction Ignore) { + # Use built-in commands where possible as they are cross-plat compatible + Microsoft.PowerShell.Archive\Expand-Archive -Path $zipPackage -DestinationPath "$InstallDir" -Force +} +else { + Remove-Item "$InstallDir" -Recurse -ErrorAction Ignore + # Fallback to old approach for old installations of PowerShell + Add-Type -AssemblyName System.IO.Compression.FileSystem + [System.IO.Compression.ZipFile]::ExtractToDirectory($zipPackage, "$InstallDir") +} + +Get-ChildItem -Path "$InstallDir" -Recurse From e5a9039590ced38c23d5c96a985e8d7c71c052cd Mon Sep 17 00:00:00 2001 From: Hao Kung Date: Wed, 18 Mar 2020 20:53:33 -0700 Subject: [PATCH 06/19] Update Helix.targets Update Microsoft.AspNetCore.App.UnitTests.csproj Update TargetingPackTests.cs Update SharedFxTests.cs Update TargetingPackTests.cs Update InstallAspNetRef.ps1 Update Helix.targets Create installaspnetref.sh Update SharedFxTests.cs Update TargetingPackTests.cs Update SharedFxTests.cs Fix runtimeVersion Update runtests.cmd Update runtests.cmd Update runtests.sh Update runtests.sh Update runtests.cmd Update SharedFxTests.cs Update runtests.cmd Update runtests.cmd Update InstallAppRuntime.ps1 Update runtests.sh Skip versions file check on helix for now Update Microsoft.AspNetCore.App.UnitTests.csproj Run unit tests on azdo too Update SharedFxTests.cs Update SharedFxTests.cs Update Microsoft.AspNetCore.App.UnitTests.csproj --- eng/helix/content/InstallAppRuntime.ps1 | 5 +---- eng/helix/content/InstallAspNetRef.ps1 | 2 +- eng/helix/content/installaspnetref.sh | 15 +++++++++++++++ eng/targets/Helix.targets | 15 ++++++++++----- .../Microsoft.AspNetCore.App.UnitTests.csproj | 5 +++++ src/Framework/test/SharedFxTests.cs | 11 ++++++----- src/Framework/test/TargetingPackTests.cs | 7 +++---- 7 files changed, 41 insertions(+), 19 deletions(-) create mode 100644 eng/helix/content/installaspnetref.sh diff --git a/eng/helix/content/InstallAppRuntime.ps1 b/eng/helix/content/InstallAppRuntime.ps1 index 9d9aaffb5c80..8ea6c323e9b7 100644 --- a/eng/helix/content/InstallAppRuntime.ps1 +++ b/eng/helix/content/InstallAppRuntime.ps1 @@ -30,8 +30,6 @@ $ProgressPreference = 'SilentlyContinue' # Workaround PowerShell/PowerShell#2138 Set-StrictMode -Version 1 -Write-Host "Extracting to $InstallDir" - $zipPackage = [io.path]::ChangeExtension($AppRuntimePath, ".zip") Write-Host "Renaming to $zipPackage" Rename-Item -Path $AppRuntimePath -NewName $zipPackage @@ -46,8 +44,7 @@ else { [System.IO.Compression.ZipFile]::ExtractToDirectory($zipPackage, ".\tmpRuntime") } -Get-ChildItem -Path ".\tmpRuntime" -Recurse - +New-Item -ItemType Directory -Force -Path $InstallDir Write-Host "Copying managed files to $InstallDir" Copy-Item -Path ".\tmpRuntime\runtimes\$RuntimeIdentifier\lib\$Framework\*" $InstallDir Write-Host "Copying native files to $InstallDir" diff --git a/eng/helix/content/InstallAspNetRef.ps1 b/eng/helix/content/InstallAspNetRef.ps1 index b05cf40af357..d5a4d2a9c66f 100644 --- a/eng/helix/content/InstallAspNetRef.ps1 +++ b/eng/helix/content/InstallAspNetRef.ps1 @@ -13,7 +13,7 @@ param( $RefPath, [Parameter(Mandatory = $true)] - $InstallDir, + $InstallDir ) $ErrorActionPreference = 'Stop' diff --git a/eng/helix/content/installaspnetref.sh b/eng/helix/content/installaspnetref.sh new file mode 100644 index 000000000000..6ab719a09ffa --- /dev/null +++ b/eng/helix/content/installaspnetref.sh @@ -0,0 +1,15 @@ +#!/usr/bin/env bash + +# Cause the script to fail if any subcommand fails +set -e + +refPath=$1 +output_dir=$2 +tmpDir=./tmpRuntime + +echo "Installing ref package from $refPath" +cp $refPath sharedFx.zip + +mkdir -p $output_dir +echo "Unzip to $output_dir" +unzip sharedFx.zip -d $output_dir diff --git a/eng/targets/Helix.targets b/eng/targets/Helix.targets index b0e3b12c2a9d..02119107bed8 100644 --- a/eng/targets/Helix.targets +++ b/eng/targets/Helix.targets @@ -16,16 +16,21 @@ - - - + + + - + - + + + + + + diff --git a/src/Framework/test/Microsoft.AspNetCore.App.UnitTests.csproj b/src/Framework/test/Microsoft.AspNetCore.App.UnitTests.csproj index 2308c473ee03..855f74eeb475 100644 --- a/src/Framework/test/Microsoft.AspNetCore.App.UnitTests.csproj +++ b/src/Framework/test/Microsoft.AspNetCore.App.UnitTests.csproj @@ -5,6 +5,10 @@ Microsoft.AspNetCore true true + true + + + false @@ -47,6 +51,7 @@ + diff --git a/src/Framework/test/SharedFxTests.cs b/src/Framework/test/SharedFxTests.cs index 9bfbd89e47bc..743c21455dde 100644 --- a/src/Framework/test/SharedFxTests.cs +++ b/src/Framework/test/SharedFxTests.cs @@ -5,6 +5,7 @@ using System.Collections.Generic; using System.IO; using System.Linq; +using Microsoft.AspNetCore.Testing; using Newtonsoft.Json.Linq; using Xunit; using Xunit.Abstractions; @@ -23,10 +24,9 @@ public SharedFxTests(ITestOutputHelper output) _output = output; _expectedTfm = "netcoreapp" + TestData.GetSharedFxVersion().Substring(0, 3); _expectedRid = TestData.GetSharedFxRuntimeIdentifier(); - var root = string.IsNullOrEmpty(Environment.GetEnvironmentVariable("helix")) - ? TestData.GetTestDataValue("SharedFrameworkLayoutRoot") - : Environment.GetEnvironmentVariable("DOTNET_ROOT"); - _sharedFxRoot = Path.Combine(root, "shared", "Microsoft.AspNetCore.App", TestData.GetTestDataValue("RuntimePackageVersion")) + _sharedFxRoot = string.IsNullOrEmpty(Environment.GetEnvironmentVariable("ASPNET_RUNTIME_PATH")) + ? Path.Combine(TestData.GetTestDataValue("SharedFrameworkLayoutRoot"), "shared", TestData.GetTestDataValue("RuntimePackageVersion")) + : Environment.GetEnvironmentVariable("ASPNET_RUNTIME_PATH"); } [Fact] @@ -131,7 +131,8 @@ public void ItContainsValidDepsJson() } } - [Fact] + [ConditionalFact] + [SkipOnHelix("missing file from sfx builds")] public void ItContainsVersionFile() { var versionFile = Path.Combine(_sharedFxRoot, "Microsoft.AspNetCore.App.versions.txt"); diff --git a/src/Framework/test/TargetingPackTests.cs b/src/Framework/test/TargetingPackTests.cs index ff59abad6c58..e296884e4551 100644 --- a/src/Framework/test/TargetingPackTests.cs +++ b/src/Framework/test/TargetingPackTests.cs @@ -26,10 +26,9 @@ public TargetingPackTests(ITestOutputHelper output) { _output = output; _expectedRid = TestData.GetSharedFxRuntimeIdentifier(); - var root = string.IsNullOrEmpty(Environment.GetEnvironmentVariable("helix")) - ? TestData.GetTestDataValue("TargetingPackLayoutRoot") - : Environment.GetEnvironmentVariable("DOTNET_ROOT"); - _targetingPackRoot = Path.Combine(TestData.GetTestDataValue("TargetingPackLayoutRoot"), "packs", "Microsoft.AspNetCore.App.Ref", TestData.GetTestDataValue("TargetingPackVersion")); + _targetingPackRoot = string.IsNullOrEmpty(Environment.GetEnvironmentVariable("helix")) + ? Path.Combine(TestData.GetTestDataValue("TargetingPackLayoutRoot"), "packs", "Microsoft.AspNetCore.App.Ref", TestData.GetTestDataValue("TargetingPackVersion")) + : Path.Combine(Environment.GetEnvironmentVariable("HELIX_WORKITEM_ROOT"), "Microsoft.AspNetCore.App.Ref"); _isTargetingPackBuilding = bool.Parse(TestData.GetTestDataValue("IsTargetingPackBuilding")); } From 3b7fa9a4dc263685335f1476ca156dd84d8525a6 Mon Sep 17 00:00:00 2001 From: Hao Kung Date: Wed, 1 Apr 2020 14:59:55 -0700 Subject: [PATCH 07/19] Update SharedFxTests.cs --- src/Framework/test/SharedFxTests.cs | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/Framework/test/SharedFxTests.cs b/src/Framework/test/SharedFxTests.cs index 743c21455dde..390cb88da29e 100644 --- a/src/Framework/test/SharedFxTests.cs +++ b/src/Framework/test/SharedFxTests.cs @@ -131,8 +131,7 @@ public void ItContainsValidDepsJson() } } - [ConditionalFact] - [SkipOnHelix("missing file from sfx builds")] + [Fact] public void ItContainsVersionFile() { var versionFile = Path.Combine(_sharedFxRoot, "Microsoft.AspNetCore.App.versions.txt"); From 2441b7a967a2b11acaa1b3263baf84ed9c9294f5 Mon Sep 17 00:00:00 2001 From: Hao Kung Date: Wed, 1 Apr 2020 17:51:10 -0700 Subject: [PATCH 08/19] Set ASPNET_RUNTIME_PATH for helix --- eng/helix/content/RunTests/TestRunner.cs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/eng/helix/content/RunTests/TestRunner.cs b/eng/helix/content/RunTests/TestRunner.cs index 850d0b629db1..7f975f66f98f 100644 --- a/eng/helix/content/RunTests/TestRunner.cs +++ b/eng/helix/content/RunTests/TestRunner.cs @@ -96,6 +96,8 @@ public async Task InstallAspNetAppIfNeededAsync() { var appRuntimePath = $"{Options.DotnetRoot}/shared/Microsoft.AspNetCore.App/{Options.RuntimeVersion}"; Console.WriteLine($"Found Microsoft.AspNetCore.App/, copying to {appRuntimePath}"); + Console.WriteLine($"Set ASPNET_RUNTIME_PATH: {appRuntimePath}"); + EnvironmentVariables.Add("ASPNET_RUNTIME_PATH", appRuntimePath); foreach (var file in Directory.EnumerateFiles("Microsoft.AspNetCore.App", "*.*", SearchOption.AllDirectories)) { File.Copy(file, Path.Combine(appRuntimePath, file), overwrite: true); From 487b46894c37310f2c6839c5b1134d1e8fd52793 Mon Sep 17 00:00:00 2001 From: Hao Kung Date: Fri, 3 Apr 2020 10:25:44 -0700 Subject: [PATCH 09/19] Update TestRunner.cs --- eng/helix/content/RunTests/TestRunner.cs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/eng/helix/content/RunTests/TestRunner.cs b/eng/helix/content/RunTests/TestRunner.cs index 7f975f66f98f..92e42ff30513 100644 --- a/eng/helix/content/RunTests/TestRunner.cs +++ b/eng/helix/content/RunTests/TestRunner.cs @@ -95,6 +95,8 @@ public async Task InstallAspNetAppIfNeededAsync() if (Directory.Exists("Microsoft.AspNetCore.App")) { var appRuntimePath = $"{Options.DotnetRoot}/shared/Microsoft.AspNetCore.App/{Options.RuntimeVersion}"; + Console.WriteLine($"Creating directory: {appRuntimePath}"); + Directory.CreateDirectory(appRuntimePath); Console.WriteLine($"Found Microsoft.AspNetCore.App/, copying to {appRuntimePath}"); Console.WriteLine($"Set ASPNET_RUNTIME_PATH: {appRuntimePath}"); EnvironmentVariables.Add("ASPNET_RUNTIME_PATH", appRuntimePath); From 7514a3a53900d4f880499892979b7ac6542a9243 Mon Sep 17 00:00:00 2001 From: Hao Kung Date: Sat, 4 Apr 2020 13:30:36 -0700 Subject: [PATCH 10/19] Update TestRunner.cs --- eng/helix/content/RunTests/TestRunner.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/eng/helix/content/RunTests/TestRunner.cs b/eng/helix/content/RunTests/TestRunner.cs index 92e42ff30513..fc8dd204c46d 100644 --- a/eng/helix/content/RunTests/TestRunner.cs +++ b/eng/helix/content/RunTests/TestRunner.cs @@ -102,7 +102,7 @@ public async Task InstallAspNetAppIfNeededAsync() EnvironmentVariables.Add("ASPNET_RUNTIME_PATH", appRuntimePath); foreach (var file in Directory.EnumerateFiles("Microsoft.AspNetCore.App", "*.*", SearchOption.AllDirectories)) { - File.Copy(file, Path.Combine(appRuntimePath, file), overwrite: true); + File.Copy(file, Path.Combine(appRuntimePath, Path.GetFileName(file), overwrite: true); } Console.WriteLine($"Adding current directory to nuget sources: {Options.HELIX_WORKITEM_ROOT}"); From 1ace386596c90e4aaafeeb0fbb95b5dd59d7b144 Mon Sep 17 00:00:00 2001 From: Hao Kung Date: Sat, 4 Apr 2020 16:44:04 -0700 Subject: [PATCH 11/19] Update TestRunner.cs --- eng/helix/content/RunTests/TestRunner.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/eng/helix/content/RunTests/TestRunner.cs b/eng/helix/content/RunTests/TestRunner.cs index fc8dd204c46d..33b106710f61 100644 --- a/eng/helix/content/RunTests/TestRunner.cs +++ b/eng/helix/content/RunTests/TestRunner.cs @@ -102,7 +102,7 @@ public async Task InstallAspNetAppIfNeededAsync() EnvironmentVariables.Add("ASPNET_RUNTIME_PATH", appRuntimePath); foreach (var file in Directory.EnumerateFiles("Microsoft.AspNetCore.App", "*.*", SearchOption.AllDirectories)) { - File.Copy(file, Path.Combine(appRuntimePath, Path.GetFileName(file), overwrite: true); + File.Copy(file, Path.Combine(appRuntimePath, Path.GetFileName(file)), overwrite: true); } Console.WriteLine($"Adding current directory to nuget sources: {Options.HELIX_WORKITEM_ROOT}"); From 9f448ead2b4e05bef9327895fb96d7a1f9250304 Mon Sep 17 00:00:00 2001 From: Hao Kung Date: Sat, 4 Apr 2020 18:55:02 -0700 Subject: [PATCH 12/19] Update ci.yml --- .azure/pipelines/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.azure/pipelines/ci.yml b/.azure/pipelines/ci.yml index af04da8a819d..5a0ab5c1ac41 100644 --- a/.azure/pipelines/ci.yml +++ b/.azure/pipelines/ci.yml @@ -674,7 +674,7 @@ stages: timeoutInMinutes: 180 steps: # Build the shared framework - - script: ./build.cmd -ci -all -pack -arch x64 -buildNative /p:ASPNETCORE_TEST_LOG_DIR=artifacts/log /bl:artifacts/log/helix.build.x64.binlog + - script: ./build.cmd -ci -all -test -pack -arch x64 -buildNative /p:ASPNETCORE_TEST_LOG_DIR=artifacts/log /bl:artifacts/log/helix.build.x64.binlog displayName: Build shared fx - script: .\restore.cmd -ci /p:BuildInteropProjects=true displayName: Restore From 26e1bd06913a04a35e5b1a2a7d12fd21e58a93db Mon Sep 17 00:00:00 2001 From: Hao Kung Date: Sun, 5 Apr 2020 00:08:30 -0700 Subject: [PATCH 13/19] Update ci.yml --- .azure/pipelines/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.azure/pipelines/ci.yml b/.azure/pipelines/ci.yml index 5a0ab5c1ac41..af04da8a819d 100644 --- a/.azure/pipelines/ci.yml +++ b/.azure/pipelines/ci.yml @@ -674,7 +674,7 @@ stages: timeoutInMinutes: 180 steps: # Build the shared framework - - script: ./build.cmd -ci -all -test -pack -arch x64 -buildNative /p:ASPNETCORE_TEST_LOG_DIR=artifacts/log /bl:artifacts/log/helix.build.x64.binlog + - script: ./build.cmd -ci -all -pack -arch x64 -buildNative /p:ASPNETCORE_TEST_LOG_DIR=artifacts/log /bl:artifacts/log/helix.build.x64.binlog displayName: Build shared fx - script: .\restore.cmd -ci /p:BuildInteropProjects=true displayName: Restore From 332b811a50b9561dd1c1c028622b351de3b1c75e Mon Sep 17 00:00:00 2001 From: Hao Kung Date: Mon, 6 Apr 2020 11:04:49 -0700 Subject: [PATCH 14/19] Dump shared app directory contents --- eng/helix/content/RunTests/TestRunner.cs | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/eng/helix/content/RunTests/TestRunner.cs b/eng/helix/content/RunTests/TestRunner.cs index 33b106710f61..2a9fadfb0105 100644 --- a/eng/helix/content/RunTests/TestRunner.cs +++ b/eng/helix/content/RunTests/TestRunner.cs @@ -65,17 +65,17 @@ public bool SetupEnvironment() } } - public void DisplayContents() + public void DisplayContents(string path = "./") { try { Console.WriteLine(); - Console.WriteLine("Displaying directory contents:"); - foreach (var file in Directory.EnumerateFiles("./")) + Console.WriteLine($"Displaying directory contents for {path}:"); + foreach (var file in Directory.EnumerateFiles(path)) { Console.WriteLine(Path.GetFileName(file)); } - foreach (var file in Directory.EnumerateDirectories("./")) + foreach (var file in Directory.EnumerateDirectories(path)) { Console.WriteLine(Path.GetFileName(file)); } @@ -83,7 +83,7 @@ public void DisplayContents() } catch (Exception e) { - Console.WriteLine($"Exception in DisplayInitialState: {e.ToString()}"); + Console.WriteLine($"Exception in DisplayContents: {e.ToString()}"); } } @@ -104,6 +104,8 @@ public async Task InstallAspNetAppIfNeededAsync() { File.Copy(file, Path.Combine(appRuntimePath, Path.GetFileName(file)), overwrite: true); } + + DisplayContents(appRuntimePath); Console.WriteLine($"Adding current directory to nuget sources: {Options.HELIX_WORKITEM_ROOT}"); From 1e87c080f3ffdc1e6cd9b4ff897ba29c9cc98ed7 Mon Sep 17 00:00:00 2001 From: Hao Kung Date: Mon, 6 Apr 2020 13:25:03 -0700 Subject: [PATCH 15/19] Also copy root txt files from shared fx --- eng/helix/content/InstallAppRuntime.ps1 | 2 ++ 1 file changed, 2 insertions(+) diff --git a/eng/helix/content/InstallAppRuntime.ps1 b/eng/helix/content/InstallAppRuntime.ps1 index 8ea6c323e9b7..5307a09e60fb 100644 --- a/eng/helix/content/InstallAppRuntime.ps1 +++ b/eng/helix/content/InstallAppRuntime.ps1 @@ -45,6 +45,8 @@ else { } New-Item -ItemType Directory -Force -Path $InstallDir +Write-Host "Copying *.txt to $InstallDir" +Copy-Item -Path ".\tmpRuntime\*.txt" $InstallDir Write-Host "Copying managed files to $InstallDir" Copy-Item -Path ".\tmpRuntime\runtimes\$RuntimeIdentifier\lib\$Framework\*" $InstallDir Write-Host "Copying native files to $InstallDir" From 7db26af0a0c692bbaeb782e43b760d4e50f9fa0f Mon Sep 17 00:00:00 2001 From: Hao Kung Date: Mon, 6 Apr 2020 13:25:35 -0700 Subject: [PATCH 16/19] Update installappruntime.sh --- eng/helix/content/installappruntime.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/eng/helix/content/installappruntime.sh b/eng/helix/content/installappruntime.sh index 45cb1554fab3..09a82953a97e 100755 --- a/eng/helix/content/installappruntime.sh +++ b/eng/helix/content/installappruntime.sh @@ -16,5 +16,6 @@ mkdir -p $tmpDir unzip sharedFx.zip -d $tmpDir mkdir -p $output_dir echo "Copying to $output_dir" +cp $tmpDir/*.txt $output_dir cp $tmpDir/runtimes/$rid/lib/$framework/* $output_dir cp $tmpDir/runtimes/$rid/native/* $output_dir From bc6c0f75b727d9d2dc6c444f55839f95c8dc1dd6 Mon Sep 17 00:00:00 2001 From: Hao Kung Date: Mon, 6 Apr 2020 13:27:13 -0700 Subject: [PATCH 17/19] Update Microsoft.AspNetCore.App.UnitTests.csproj --- src/Framework/test/Microsoft.AspNetCore.App.UnitTests.csproj | 4 ---- 1 file changed, 4 deletions(-) diff --git a/src/Framework/test/Microsoft.AspNetCore.App.UnitTests.csproj b/src/Framework/test/Microsoft.AspNetCore.App.UnitTests.csproj index 855f74eeb475..3038b73192ba 100644 --- a/src/Framework/test/Microsoft.AspNetCore.App.UnitTests.csproj +++ b/src/Framework/test/Microsoft.AspNetCore.App.UnitTests.csproj @@ -6,9 +6,6 @@ true true true - - - false @@ -51,7 +48,6 @@ - From 065a936ab85863d2acaca5bbfaf33194d9d572df Mon Sep 17 00:00:00 2001 From: Hao Kung Date: Mon, 6 Apr 2020 13:27:27 -0700 Subject: [PATCH 18/19] Update SharedFxTests.cs --- src/Framework/test/SharedFxTests.cs | 1 - 1 file changed, 1 deletion(-) diff --git a/src/Framework/test/SharedFxTests.cs b/src/Framework/test/SharedFxTests.cs index 390cb88da29e..2b7fae9f2957 100644 --- a/src/Framework/test/SharedFxTests.cs +++ b/src/Framework/test/SharedFxTests.cs @@ -5,7 +5,6 @@ using System.Collections.Generic; using System.IO; using System.Linq; -using Microsoft.AspNetCore.Testing; using Newtonsoft.Json.Linq; using Xunit; using Xunit.Abstractions; From 191467964678fbdf33ab9f6a1d7b2fd0f87a1c06 Mon Sep 17 00:00:00 2001 From: Hao Kung Date: Tue, 7 Apr 2020 14:16:06 -0700 Subject: [PATCH 19/19] Don't try to copy ref pack if its not building --- eng/targets/Helix.targets | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/eng/targets/Helix.targets b/eng/targets/Helix.targets index 02119107bed8..93b8feb54f4d 100644 --- a/eng/targets/Helix.targets +++ b/eng/targets/Helix.targets @@ -16,12 +16,12 @@ - + - +