This reverts commit 9a792f2a27.
This commit is contained in:
parent
1742904546
commit
1bbca1502b
|
|
@ -30,6 +30,8 @@ $ProgressPreference = 'SilentlyContinue' # Workaround PowerShell/PowerShell#2138
|
||||||
|
|
||||||
Set-StrictMode -Version 1
|
Set-StrictMode -Version 1
|
||||||
|
|
||||||
|
Write-Host "Extracting to $InstallDir"
|
||||||
|
|
||||||
$zipPackage = [io.path]::ChangeExtension($AppRuntimePath, ".zip")
|
$zipPackage = [io.path]::ChangeExtension($AppRuntimePath, ".zip")
|
||||||
Write-Host "Renaming to $zipPackage"
|
Write-Host "Renaming to $zipPackage"
|
||||||
Rename-Item -Path $AppRuntimePath -NewName $zipPackage
|
Rename-Item -Path $AppRuntimePath -NewName $zipPackage
|
||||||
|
|
@ -44,9 +46,8 @@ else {
|
||||||
[System.IO.Compression.ZipFile]::ExtractToDirectory($zipPackage, ".\tmpRuntime")
|
[System.IO.Compression.ZipFile]::ExtractToDirectory($zipPackage, ".\tmpRuntime")
|
||||||
}
|
}
|
||||||
|
|
||||||
New-Item -ItemType Directory -Force -Path $InstallDir
|
Get-ChildItem -Path ".\tmpRuntime" -Recurse
|
||||||
Write-Host "Copying *.txt to $InstallDir"
|
|
||||||
Copy-Item -Path ".\tmpRuntime\*.txt" $InstallDir
|
|
||||||
Write-Host "Copying managed files to $InstallDir"
|
Write-Host "Copying managed files to $InstallDir"
|
||||||
Copy-Item -Path ".\tmpRuntime\runtimes\$RuntimeIdentifier\lib\$Framework\*" $InstallDir
|
Copy-Item -Path ".\tmpRuntime\runtimes\$RuntimeIdentifier\lib\$Framework\*" $InstallDir
|
||||||
Write-Host "Copying native files to $InstallDir"
|
Write-Host "Copying native files to $InstallDir"
|
||||||
|
|
|
||||||
|
|
@ -1,40 +0,0 @@
|
||||||
<#
|
|
||||||
.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
|
|
||||||
|
|
@ -65,17 +65,17 @@ namespace RunTests
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public void DisplayContents(string path = "./")
|
public void DisplayContents()
|
||||||
{
|
{
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
Console.WriteLine();
|
Console.WriteLine();
|
||||||
Console.WriteLine($"Displaying directory contents for {path}:");
|
Console.WriteLine("Displaying directory contents:");
|
||||||
foreach (var file in Directory.EnumerateFiles(path))
|
foreach (var file in Directory.EnumerateFiles("./"))
|
||||||
{
|
{
|
||||||
Console.WriteLine(Path.GetFileName(file));
|
Console.WriteLine(Path.GetFileName(file));
|
||||||
}
|
}
|
||||||
foreach (var file in Directory.EnumerateDirectories(path))
|
foreach (var file in Directory.EnumerateDirectories("./"))
|
||||||
{
|
{
|
||||||
Console.WriteLine(Path.GetFileName(file));
|
Console.WriteLine(Path.GetFileName(file));
|
||||||
}
|
}
|
||||||
|
|
@ -83,7 +83,7 @@ namespace RunTests
|
||||||
}
|
}
|
||||||
catch (Exception e)
|
catch (Exception e)
|
||||||
{
|
{
|
||||||
Console.WriteLine($"Exception in DisplayContents: {e.ToString()}");
|
Console.WriteLine($"Exception in DisplayInitialState: {e.ToString()}");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -95,17 +95,11 @@ namespace RunTests
|
||||||
if (Directory.Exists("Microsoft.AspNetCore.App"))
|
if (Directory.Exists("Microsoft.AspNetCore.App"))
|
||||||
{
|
{
|
||||||
var appRuntimePath = $"{Options.DotnetRoot}/shared/Microsoft.AspNetCore.App/{Options.RuntimeVersion}";
|
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($"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))
|
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, file), overwrite: true);
|
||||||
}
|
}
|
||||||
|
|
||||||
DisplayContents(appRuntimePath);
|
|
||||||
|
|
||||||
Console.WriteLine($"Adding current directory to nuget sources: {Options.HELIX_WORKITEM_ROOT}");
|
Console.WriteLine($"Adding current directory to nuget sources: {Options.HELIX_WORKITEM_ROOT}");
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -16,6 +16,5 @@ mkdir -p $tmpDir
|
||||||
unzip sharedFx.zip -d $tmpDir
|
unzip sharedFx.zip -d $tmpDir
|
||||||
mkdir -p $output_dir
|
mkdir -p $output_dir
|
||||||
echo "Copying to $output_dir"
|
echo "Copying to $output_dir"
|
||||||
cp $tmpDir/*.txt $output_dir
|
|
||||||
cp $tmpDir/runtimes/$rid/lib/$framework/* $output_dir
|
cp $tmpDir/runtimes/$rid/lib/$framework/* $output_dir
|
||||||
cp $tmpDir/runtimes/$rid/native/* $output_dir
|
cp $tmpDir/runtimes/$rid/native/* $output_dir
|
||||||
|
|
|
||||||
|
|
@ -1,15 +0,0 @@
|
||||||
#!/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
|
|
||||||
|
|
@ -16,16 +16,6 @@
|
||||||
<HelixPreCommand Include="call RunPowershell.cmd InstallNode.ps1 $(NodeVersion) %25HELIX_CORRELATION_PAYLOAD%25\node\bin || exit /b 1" />
|
<HelixPreCommand Include="call RunPowershell.cmd InstallNode.ps1 $(NodeVersion) %25HELIX_CORRELATION_PAYLOAD%25\node\bin || exit /b 1" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
<ItemGroup Condition="'$(IsHelixJob)' == 'true' AND '$(IsWindowsHelixQueue)' == 'true' AND '$(TestDependsOnAspNetRef)' == 'true' AND '$(IsTargetingPackBuilding)' == 'true'">
|
|
||||||
<HelixContent Include="$(RepoRoot)artifacts\packages\Release\Shipping\Microsoft.AspNetCore.App.Ref.$(AppRuntimeVersion).nupkg" />
|
|
||||||
<HelixPreCommand Include="call RunPowershell.cmd InstallAspNetRef.ps1 Microsoft.AspNetCore.App.Ref.$(AppRuntimeVersion).nupkg Microsoft.AspNetCore.App.Ref || exit /b 1" />
|
|
||||||
</ItemGroup>
|
|
||||||
|
|
||||||
<ItemGroup Condition="'$(IsHelixJob)' == 'true' AND '$(IsWindowsHelixQueue)' == 'false' AND '$(TestDependsOnAspNetRef)' == 'true' AND '$(IsTargetingPackBuilding)' == 'true'">
|
|
||||||
<HelixContent Include="$(RepoRoot)artifacts\packages\Release\Shipping\Microsoft.AspNetCore.App.Ref.$(AppRuntimeVersion).nupkg" />
|
|
||||||
<HelixPreCommand Include="./installaspnetref.sh Microsoft.AspNetCore.App.Ref.$(AppRuntimeVersion).nupkg Microsoft.AspNetCore.App.Ref || exit /b 1" />
|
|
||||||
</ItemGroup>
|
|
||||||
|
|
||||||
<ItemGroup Condition="'$(IsHelixJob)' == 'true' AND '$(IsWindowsHelixQueue)' == 'true' AND '$(TestDependsOnAspNetRuntime)' == 'true'">
|
<ItemGroup Condition="'$(IsHelixJob)' == 'true' AND '$(IsWindowsHelixQueue)' == 'true' AND '$(TestDependsOnAspNetRuntime)' == 'true'">
|
||||||
<HelixContent Include="$(RepoRoot)artifacts\packages\Release\Shipping\Microsoft.AspNetCore.App.Runtime.win-x64.$(AppRuntimeVersion).nupkg" />
|
<HelixContent Include="$(RepoRoot)artifacts\packages\Release\Shipping\Microsoft.AspNetCore.App.Runtime.win-x64.$(AppRuntimeVersion).nupkg" />
|
||||||
<HelixPreCommand Include="call RunPowershell.cmd InstallAppRuntime.ps1 Microsoft.AspNetCore.App.Runtime.win-x64.$(AppRuntimeVersion).nupkg Microsoft.AspNetCore.App netcoreapp5.0 win-x64 || exit /b 1" />
|
<HelixPreCommand Include="call RunPowershell.cmd InstallAppRuntime.ps1 Microsoft.AspNetCore.App.Runtime.win-x64.$(AppRuntimeVersion).nupkg Microsoft.AspNetCore.App netcoreapp5.0 win-x64 || exit /b 1" />
|
||||||
|
|
|
||||||
|
|
@ -3,9 +3,9 @@
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<TargetFramework>$(DefaultNetCoreTargetFramework)</TargetFramework>
|
<TargetFramework>$(DefaultNetCoreTargetFramework)</TargetFramework>
|
||||||
<RootNamespace>Microsoft.AspNetCore</RootNamespace>
|
<RootNamespace>Microsoft.AspNetCore</RootNamespace>
|
||||||
|
<!-- https://github.com/dotnet/aspnetcore/issues/7939: This unit test requires the shared framework be available in Helix. -->
|
||||||
|
<BuildHelixPayload>false</BuildHelixPayload>
|
||||||
<VerifyAncmBinary Condition="'$(TargetOsName)' == 'win' AND '$(TargetArchitecture)' != 'arm'">true</VerifyAncmBinary>
|
<VerifyAncmBinary Condition="'$(TargetOsName)' == 'win' AND '$(TargetArchitecture)' != 'arm'">true</VerifyAncmBinary>
|
||||||
<TestDependsOnAspNetRuntime>true</TestDependsOnAspNetRuntime>
|
|
||||||
<TestDependsOnAspNetRef>true</TestDependsOnAspNetRef>
|
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
|
|
|
||||||
|
|
@ -23,9 +23,7 @@ namespace Microsoft.AspNetCore
|
||||||
_output = output;
|
_output = output;
|
||||||
_expectedTfm = "netcoreapp" + TestData.GetSharedFxVersion().Substring(0, 3);
|
_expectedTfm = "netcoreapp" + TestData.GetSharedFxVersion().Substring(0, 3);
|
||||||
_expectedRid = TestData.GetSharedFxRuntimeIdentifier();
|
_expectedRid = TestData.GetSharedFxRuntimeIdentifier();
|
||||||
_sharedFxRoot = string.IsNullOrEmpty(Environment.GetEnvironmentVariable("ASPNET_RUNTIME_PATH"))
|
_sharedFxRoot = Path.Combine(TestData.GetTestDataValue("SharedFrameworkLayoutRoot"), "shared", "Microsoft.AspNetCore.App", TestData.GetTestDataValue("RuntimePackageVersion"));
|
||||||
? Path.Combine(TestData.GetTestDataValue("SharedFrameworkLayoutRoot"), "shared", TestData.GetTestDataValue("RuntimePackageVersion"))
|
|
||||||
: Environment.GetEnvironmentVariable("ASPNET_RUNTIME_PATH");
|
|
||||||
}
|
}
|
||||||
|
|
||||||
[Fact]
|
[Fact]
|
||||||
|
|
|
||||||
|
|
@ -26,9 +26,7 @@ namespace Microsoft.AspNetCore
|
||||||
{
|
{
|
||||||
_output = output;
|
_output = output;
|
||||||
_expectedRid = TestData.GetSharedFxRuntimeIdentifier();
|
_expectedRid = TestData.GetSharedFxRuntimeIdentifier();
|
||||||
_targetingPackRoot = string.IsNullOrEmpty(Environment.GetEnvironmentVariable("helix"))
|
_targetingPackRoot = Path.Combine(TestData.GetTestDataValue("TargetingPackLayoutRoot"), "packs", "Microsoft.AspNetCore.App.Ref", TestData.GetTestDataValue("TargetingPackVersion"));
|
||||||
? 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"));
|
_isTargetingPackBuilding = bool.Parse(TestData.GetTestDataValue("IsTargetingPackBuilding"));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue