From 76e0313735289f1484d8a8c4263f5897bc6cd566 Mon Sep 17 00:00:00 2001 From: Ankit Jain Date: Fri, 26 May 2023 19:50:09 -0400 Subject: [PATCH] CI: Fix running the workaround for `NuGet-Migrations` issue (#85692) * CI: Fix running the workaround for `NuGet-Migrations` issue The workaround adds: `(CONSOLE_TEMP_DIR="%24(mktemp -d)" %3B "$DOTNET_ROOT/dotnet" new console -o "$CONSOLE_TEMP_DIR" %3B rm -rf "$CONSOLE_TEMP_DIR") || true` which uses `$DOTNET_ROOT/dotnet`. But this is set for `HelixPreCommand` which runs *before* `DOTNET_ROOT` is set. Instead, use `HelixCommandPrefixItem`. * rename HelixCommandPrefixItem to HelixCommandPrefixEnvVarItem * Fix in helixpublishwitharcade.proj also * Add the workaround for legacy payloads also, which includes wasm runtime tests * fix typo --- src/libraries/sendtohelixhelp.proj | 42 ++++++++++++++++------------ src/tests/Common/helixpublishwitharcade.proj | 14 ++++++---- 2 files changed, 33 insertions(+), 23 deletions(-) diff --git a/src/libraries/sendtohelixhelp.proj b/src/libraries/sendtohelixhelp.proj index 96f56bf..f664245 100644 --- a/src/libraries/sendtohelixhelp.proj +++ b/src/libraries/sendtohelixhelp.proj @@ -131,22 +131,22 @@ - - + + - - + + - - + + - - + + - - - + + + @@ -174,10 +174,6 @@ - - - - @@ -190,13 +186,23 @@ $(HelixPreCommands);@(HelixPreCommand) $(HelixPostCommands);@(HelixPostCommand) - $(HelixCommandPrefix) @(HelixCommandPrefixItem -> 'set "%(Identity)"', ' & ') - $(HelixCommandPrefix) @(HelixCommandPrefixItem, ' ') + $(HelixCommandPrefix) @(HelixCommandPrefixEnvVarItem -> 'set "%(Identity)"', ' & ') + $(HelixCommandPrefix) export @(HelixCommandPrefixEnvVarItem, ' ') true + + + <_WorkaroundForNuGetMigrations>((CONSOLE_TEMP_DIR="%24(mktemp -d)" %3B "$DOTNET_ROOT/dotnet" new console -o "$CONSOLE_TEMP_DIR" %3B rm -rf "$CONSOLE_TEMP_DIR") || true) + + $(HelixCommandPrefix) && + $(HelixCommandPrefix) & + + $(HelixCommandPrefix) $(_WorkaroundForNuGetMigrations) + + - $(HelixCommandPrefix) + $(HelixCommandPrefix) && $(HelixCommandPrefix) & $(HelixCommand) dotnet dev-certs https && diff --git a/src/tests/Common/helixpublishwitharcade.proj b/src/tests/Common/helixpublishwitharcade.proj index f824579..13f4894 100644 --- a/src/tests/Common/helixpublishwitharcade.proj +++ b/src/tests/Common/helixpublishwitharcade.proj @@ -431,6 +431,8 @@ + + @@ -539,6 +541,7 @@ + @@ -761,9 +764,10 @@ - - - + + <_WorkaroundForNuGetMigrations>(CONSOLE_TEMP_DIR="%24(mktemp -d)" %3B "$DOTNET_ROOT/dotnet" new console -o "$CONSOLE_TEMP_DIR" %3B rm -rf "$CONSOLE_TEMP_DIR") || true + <_WorkaroundForNuGetMigrationsForPrepending>$(_WorkaroundForNuGetMigrations) && + @(HelixPreCommand) @@ -902,7 +906,7 @@ %(PayloadDirectory) - dotnet $(XUnitRunnerDll) %(XUnitWrapperDlls) $(XUnitRunnerArgs) + $(_WorkaroundForNuGetMigrationsForPrepending) dotnet $(XUnitRunnerDll) %(XUnitWrapperDlls) $(XUnitRunnerArgs) dotnet $(XUnitRunnerDll) %(XUnitWrapperDlls) $(XUnitRunnerArgs) -trait TestGroup=%(TestGroup) $([System.TimeSpan]::FromMinutes($(TimeoutPerTestCollectionInMinutes))) coreclr_tests.run.$(TargetOS).$(TargetArchitecture).$(Configuration).mch;coreclr_tests.run.$(TargetOS).$(TargetArchitecture).$(Configuration).log @@ -936,7 +940,7 @@ $(LegacyPayloadsRootDirectory)paltests.tar.gz - ./runpaltestshelix.sh + $(_WorkaroundForNuGetMigrationsForPrepending) ./runpaltestshelix.sh $([System.TimeSpan]::FromMinutes($(TimeoutPerTestCollectionInMinutes))) -- 2.7.4