Resolve merge conflicts

This commit is contained in:
Will Godbe 2020-08-26 12:07:14 -07:00
commit 6205d66a0e
9 changed files with 133 additions and 91 deletions

View File

@ -621,17 +621,18 @@ stages:
timeoutInMinutes: 240
steps:
# Build the shared framework
- script: ./build.cmd -ci -nobl -all -pack -arch x64 /p:ASPNETCORE_TEST_LOG_DIR=artifacts/log
- script: ./build.cmd -ci -nobl -all -pack -arch x64 /p:ASPNETCORE_TEST_LOG_DIR=artifacts/log $(_InternalRuntimeDownloadArgs)
displayName: Build shared fx
- script: ./build.cmd -ci -nobl -noBuildRepoTasks -restore -noBuild -noBuildNative -projects src/Grpc/**/*.csproj
- script: ./build.cmd -ci -nobl -noBuildRepoTasks -restore -noBuild -noBuildNative -projects src/Grpc/**/*.csproj $(_InternalRuntimeDownloadArgs)
displayName: Restore interop projects
- script: ./build.cmd -ci -nobl -noBuildRepoTasks -noRestore -test -all -noBuildNative -projects eng\helix\helix.proj
/p:IsRequiredCheck=true /p:IsHelixJob=true /p:BuildInteropProjects=true /p:RunTemplateTests=true
/p:IsRequiredCheck=true /p:IsHelixJob=true /p:BuildInteropProjects=true /p:RunTemplateTests=true $(_InternalRuntimeDownloadArgs)
/p:ASPNETCORE_TEST_LOG_DIR=artifacts/log
displayName: Run build.cmd helix target
env:
HelixApiAccessToken: $(HelixApiAccessToken) # Needed for internal queues
SYSTEM_ACCESSTOKEN: $(System.AccessToken) # We need to set this env var to publish helix results to Azure Dev Ops
artifacts:
- name: Helix_logs
path: artifacts/log/
@ -665,7 +666,7 @@ stages:
arguments: $(Build.SourcesDirectory)/NuGet.config $Token
env:
Token: $(dn-bot-dnceng-artifact-feeds-rw)
- script: ./eng/scripts/ci-source-build.sh --ci --nobl --configuration Release /p:BuildManaged=true /p:BuildNodeJs=false
- script: ./eng/scripts/ci-source-build.sh --ci --nobl --configuration Release /p:BuildManaged=true /p:BuildNodeJs=false $(_InternalRuntimeDownloadArgs)
displayName: Run ci-source-build.sh
- task: PublishBuildArtifacts@1
displayName: Upload logs

View File

@ -1,35 +0,0 @@
<#
.SYNOPSIS
Installs dotnet sdk and runtime using https://dot.net/v1/dotnet-install.ps1
.DESCRIPTION
Installs dotnet sdk and runtime using https://dot.net/v1/dotnet-install.ps1
.PARAMETER arch
The architecture to install.
.PARAMETER sdkVersion
The sdk version to install
.PARAMETER runtimeVersion
The runtime version to install
.PARAMETER installDir
The directory to install to
#>
param(
[Parameter(Mandatory = $true)]
$arch,
[Parameter(Mandatory = $true)]
$sdkVersion,
[Parameter(Mandatory = $true)]
$runtimeVersion,
[Parameter(Mandatory = $true)]
$installDir
)
& $PSScriptRoot\Download.ps1 "https://dot.net/v1/dotnet-install.ps1" $PSScriptRoot\dotnet-install.ps1
Write-Host "Download of dotnet-install.ps1 complete..."
Write-Host "Installing SDK...& $PSScriptRoot\dotnet-install.ps1 -Architecture $arch -Version $sdkVersion -InstallDir $installDir -NoPath"
Invoke-Expression "& $PSScriptRoot\dotnet-install.ps1 -Architecture $arch -Version $sdkVersion -InstallDir $installDir -NoPath"
Write-Host "Installing Runtime...& $PSScriptRoot\dotnet-install.ps1 -Architecture $arch -Runtime dotnet -Version $runtimeVersion -InstallDir $installDir -NoPath"
Invoke-Expression "& $PSScriptRoot\dotnet-install.ps1 -Architecture $arch -Runtime dotnet -Version $runtimeVersion -InstallDir $installDir -NoPath"
Write-Host "InstallDotNet.ps1 complete..."

View File

@ -15,6 +15,8 @@ set $aspnetref=%9
REM Batch only supports up to 9 arguments using the %# syntax, need to shift to get more
shift
set $helixTimeout=%9
shift
set $feedCred=%9
set DOTNET_HOME=%HELIX_CORRELATION_PAYLOAD%\sdk
set DOTNET_ROOT=%DOTNET_HOME%\%$arch%
@ -24,10 +26,16 @@ set DOTNET_CLI_HOME=%HELIX_CORRELATION_PAYLOAD%\home
set PATH=%DOTNET_ROOT%;!PATH!;%HELIX_CORRELATION_PAYLOAD%\node\bin
echo Set path to: %PATH%
echo "Invoking InstallDotNet.ps1 %$arch% %$sdkVersion% %$runtimeVersion% %DOTNET_ROOT%"
powershell.exe -NoProfile -ExecutionPolicy unrestricted -file InstallDotNet.ps1 %$arch% %$sdkVersion% %$runtimeVersion% %DOTNET_ROOT%
powershell.exe -noLogo -NoProfile -ExecutionPolicy unrestricted -command ". eng\common\tools.ps1; InstallDotNet %DOTNET_ROOT% %$sdkVersion% %$arch% '' $true"
IF [%$feedCred%] == [] (
powershell.exe -noLogo -NoProfile -ExecutionPolicy unrestricted -command ". eng\common\tools.ps1; InstallDotNet %DOTNET_ROOT% %$runtimeVersion% %$arch% dotnet $true"
) else (
powershell.exe -noLogo -NoProfile -ExecutionPolicy unrestricted -command ". eng\common\tools.ps1; InstallDotNet %DOTNET_ROOT% %$runtimeVersion% %$arch% dotnet $true https://dotnetclimsrc.blob.core.windows.net/dotnet %$feedCred%"
)
set exit_code=0
echo "Restore: dotnet restore RunTests\RunTests.csproj --source https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet5/nuget/v3/index.json --source https://api.nuget.org/v3/index.json --ignore-failed-sources..."
dotnet restore RunTests\RunTests.csproj --source https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet5/nuget/v3/index.json --source https://api.nuget.org/v3/index.json --ignore-failed-sources

View File

@ -30,49 +30,24 @@ RED="\033[0;31m"
YELLOW="\033[0;33m"
MAGENTA="\033[0;95m"
curl -o dotnet-install.sh -sSL https://dot.net/v1/dotnet-install.sh
if [ $? -ne 0 ]; then
download_retries=3
while [ $download_retries -gt 0 ]; do
curl -o dotnet-install.sh -sSL https://dot.net/v1/dotnet-install.sh
if [ $? -ne 0 ]; then
let download_retries=download_retries-1
echo -e "${YELLOW}Failed to download dotnet-install.sh. Retries left: $download_retries.${RESET}"
else
download_retries=0
fi
done
fi
# Call "sync" between "chmod" and execution to prevent "text file busy" error in Docker (aufs)
chmod +x "dotnet-install.sh"; sync
./dotnet-install.sh --version $dotnet_sdk_version --install-dir "$DOTNET_ROOT"
if [ $? -ne 0 ]; then
sdk_retries=3
while [ $sdk_retries -gt 0 ]; do
./dotnet-install.sh --version $dotnet_sdk_version --install-dir "$DOTNET_ROOT"
if [ $? -ne 0 ]; then
let sdk_retries=sdk_retries-1
echo -e "${YELLOW}Failed to install .NET Core SDK $version. Retries left: $sdk_retries.${RESET}"
else
sdk_retries=0
fi
done
fi
./dotnet-install.sh --runtime dotnet --version $dotnet_runtime_version --install-dir "$DOTNET_ROOT"
if [ $? -ne 0 ]; then
runtime_retries=3
while [ $runtime_retries -gt 0 ]; do
./dotnet-install.sh --runtime dotnet --version $dotnet_runtime_version --install-dir "$DOTNET_ROOT"
if [ $? -ne 0 ]; then
let runtime_retries=runtime_retries-1
echo -e "${YELLOW}Failed to install .NET Core runtime $version. Retries left: $runtime_retries.${RESET}"
else
runtime_retries=0
fi
done
. eng/common/tools.sh
InstallDotNet $DOTNET_ROOT $dotnet_sdk_version "" "" true || {
exit_code=$?
Write-PipelineTelemetryError -Category 'InitializeToolset' -Message "dotnet-install.sh failed (exit code '$exit_code')." >&2
ExitWithExitCode $exit_code
}
if [[ -z "${11:-}" ]]; then
InstallDotNet $DOTNET_ROOT $dotnet_runtime_version "" dotnet true || {
exit_code=$?
Write-PipelineTelemetryError -Category 'InitializeToolset' -Message "dotnet-install.sh failed (exit code '$exit_code')." >&2
ExitWithExitCode $exit_code
}
else
InstallDotNet $DOTNET_ROOT $dotnet_runtime_version "" dotnet true https://dotnetclimsrc.blob.core.windows.net/dotnet ${11} || {
exit_code=$?
Write-PipelineTelemetryError -Category 'InitializeToolset' -Message "dotnet-install.sh failed (exit code '$exit_code')." >&2
ExitWithExitCode $exit_code
}
fi
if [ -e /proc/self/coredump_filter ]; then
@ -82,7 +57,7 @@ if [ -e /proc/self/coredump_filter ]; then
echo -n 0x3F > /proc/self/coredump_filter
fi
# dontet-install.sh seems to affect the Linux filesystem and causes test flakiness unless we sync the filesystem before running tests
# dotnet-install.sh seems to affect the Linux filesystem and causes test flakiness unless we sync the filesystem before running tests
sync
exit_code=0

View File

@ -33,10 +33,76 @@ reporoot="$(dirname "$(dirname "$scriptroot")")"
# mv "$reporoot/global.bak.json" "$reporoot/global.json"
#}" EXIT
dotnet_runtime_source_feed=''
dotnet_runtime_source_feed_key=''
other_args=()
#
# Functions
#
__usage() {
echo "Usage: $(basename "${BASH_SOURCE[0]}") [options] [[--] <Arguments>...]
Arguments:
<Arguments>... Arguments passed to the command. Variable number of arguments allowed.
--dotnet-runtime-source-feed Additional feed that can be used when downloading .NET runtimes
--dotnet-runtime-source-feed-key Key for feed that can be used when downloading .NET runtimes
Description:
This script is meant for testing source build by imitating some of the input parameters and conditions.
"
if [[ "${1:-}" != '--no-exit' ]]; then
exit 2
fi
}
__error() {
echo -e "${RED}error: $*${RESET}" 1>&2
}
#
# main
#
while [[ $# -gt 0 ]]; do
opt="$(echo "${1/#--/-}" | awk '{print tolower($0)}')"
case "$opt" in
-\?|-h|-help)
__usage --no-exit
exit 0
;;
-dotnet-runtime-source-feed|-dotnetruntimesourcefeed)
shift
[ -z "${1:-}" ] && __error "Missing value for parameter --dotnet-runtime-source-feed" && __usage
dotnet_runtime_source_feed="${1:-}"
;;
-dotnet-runtime-source-feed-key|-dotnetruntimesourcefeedkey)
shift
[ -z "${1:-}" ] && __error "Missing value for parameter --dotnet-runtime-source-feed-key" && __usage
dotnet_runtime_source_feed_key="${1:-}"
;;
*)
other_args[${#other_args[*]}]="$1"
;;
esac
shift
done
# Set up additional runtime args
runtime_feed_args=()
if [ ! -z "$dotnet_runtime_source_feed$dotnet_runtime_source_feed_key" ]; then
runtimeFeedArg="/p:DotNetRuntimeSourceFeed=$dotnet_runtime_source_feed"
runtimeFeedKeyArg="/p:DotNetRuntimeSourceFeedKey=$dotnet_runtime_source_feed_key"
runtime_feed_args[${#runtime_feed_args[*]}]=$runtimeFeedArg
runtime_feed_args[${#runtime_feed_args[*]}]=$runtimeFeedKeyArg
fi
# Build repo tasks
"$reporoot/eng/common/build.sh" --restore --build --ci --configuration Release /p:ProjectToBuild=$reporoot/eng/tools/RepoTasks/RepoTasks.csproj
"$reporoot/eng/common/build.sh" --restore --build --ci --configuration Release /p:ProjectToBuild=$reporoot/eng/tools/RepoTasks/RepoTasks.csproj ${runtime_feed_args[@]+"${runtime_feed_args[@]}"}
export DotNetBuildFromSource='true'
# Build projects
"$reporoot/eng/common/build.sh" --restore --build --pack "$@"
"$reporoot/eng/common/build.sh" --restore --build --pack ${other_args[@]+"${other_args[@]}"} ${runtime_feed_args[@]+"${runtime_feed_args[@]}"}

View File

@ -28,6 +28,15 @@
<ItemGroup Condition="$(BuildHelixPayload)">
<Content Include="@(HelixContent)" />
<Content Include="$(RepoRoot)eng\scripts\Download.ps1" />
<Content Include="$(RepoRoot)NuGet.config" />
<Content Include="$(RepoRoot)global.json" />
<ContentWithTargetPath Include="
$(RepoRoot)eng\common\pipeline-logging-functions.*;
$(RepoRoot)eng\common\tools.*">
<TargetPath>eng\common\%(Filename)%(Extension)</TargetPath>
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
<CopyToPublishDirectory>PreserveNewest</CopyToPublishDirectory>
</ContentWithTargetPath>
</ItemGroup>
<!--
@ -117,8 +126,8 @@ Usage: dotnet msbuild /t:Helix src/MyTestProject.csproj
<TestAssembly>$(TargetFileName)</TestAssembly>
<PreCommands>@(HelixPreCommand)</PreCommands>
<PostCommands>@(HelixPostCommand)</PostCommands>
<Command Condition="$(IsWindowsHelixQueue)">call runtests.cmd $(TargetFileName) $(NETCoreSdkVersion) $(MicrosoftNETCoreAppRuntimeVersion) $(_HelixFriendlyNameTargetQueue) $(TargetArchitecture) $(RunQuarantinedTests) $(DotnetEfPackageVersion) Microsoft.AspNetCore.App.Runtime.win-x64.$(AppRuntimeVersion).nupkg Microsoft.AspNetCore.App.Ref.$(AppRuntimeVersion).nupkg $(HelixTimeout)</Command>
<Command Condition="!$(IsWindowsHelixQueue)">./runtests.sh $(TargetFileName) $(NETCoreSdkVersion) $(MicrosoftNETCoreAppRuntimeVersion) $(_HelixFriendlyNameTargetQueue) $(TargetArchitecture) $(RunQuarantinedTests) $(DotnetEfPackageVersion) Microsoft.AspNetCore.App.Runtime.win-x64.$(AppRuntimeVersion).nupkg Microsoft.AspNetCore.App.Ref.$(AppRuntimeVersion).nupkg $(HelixTimeout)</Command>
<Command Condition="$(IsWindowsHelixQueue)">call runtests.cmd $(TargetFileName) $(NETCoreSdkVersion) $(MicrosoftNETCoreAppRuntimeVersion) $(_HelixFriendlyNameTargetQueue) $(TargetArchitecture) $(RunQuarantinedTests) $(DotnetEfPackageVersion) Microsoft.AspNetCore.App.Runtime.win-x64.$(AppRuntimeVersion).nupkg Microsoft.AspNetCore.App.Ref.$(AppRuntimeVersion).nupkg $(HelixTimeout) $(DotNetRuntimeSourceFeedKey)</Command>
<Command Condition="!$(IsWindowsHelixQueue)">./runtests.sh $(TargetFileName) $(NETCoreSdkVersion) $(MicrosoftNETCoreAppRuntimeVersion) $(_HelixFriendlyNameTargetQueue) $(TargetArchitecture) $(RunQuarantinedTests) $(DotnetEfPackageVersion) Microsoft.AspNetCore.App.Runtime.win-x64.$(AppRuntimeVersion).nupkg Microsoft.AspNetCore.App.Ref.$(AppRuntimeVersion).nupkg $(HelixTimeout) $(DotNetRuntimeSourceFeedKey)</Command>
<Command Condition="$(HelixCommand) != ''">$(HelixCommand)</Command>
<Timeout>$(HelixTimeout)</Timeout>
</HelixWorkItem>

View File

@ -256,6 +256,9 @@ function createEmscriptenModuleInstance(resourceLoader: WebAssemblyResourceLoade
`_framework/${icuDataResourceName}`,
resourceLoader.bootConfig.resources.runtime[icuDataResourceName],
'globalization');
} else {
// Use invariant culture if the app does not carry icu data.
MONO.mono_wasm_setenv("DOTNET_SYSTEM_GLOBALIZATION_INVARIANT", "1");
}
// Override the mechanism for fetching the main wasm file so we can connect it to our cache
@ -285,9 +288,12 @@ function createEmscriptenModuleInstance(resourceLoader: WebAssemblyResourceLoade
if (icuDataResource) {
loadICUData(icuDataResource);
<<<<<<< HEAD
} else {
// Use invariant culture if the app does not carry icu data.
MONO.mono_wasm_setenv("DOTNET_SYSTEM_GLOBALIZATION_INVARIANT", "1");
=======
>>>>>>> internal/internal/release/5.0-preview8
}
// Fetch the assemblies and PDBs in the background, telling Mono to wait until they are loaded
@ -382,6 +388,15 @@ function createEmscriptenModuleInstance(resourceLoader: WebAssemblyResourceLoade
// Turn off full-gc to prevent browser freezing.
const mono_wasm_enable_on_demand_gc = cwrap('mono_wasm_enable_on_demand_gc', null, ['number']);
mono_wasm_enable_on_demand_gc(0);
<<<<<<< HEAD
=======
let timeZone = "UTC";
try {
timeZone = Intl.DateTimeFormat().resolvedOptions().timeZone;
} catch { }
MONO.mono_wasm_setenv("TZ", timeZone);
>>>>>>> internal/internal/release/5.0-preview8
const load_runtime = cwrap('mono_wasm_load_runtime', null, ['string', 'number']);
// -1 enables debugging with logging disabled. 0 disables debugging entirely.
load_runtime(appBinDirName, hasDebuggingEnabled() ? -1 : 0);

View File

@ -3,6 +3,9 @@
<PropertyGroup>
<ContainsFunctionalTestAssets>true</ContainsFunctionalTestAssets>
<TargetFramework>$(DefaultNetCoreTargetFramework)</TargetFramework>
<!-- https://github.com/dotnet/aspnetcore/issues/24182 -->
<BuildHelixPayload>false</BuildHelixPayload>
</PropertyGroup>
<ItemGroup>

View File

@ -95,8 +95,8 @@ namespace InteropTestsClient
var services = new ServiceCollection();
services.AddLogging(configure =>
{
configure.SetMinimumLevel(LogLevel.Trace);
configure.AddConsole(loggerOptions =>
configure.SetMinimumLevel(Microsoft.Extensions.Logging.LogLevel.Trace);
configure.AddSimpleConsole(loggerOptions =>
{
#pragma warning disable CS0618 // Type or member is obsolete
loggerOptions.IncludeScopes = true;