Merge pull request #13673 from dotnet-maestro-bot/merge/release/6.0.2xx-to-release/6.0.3xx
[automated] Merge branch 'release/6.0.2xx' => 'release/6.0.3xx'
This commit is contained in:
commit
20e198c744
17 changed files with 256 additions and 178 deletions
|
@ -132,7 +132,7 @@ jobs:
|
|||
customBuildArgs="$customBuildArgs --poison"
|
||||
fi
|
||||
|
||||
docker run --rm -v $(tarballDir):/tarball -w /tarball ${networkArgs} $(_Container) ./build.sh ${customBuildArgs} $(additionalBuildArgs) -- /p:CleanWhileBuilding=true
|
||||
docker run --rm -v $(tarballDir):/tarball -w /tarball ${networkArgs} $(_Container) ./build.sh --clean-while-building ${customBuildArgs} $(additionalBuildArgs)
|
||||
displayName: Build Tarball
|
||||
|
||||
- script: |
|
||||
|
@ -146,7 +146,7 @@ jobs:
|
|||
dockerEnvArgs="-e SMOKE_TESTS_EXCLUDE_OMNISHARP=$(_ExcludeOmniSharpTests) -e SMOKE_TESTS_WARN_SDK_CONTENT_DIFFS=true"
|
||||
poisonArg=''
|
||||
|
||||
if [[ '${{ parameters.excludeSdkContentTests}}' != 'true' && '${{ parameters.installerBuildResourceId }}' != 'current' ]]; then
|
||||
if [[ '${{ parameters.excludeSdkContentTests}}' != 'true' ]]; then
|
||||
dockerVolumeArgs+=" -v $(PIPELINE.WORKSPACE)/${{ parameters.installerBuildResourceId }}/BlobArtifacts/:/BlobArtifacts"
|
||||
msftSdkTarballName=$(find "$(PIPELINE.WORKSPACE)/${{ parameters.installerBuildResourceId }}/BlobArtifacts/" -name "dotnet-sdk-*-linux-${{ parameters.architecture }}.tar.gz" -exec basename {} \;)
|
||||
dockerEnvArgs+=" -e SMOKE_TESTS_MSFT_SDK_TARBALL_PATH=/BlobArtifacts/$msftSdkTarballName"
|
||||
|
|
|
@ -34,6 +34,8 @@ jobs:
|
|||
architecture: x64
|
||||
condition: ${{ parameters.condition }}
|
||||
dependsOn: ${{ parameters.dependsOn }}
|
||||
${{ if or(eq(variables['System.TeamProject'], 'public'), in(variables['Build.Reason'], 'PullRequest')) }}:
|
||||
excludeSdkContentTests: true
|
||||
installerBuildResourceId: ${{ parameters.installerBuildResourceId }}
|
||||
matrix:
|
||||
CentOS7-Online:
|
||||
|
@ -86,6 +88,8 @@ jobs:
|
|||
architecture: arm64
|
||||
condition: ${{ parameters.condition }}
|
||||
dependsOn: ${{ parameters.dependsOn }}
|
||||
${{ if in(variables['Build.Reason'], 'PullRequest') }}:
|
||||
excludeSdkContentTests: true
|
||||
installerBuildResourceId: ${{ parameters.installerBuildResourceId }}
|
||||
matrix:
|
||||
${{ if ne(variables['Build.Reason'], 'PullRequest') }}:
|
||||
|
|
|
@ -5,11 +5,12 @@ IFS=$'\n\t'
|
|||
usage() {
|
||||
echo "usage: $0 [options]"
|
||||
echo "options:"
|
||||
echo " --clean-while-building cleans each repo after building (reduces disk space usage)"
|
||||
echo " --online build using online sources"
|
||||
echo " --with-packages <dir> use the specified directory of previously-built packages"
|
||||
echo " --with-sdk <dir> use the SDK in the specified directory for bootstrapping"
|
||||
echo " --poison build with poisoning checks"
|
||||
echo " --run-smoke-test don't build; run smoke tests"
|
||||
echo " --with-packages <dir> use the specified directory of previously-built packages"
|
||||
echo " --with-sdk <dir> use the SDK in the specified directory for bootstrapping"
|
||||
echo "use -- to send the remaining arguments to MSBuild"
|
||||
echo ""
|
||||
}
|
||||
|
@ -29,9 +30,8 @@ while :; do
|
|||
|
||||
lowerI="$(echo $1 | awk '{print tolower($0)}')"
|
||||
case $lowerI in
|
||||
--run-smoke-test)
|
||||
alternateTarget=true
|
||||
MSBUILD_ARGUMENTS+=( "/t:RunSmokeTest" )
|
||||
--clean-while-building)
|
||||
MSBUILD_ARGUMENTS+=( "/p:CleanWhileBuilding=true")
|
||||
;;
|
||||
--online)
|
||||
MSBUILD_ARGUMENTS+=( "/p:BuildWithOnlineSources=true")
|
||||
|
@ -39,6 +39,10 @@ while :; do
|
|||
--poison)
|
||||
MSBUILD_ARGUMENTS+=( "/p:EnablePoison=true")
|
||||
;;
|
||||
--run-smoke-test)
|
||||
alternateTarget=true
|
||||
MSBUILD_ARGUMENTS+=( "/t:RunSmokeTest" )
|
||||
;;
|
||||
--with-packages)
|
||||
CUSTOM_PREVIOUSLY_BUILT_PACKAGES_DIR="$(cd -P "$2" && pwd)"
|
||||
if [ ! -d "$CUSTOM_PREVIOUSLY_BUILT_PACKAGES_DIR" ]; then
|
||||
|
|
|
@ -561,20 +561,20 @@
|
|||
BeforeTargets="Build"
|
||||
Condition=" '$(CleanWhileBuilding)' == 'true' ">
|
||||
<Message Text="DirSize Before Building $(RepositoryName)" Importance="High" />
|
||||
<Exec Command="df --block-size=1M $(ProjectDir)" />
|
||||
<Exec Command="df -h $(ProjectDir)" />
|
||||
</Target>
|
||||
<Target Name="DisplayDirSizeAfterBuild"
|
||||
AfterTargets="Build"
|
||||
BeforeTargets="CleanupRepo"
|
||||
Condition=" '$(CleanWhileBuilding)' == 'true' ">
|
||||
<Message Text="DirSize After Building $(RepositoryName)" Importance="High" />
|
||||
<Exec Command="df --block-size=1M $(ProjectDir)" />
|
||||
<Exec Command="df -h $(ProjectDir)" />
|
||||
</Target>
|
||||
<Target Name="DisplayDirSizeAfterClean"
|
||||
AfterTargets="CleanupRepo"
|
||||
Condition=" '$(CleanWhileBuilding)' == 'true' ">
|
||||
<Message Text="DirSize After CleanupRepo $(RepositoryName)" Importance="High" />
|
||||
<Exec Command="df --block-size=1M $(ProjectDir)" />
|
||||
<Exec Command="df -h $(ProjectDir)" />
|
||||
</Target>
|
||||
|
||||
<Target Name="CleanupRepo"
|
||||
|
|
|
@ -85,6 +85,13 @@ namespace Microsoft.DotNet.SourceBuild.SmokeTests
|
|||
|
||||
private static string GetBaselineFilePath(string baselineFileName) => Path.Combine(GetAssetsDirectory(), "baselines", baselineFileName);
|
||||
|
||||
public static string RemoveNetTfmPaths(string source)
|
||||
{
|
||||
string pathSeparator = Regex.Escape(Path.DirectorySeparatorChar.ToString());
|
||||
Regex netTfmRegex = new($"{pathSeparator}net[1-9]+\\.[0-9]+{pathSeparator}");
|
||||
return netTfmRegex.Replace(source, $"{Path.DirectorySeparatorChar}netx.y{Path.DirectorySeparatorChar}");
|
||||
}
|
||||
|
||||
public static string RemoveRids(string diff, bool isPortable = false) =>
|
||||
isPortable ? diff.Replace(Config.PortableRid, "portable-rid") : diff.Replace(Config.TargetRid, "banana-rid");
|
||||
|
||||
|
@ -98,10 +105,7 @@ namespace Microsoft.DotNet.SourceBuild.SmokeTests
|
|||
+ $"?(?:\\+([0-9a-zA-Z-]+(?:\\.[0-9a-zA-Z-]+)*))?");
|
||||
string result = semanticVersionRegex.Replace(source, $"x.y.z");
|
||||
|
||||
// Remove netx.y path segments
|
||||
string pathSeparator = Regex.Escape(Path.DirectorySeparatorChar.ToString());
|
||||
Regex netTfmRegex = new($"{pathSeparator}net[1-9]+\\.[0-9]+{pathSeparator}");
|
||||
return netTfmRegex.Replace(result, $"{Path.DirectorySeparatorChar}netx.y{Path.DirectorySeparatorChar}");
|
||||
return RemoveNetTfmPaths(result);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -30,6 +30,7 @@ internal static class Config
|
|||
public static string? SdkTarballPath { get; } = Environment.GetEnvironmentVariable(SdkTarballPathEnv);
|
||||
public static string TargetRid { get; } = Environment.GetEnvironmentVariable(TargetRidEnv) ??
|
||||
throw new InvalidOperationException($"'{Config.TargetRidEnv}' must be specified");
|
||||
public static string TargetArchitecture { get; } = TargetRid.Split('-')[1];
|
||||
public static bool WarnOnPoisonDiffs { get; } =
|
||||
bool.TryParse(Environment.GetEnvironmentVariable(WarnPoisonDiffsEnv), out bool excludeOnlineTests) && excludeOnlineTests;
|
||||
public static bool WarnOnSdkContentDiffs { get; } =
|
||||
|
|
|
@ -5,7 +5,6 @@
|
|||
using System;
|
||||
using System.Diagnostics;
|
||||
using System.IO;
|
||||
using Xunit;
|
||||
using Xunit.Abstractions;
|
||||
|
||||
namespace Microsoft.DotNet.SourceBuild.SmokeTests;
|
||||
|
@ -81,15 +80,6 @@ internal class DotNetHelper
|
|||
|
||||
public void ExecuteCmd(string args, string? workingDirectory = null, Action<Process>? additionalProcessConfigCallback = null, int expectedExitCode = 0, int millisecondTimeout = -1)
|
||||
{
|
||||
Action<Process, string?> configureProcess = (Process process, string? workingDirectory) => {
|
||||
ConfigureProcess(process, workingDirectory);
|
||||
|
||||
if (additionalProcessConfigCallback != null)
|
||||
{
|
||||
additionalProcessConfigCallback(process);
|
||||
}
|
||||
};
|
||||
|
||||
(Process Process, string StdOut, string StdErr) executeResult = ExecuteHelper.ExecuteProcess(
|
||||
DotNetPath,
|
||||
args,
|
||||
|
@ -98,6 +88,13 @@ internal class DotNetHelper
|
|||
millisecondTimeout: millisecondTimeout);
|
||||
|
||||
ExecuteHelper.ValidateExitCode(executeResult, expectedExitCode);
|
||||
|
||||
void configureProcess(Process process, string? workingDirectory)
|
||||
{
|
||||
ConfigureProcess(process, workingDirectory);
|
||||
|
||||
additionalProcessConfigCallback?.Invoke(process);
|
||||
}
|
||||
}
|
||||
|
||||
public static void ConfigureProcess(Process process, string? workingDirectory, bool setPath = false)
|
||||
|
|
|
@ -44,10 +44,24 @@ internal static class ExecuteHelper
|
|||
configure?.Invoke(process);
|
||||
|
||||
StringBuilder stdOutput = new();
|
||||
process.OutputDataReceived += new DataReceivedEventHandler((sender, e) => stdOutput.AppendLine(e.Data));
|
||||
process.OutputDataReceived += new DataReceivedEventHandler(
|
||||
(sender, e) =>
|
||||
{
|
||||
lock (stdOutput)
|
||||
{
|
||||
stdOutput.AppendLine(e.Data);
|
||||
}
|
||||
});
|
||||
|
||||
StringBuilder stdError = new();
|
||||
process.ErrorDataReceived += new DataReceivedEventHandler((sender, e) => stdError.AppendLine(e.Data));
|
||||
process.ErrorDataReceived += new DataReceivedEventHandler(
|
||||
(sender, e) =>
|
||||
{
|
||||
lock (stdError)
|
||||
{
|
||||
stdError.AppendLine(e.Data);
|
||||
}
|
||||
});
|
||||
|
||||
process.Start();
|
||||
process.BeginOutputReadLine();
|
||||
|
|
|
@ -6,15 +6,23 @@ using System;
|
|||
using System.IO;
|
||||
using System.Net.Http;
|
||||
using System.Threading.Tasks;
|
||||
using Xunit.Abstractions;
|
||||
|
||||
namespace Microsoft.DotNet.SourceBuild.SmokeTests;
|
||||
|
||||
internal static class HttpClientExtensions
|
||||
{
|
||||
public static async Task DownloadFileAsync(this HttpClient client, Uri uri, string path)
|
||||
public static async Task DownloadFileAsync(this HttpClient client, Uri uri, string path, ITestOutputHelper outputHelper)
|
||||
{
|
||||
using Stream stream = await client.GetStreamAsync(uri);
|
||||
using FileStream fileStream = new(path, FileMode.OpenOrCreate);
|
||||
await stream.CopyToAsync(fileStream);
|
||||
outputHelper.WriteLine($"Downloading {uri}");
|
||||
|
||||
await Utilities.RetryAsync(
|
||||
async () =>
|
||||
{
|
||||
using Stream stream = await client.GetStreamAsync(uri);
|
||||
using FileStream fileStream = new(path, FileMode.OpenOrCreate);
|
||||
await stream.CopyToAsync(fileStream);
|
||||
},
|
||||
outputHelper);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -60,9 +60,9 @@ public class OmniSharpTests : SmokeTests
|
|||
if (!Directory.Exists(OmniSharpDirectory))
|
||||
{
|
||||
using HttpClient client = new();
|
||||
string omniSharpTarballFile = "omnisharp-linux-x64.tar.gz";
|
||||
string omniSharpTarballFile = $"omnisharp-linux-{Config.TargetArchitecture}.tar.gz";
|
||||
Uri omniSharpTarballUrl = new($"https://github.com/OmniSharp/omnisharp-roslyn/releases/latest/download/{omniSharpTarballFile}");
|
||||
await client.DownloadFileAsync(omniSharpTarballUrl, omniSharpTarballFile);
|
||||
await client.DownloadFileAsync(omniSharpTarballUrl, omniSharpTarballFile, OutputHelper);
|
||||
|
||||
Directory.CreateDirectory(OmniSharpDirectory);
|
||||
ExecuteHelper.ExecuteProcessValidateExitCode("tar", $"xzf {omniSharpTarballFile} -C {OmniSharpDirectory}", OutputHelper);
|
||||
|
|
|
@ -5,35 +5,34 @@
|
|||
using System;
|
||||
using Xunit;
|
||||
|
||||
namespace Microsoft.DotNet.SourceBuild.SmokeTests
|
||||
namespace Microsoft.DotNet.SourceBuild.SmokeTests;
|
||||
|
||||
/// <summary>
|
||||
/// A Fact that will be skipped based on the specified environment variable's value.
|
||||
/// </summary>
|
||||
internal class SkippableFactAttribute : FactAttribute
|
||||
{
|
||||
/// <summary>
|
||||
/// A Fact that will be skipped based on the specified environment variable's value.
|
||||
/// </summary>
|
||||
internal class SkippableFactAttribute : FactAttribute
|
||||
public SkippableFactAttribute(string envName, bool skipOnNullOrWhiteSpace = false, bool skipOnTrue = false) =>
|
||||
CheckEnvs(skipOnNullOrWhiteSpace, skipOnTrue, (skip) => Skip = skip, envName);
|
||||
|
||||
public SkippableFactAttribute(string[] envNames, bool skipOnNullOrWhiteSpace = false, bool skipOnTrue = false) =>
|
||||
CheckEnvs(skipOnNullOrWhiteSpace, skipOnTrue, (skip) => Skip = skip, envNames);
|
||||
|
||||
public static void CheckEnvs(bool skipOnNullOrWhiteSpace, bool skipOnTrue, Action<string> setSkip, params string[] envNames)
|
||||
{
|
||||
public SkippableFactAttribute(string envName, bool skipOnNullOrWhiteSpace = false, bool skipOnTrue = false) =>
|
||||
CheckEnvs(skipOnNullOrWhiteSpace, skipOnTrue, (skip) => Skip = skip, envName);
|
||||
|
||||
public SkippableFactAttribute(string[] envNames, bool skipOnNullOrWhiteSpace = false, bool skipOnTrue = false) =>
|
||||
CheckEnvs(skipOnNullOrWhiteSpace, skipOnTrue, (skip) => Skip = skip, envNames);
|
||||
|
||||
public static void CheckEnvs(bool skipOnNullOrWhiteSpace, bool skipOnTrue, Action<string> setSkip, params string[] envNames)
|
||||
foreach (string envName in envNames)
|
||||
{
|
||||
foreach (string envName in envNames)
|
||||
{
|
||||
string? envValue = Environment.GetEnvironmentVariable(envName);
|
||||
string? envValue = Environment.GetEnvironmentVariable(envName);
|
||||
|
||||
if (skipOnNullOrWhiteSpace && string.IsNullOrWhiteSpace(envValue))
|
||||
{
|
||||
setSkip($"Skipping because `{envName}` is null or whitespace");
|
||||
break;
|
||||
}
|
||||
else if (skipOnTrue && bool.TryParse(envValue, out bool boolValue) && boolValue)
|
||||
{
|
||||
setSkip($"Skipping because `{envName}` is set to True");
|
||||
break;
|
||||
}
|
||||
if (skipOnNullOrWhiteSpace && string.IsNullOrWhiteSpace(envValue))
|
||||
{
|
||||
setSkip($"Skipping because `{envName}` is null or whitespace");
|
||||
break;
|
||||
}
|
||||
else if (skipOnTrue && bool.TryParse(envValue, out bool boolValue) && boolValue)
|
||||
{
|
||||
setSkip($"Skipping because `{envName}` is set to True");
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -4,17 +4,16 @@
|
|||
|
||||
using Xunit;
|
||||
|
||||
namespace Microsoft.DotNet.SourceBuild.SmokeTests
|
||||
{
|
||||
/// <summary>
|
||||
/// A Theory that will be skipped based on the specified environment variable's value.
|
||||
/// </summary>
|
||||
internal class SkippableTheoryAttribute : TheoryAttribute
|
||||
{
|
||||
public SkippableTheoryAttribute(string envName, bool skipOnNullOrWhiteSpace = false, bool skipOnTrue = false) =>
|
||||
SkippableFactAttribute.CheckEnvs(skipOnNullOrWhiteSpace, skipOnTrue, (skip) => Skip = skip, envName);
|
||||
namespace Microsoft.DotNet.SourceBuild.SmokeTests;
|
||||
|
||||
public SkippableTheoryAttribute(string[] envNames, bool skipOnNullOrWhiteSpace = false, bool skipOnTrue = false) =>
|
||||
SkippableFactAttribute.CheckEnvs(skipOnNullOrWhiteSpace, skipOnTrue, (skip) => Skip = skip, envNames);
|
||||
}
|
||||
/// <summary>
|
||||
/// A Theory that will be skipped based on the specified environment variable's value.
|
||||
/// </summary>
|
||||
internal class SkippableTheoryAttribute : TheoryAttribute
|
||||
{
|
||||
public SkippableTheoryAttribute(string envName, bool skipOnNullOrWhiteSpace = false, bool skipOnTrue = false) =>
|
||||
SkippableFactAttribute.CheckEnvs(skipOnNullOrWhiteSpace, skipOnTrue, (skip) => Skip = skip, envName);
|
||||
|
||||
public SkippableTheoryAttribute(string[] envNames, bool skipOnNullOrWhiteSpace = false, bool skipOnTrue = false) =>
|
||||
SkippableFactAttribute.CheckEnvs(skipOnNullOrWhiteSpace, skipOnTrue, (skip) => Skip = skip, envNames);
|
||||
}
|
||||
|
|
|
@ -2,66 +2,63 @@
|
|||
// The .NET Foundation licenses this file to you under the MIT license.
|
||||
// See the LICENSE file in the project root for more information.
|
||||
|
||||
using System;
|
||||
namespace Microsoft.DotNet.SourceBuild.SmokeTests;
|
||||
|
||||
namespace Microsoft.DotNet.SourceBuild.SmokeTests
|
||||
public class TestScenario
|
||||
{
|
||||
public class TestScenario
|
||||
public DotNetActions Commands { get; }
|
||||
public DotNetLanguage Language { get; }
|
||||
public bool NoHttps { get; set; } = Config.TargetRid.Contains("osx");
|
||||
public string ScenarioName { get; }
|
||||
public DotNetTemplate Template { get; }
|
||||
|
||||
public TestScenario(string scenarioName, DotNetLanguage language, DotNetTemplate template, DotNetActions commands = DotNetActions.None)
|
||||
{
|
||||
public DotNetActions Commands { get; }
|
||||
public DotNetLanguage Language { get; }
|
||||
public bool NoHttps { get; set; } = Config.TargetRid.Contains("osx");
|
||||
public string ScenarioName { get; }
|
||||
public DotNetTemplate Template { get; }
|
||||
ScenarioName = scenarioName;
|
||||
Template = template;
|
||||
Language = language;
|
||||
Commands = commands;
|
||||
}
|
||||
|
||||
public TestScenario(string scenarioName, DotNetLanguage language, DotNetTemplate template, DotNetActions commands = DotNetActions.None)
|
||||
internal void Execute(DotNetHelper dotNetHelper)
|
||||
{
|
||||
// Don't use the cli language name in the project name because it may contain '#': https://github.com/dotnet/roslyn/issues/51692
|
||||
string projectName = $"{ScenarioName}_{Template}_{Language}";
|
||||
string customNewArgs = Template.IsAspNetCore() && NoHttps ? "--no-https" : string.Empty;
|
||||
dotNetHelper.ExecuteNew(Template.GetName(), projectName, Language.ToCliName(), customArgs: customNewArgs);
|
||||
|
||||
if (Commands.HasFlag(DotNetActions.Build))
|
||||
{
|
||||
ScenarioName = scenarioName;
|
||||
Template = template;
|
||||
Language = language;
|
||||
Commands = commands;
|
||||
dotNetHelper.ExecuteBuild(projectName);
|
||||
}
|
||||
|
||||
internal void Execute(DotNetHelper dotNetHelper)
|
||||
if (Commands.HasFlag(DotNetActions.Run))
|
||||
{
|
||||
// Don't use the cli language name in the project name because it may contain '#': https://github.com/dotnet/roslyn/issues/51692
|
||||
string projectName = $"{ScenarioName}_{Template}_{Language}";
|
||||
string customNewArgs = Template.IsAspNetCore() && NoHttps ? "--no-https" : string.Empty;
|
||||
dotNetHelper.ExecuteNew(Template.GetName(), projectName, Language.ToCliName(), customArgs: customNewArgs);
|
||||
|
||||
if (Commands.HasFlag(DotNetActions.Build))
|
||||
if (Template.IsAspNetCore())
|
||||
{
|
||||
dotNetHelper.ExecuteBuild(projectName);
|
||||
dotNetHelper.ExecuteRunWeb(projectName);
|
||||
}
|
||||
if (Commands.HasFlag(DotNetActions.Run))
|
||||
else
|
||||
{
|
||||
if (Template.IsAspNetCore())
|
||||
{
|
||||
dotNetHelper.ExecuteRunWeb(projectName);
|
||||
}
|
||||
else
|
||||
{
|
||||
dotNetHelper.ExecuteRun(projectName);
|
||||
}
|
||||
}
|
||||
if (Commands.HasFlag(DotNetActions.Publish))
|
||||
{
|
||||
dotNetHelper.ExecutePublish(projectName);
|
||||
}
|
||||
if (Commands.HasFlag(DotNetActions.PublishComplex))
|
||||
{
|
||||
dotNetHelper.ExecutePublish(projectName, selfContained: false);
|
||||
dotNetHelper.ExecutePublish(projectName, selfContained: true, Config.TargetRid);
|
||||
dotNetHelper.ExecutePublish(projectName, selfContained: true, "linux-x64");
|
||||
}
|
||||
if (Commands.HasFlag(DotNetActions.PublishR2R))
|
||||
{
|
||||
dotNetHelper.ExecutePublish(projectName, selfContained: true, "linux-x64", trimmed: true, readyToRun: true);
|
||||
}
|
||||
if (Commands.HasFlag(DotNetActions.Test))
|
||||
{
|
||||
dotNetHelper.ExecuteTest(projectName);
|
||||
dotNetHelper.ExecuteRun(projectName);
|
||||
}
|
||||
}
|
||||
if (Commands.HasFlag(DotNetActions.Publish))
|
||||
{
|
||||
dotNetHelper.ExecutePublish(projectName);
|
||||
}
|
||||
if (Commands.HasFlag(DotNetActions.PublishComplex))
|
||||
{
|
||||
dotNetHelper.ExecutePublish(projectName, selfContained: false);
|
||||
dotNetHelper.ExecutePublish(projectName, selfContained: true, Config.TargetRid);
|
||||
dotNetHelper.ExecutePublish(projectName, selfContained: true, "linux-x64");
|
||||
}
|
||||
if (Commands.HasFlag(DotNetActions.PublishR2R))
|
||||
{
|
||||
dotNetHelper.ExecutePublish(projectName, selfContained: true, "linux-x64", trimmed: true, readyToRun: true);
|
||||
}
|
||||
if (Commands.HasFlag(DotNetActions.Test))
|
||||
{
|
||||
dotNetHelper.ExecuteTest(projectName);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -0,0 +1,58 @@
|
|||
// Licensed to the .NET Foundation under one or more agreements.
|
||||
// The .NET Foundation licenses this file to you under the MIT license.
|
||||
// See the LICENSE file in the project root for more information.
|
||||
|
||||
using System;
|
||||
using System.Threading;
|
||||
using System.Threading.Tasks;
|
||||
using Xunit.Abstractions;
|
||||
|
||||
namespace Microsoft.DotNet.SourceBuild.SmokeTests;
|
||||
|
||||
public static class Utilities
|
||||
{
|
||||
public static async Task RetryAsync(Func<Task> executor, ITestOutputHelper outputHelper)
|
||||
{
|
||||
await Utilities.RetryAsync(
|
||||
async () =>
|
||||
{
|
||||
try
|
||||
{
|
||||
await executor();
|
||||
return null;
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
return e;
|
||||
}
|
||||
},
|
||||
outputHelper);
|
||||
}
|
||||
|
||||
private static async Task RetryAsync(Func<Task<Exception?>> executor, ITestOutputHelper outputHelper)
|
||||
{
|
||||
const int maxRetries = 5;
|
||||
const int waitFactor = 5;
|
||||
|
||||
int retryCount = 0;
|
||||
|
||||
Exception? exception = await executor();
|
||||
while (exception != null)
|
||||
{
|
||||
retryCount++;
|
||||
if (retryCount >= maxRetries)
|
||||
{
|
||||
throw new InvalidOperationException($"Failed after {retryCount} retries.", exception);
|
||||
}
|
||||
|
||||
int waitTime = Convert.ToInt32(Math.Pow(waitFactor, retryCount - 1));
|
||||
if (outputHelper != null)
|
||||
{
|
||||
outputHelper.WriteLine($"Retry {retryCount}/{maxRetries}, retrying in {waitTime} seconds...");
|
||||
}
|
||||
|
||||
Thread.Sleep(TimeSpan.FromSeconds(waitTime));
|
||||
exception = await executor();
|
||||
}
|
||||
}
|
||||
}
|
|
@ -37,6 +37,7 @@ public class XmlDocTests : SmokeTests
|
|||
string pathWithoutPacksPrefix = xmlFile[(targetingPacksDirectory.Length + 1)..];
|
||||
string[] pathParts = pathWithoutPacksPrefix.Split(Path.DirectorySeparatorChar);
|
||||
string pathWithoutVersion = string.Join(Path.DirectorySeparatorChar, pathParts.Take(1).Concat(pathParts.Skip(2)));
|
||||
pathWithoutVersion = BaselineHelper.RemoveNetTfmPaths(pathWithoutVersion);
|
||||
missingXmlDoc.Add(pathWithoutVersion);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -2,57 +2,57 @@ Microsoft.AspNetCore.App.Ref/analyzers/dotnet/cs/Microsoft.AspNetCore.App.Analyz
|
|||
Microsoft.AspNetCore.App.Ref/analyzers/dotnet/cs/Microsoft.AspNetCore.App.CodeFixes.xml
|
||||
Microsoft.AspNetCore.App.Ref/analyzers/dotnet/roslyn4.0/cs/Microsoft.Extensions.Logging.Generators.xml
|
||||
Microsoft.NETCore.App.Ref/analyzers/dotnet/cs/System.Text.Json.SourceGeneration.xml
|
||||
Microsoft.NETCore.App.Ref/ref/net6.0/Microsoft.VisualBasic.xml
|
||||
Microsoft.NETCore.App.Ref/ref/net6.0/mscorlib.xml
|
||||
Microsoft.NETCore.App.Ref/ref/net6.0/System.AppContext.xml
|
||||
Microsoft.NETCore.App.Ref/ref/net6.0/System.Buffers.xml
|
||||
Microsoft.NETCore.App.Ref/ref/net6.0/System.ComponentModel.DataAnnotations.xml
|
||||
Microsoft.NETCore.App.Ref/ref/net6.0/System.Configuration.xml
|
||||
Microsoft.NETCore.App.Ref/ref/net6.0/System.Core.xml
|
||||
Microsoft.NETCore.App.Ref/ref/net6.0/System.Data.DataSetExtensions.xml
|
||||
Microsoft.NETCore.App.Ref/ref/net6.0/System.Data.xml
|
||||
Microsoft.NETCore.App.Ref/ref/net6.0/System.Diagnostics.Debug.xml
|
||||
Microsoft.NETCore.App.Ref/ref/net6.0/System.Diagnostics.Tools.xml
|
||||
Microsoft.NETCore.App.Ref/ref/net6.0/System.Drawing.xml
|
||||
Microsoft.NETCore.App.Ref/ref/net6.0/System.Dynamic.Runtime.xml
|
||||
Microsoft.NETCore.App.Ref/ref/net6.0/System.Globalization.Calendars.xml
|
||||
Microsoft.NETCore.App.Ref/ref/net6.0/System.Globalization.Extensions.xml
|
||||
Microsoft.NETCore.App.Ref/ref/net6.0/System.Globalization.xml
|
||||
Microsoft.NETCore.App.Ref/ref/net6.0/System.IO.Compression.Brotli.xml
|
||||
Microsoft.NETCore.App.Ref/ref/net6.0/System.IO.Compression.FileSystem.xml
|
||||
Microsoft.NETCore.App.Ref/ref/net6.0/System.IO.FileSystem.Primitives.xml
|
||||
Microsoft.NETCore.App.Ref/ref/net6.0/System.IO.FileSystem.xml
|
||||
Microsoft.NETCore.App.Ref/ref/net6.0/System.IO.UnmanagedMemoryStream.xml
|
||||
Microsoft.NETCore.App.Ref/ref/net6.0/System.IO.xml
|
||||
Microsoft.NETCore.App.Ref/ref/net6.0/System.Net.xml
|
||||
Microsoft.NETCore.App.Ref/ref/net6.0/System.Numerics.Vectors.xml
|
||||
Microsoft.NETCore.App.Ref/ref/net6.0/System.Numerics.xml
|
||||
Microsoft.NETCore.App.Ref/ref/net6.0/System.Reflection.Extensions.xml
|
||||
Microsoft.NETCore.App.Ref/ref/net6.0/System.Reflection.xml
|
||||
Microsoft.NETCore.App.Ref/ref/net6.0/System.Resources.Reader.xml
|
||||
Microsoft.NETCore.App.Ref/ref/net6.0/System.Resources.ResourceManager.xml
|
||||
Microsoft.NETCore.App.Ref/ref/net6.0/System.Runtime.Extensions.xml
|
||||
Microsoft.NETCore.App.Ref/ref/net6.0/System.Runtime.Handles.xml
|
||||
Microsoft.NETCore.App.Ref/ref/net6.0/System.Runtime.Serialization.xml
|
||||
Microsoft.NETCore.App.Ref/ref/net6.0/System.Security.Principal.xml
|
||||
Microsoft.NETCore.App.Ref/ref/net6.0/System.Security.SecureString.xml
|
||||
Microsoft.NETCore.App.Ref/ref/net6.0/System.Security.xml
|
||||
Microsoft.NETCore.App.Ref/ref/net6.0/System.ServiceModel.Web.xml
|
||||
Microsoft.NETCore.App.Ref/ref/net6.0/System.ServiceProcess.xml
|
||||
Microsoft.NETCore.App.Ref/ref/net6.0/System.Text.Encoding.xml
|
||||
Microsoft.NETCore.App.Ref/ref/net6.0/System.Threading.Tasks.Extensions.xml
|
||||
Microsoft.NETCore.App.Ref/ref/net6.0/System.Threading.Tasks.xml
|
||||
Microsoft.NETCore.App.Ref/ref/net6.0/System.Threading.Timer.xml
|
||||
Microsoft.NETCore.App.Ref/ref/net6.0/System.Transactions.xml
|
||||
Microsoft.NETCore.App.Ref/ref/net6.0/System.ValueTuple.xml
|
||||
Microsoft.NETCore.App.Ref/ref/net6.0/System.Web.xml
|
||||
Microsoft.NETCore.App.Ref/ref/net6.0/System.Windows.xml
|
||||
Microsoft.NETCore.App.Ref/ref/net6.0/System.xml
|
||||
Microsoft.NETCore.App.Ref/ref/net6.0/System.Xml.Linq.xml
|
||||
Microsoft.NETCore.App.Ref/ref/net6.0/System.Xml.Serialization.xml
|
||||
Microsoft.NETCore.App.Ref/ref/net6.0/System.Xml.xml
|
||||
Microsoft.NETCore.App.Ref/ref/net6.0/System.Xml.XmlDocument.xml
|
||||
Microsoft.NETCore.App.Ref/ref/net6.0/WindowsBase.xml
|
||||
Microsoft.NETCore.App.Ref/ref/netx.y/Microsoft.VisualBasic.xml
|
||||
Microsoft.NETCore.App.Ref/ref/netx.y/mscorlib.xml
|
||||
Microsoft.NETCore.App.Ref/ref/netx.y/System.AppContext.xml
|
||||
Microsoft.NETCore.App.Ref/ref/netx.y/System.Buffers.xml
|
||||
Microsoft.NETCore.App.Ref/ref/netx.y/System.ComponentModel.DataAnnotations.xml
|
||||
Microsoft.NETCore.App.Ref/ref/netx.y/System.Configuration.xml
|
||||
Microsoft.NETCore.App.Ref/ref/netx.y/System.Core.xml
|
||||
Microsoft.NETCore.App.Ref/ref/netx.y/System.Data.DataSetExtensions.xml
|
||||
Microsoft.NETCore.App.Ref/ref/netx.y/System.Data.xml
|
||||
Microsoft.NETCore.App.Ref/ref/netx.y/System.Diagnostics.Debug.xml
|
||||
Microsoft.NETCore.App.Ref/ref/netx.y/System.Diagnostics.Tools.xml
|
||||
Microsoft.NETCore.App.Ref/ref/netx.y/System.Drawing.xml
|
||||
Microsoft.NETCore.App.Ref/ref/netx.y/System.Dynamic.Runtime.xml
|
||||
Microsoft.NETCore.App.Ref/ref/netx.y/System.Globalization.Calendars.xml
|
||||
Microsoft.NETCore.App.Ref/ref/netx.y/System.Globalization.Extensions.xml
|
||||
Microsoft.NETCore.App.Ref/ref/netx.y/System.Globalization.xml
|
||||
Microsoft.NETCore.App.Ref/ref/netx.y/System.IO.Compression.Brotli.xml
|
||||
Microsoft.NETCore.App.Ref/ref/netx.y/System.IO.Compression.FileSystem.xml
|
||||
Microsoft.NETCore.App.Ref/ref/netx.y/System.IO.FileSystem.Primitives.xml
|
||||
Microsoft.NETCore.App.Ref/ref/netx.y/System.IO.FileSystem.xml
|
||||
Microsoft.NETCore.App.Ref/ref/netx.y/System.IO.UnmanagedMemoryStream.xml
|
||||
Microsoft.NETCore.App.Ref/ref/netx.y/System.IO.xml
|
||||
Microsoft.NETCore.App.Ref/ref/netx.y/System.Net.xml
|
||||
Microsoft.NETCore.App.Ref/ref/netx.y/System.Numerics.Vectors.xml
|
||||
Microsoft.NETCore.App.Ref/ref/netx.y/System.Numerics.xml
|
||||
Microsoft.NETCore.App.Ref/ref/netx.y/System.Reflection.Extensions.xml
|
||||
Microsoft.NETCore.App.Ref/ref/netx.y/System.Reflection.xml
|
||||
Microsoft.NETCore.App.Ref/ref/netx.y/System.Resources.Reader.xml
|
||||
Microsoft.NETCore.App.Ref/ref/netx.y/System.Resources.ResourceManager.xml
|
||||
Microsoft.NETCore.App.Ref/ref/netx.y/System.Runtime.Extensions.xml
|
||||
Microsoft.NETCore.App.Ref/ref/netx.y/System.Runtime.Handles.xml
|
||||
Microsoft.NETCore.App.Ref/ref/netx.y/System.Runtime.Serialization.xml
|
||||
Microsoft.NETCore.App.Ref/ref/netx.y/System.Security.Principal.xml
|
||||
Microsoft.NETCore.App.Ref/ref/netx.y/System.Security.SecureString.xml
|
||||
Microsoft.NETCore.App.Ref/ref/netx.y/System.Security.xml
|
||||
Microsoft.NETCore.App.Ref/ref/netx.y/System.ServiceModel.Web.xml
|
||||
Microsoft.NETCore.App.Ref/ref/netx.y/System.ServiceProcess.xml
|
||||
Microsoft.NETCore.App.Ref/ref/netx.y/System.Text.Encoding.xml
|
||||
Microsoft.NETCore.App.Ref/ref/netx.y/System.Threading.Tasks.Extensions.xml
|
||||
Microsoft.NETCore.App.Ref/ref/netx.y/System.Threading.Tasks.xml
|
||||
Microsoft.NETCore.App.Ref/ref/netx.y/System.Threading.Timer.xml
|
||||
Microsoft.NETCore.App.Ref/ref/netx.y/System.Transactions.xml
|
||||
Microsoft.NETCore.App.Ref/ref/netx.y/System.ValueTuple.xml
|
||||
Microsoft.NETCore.App.Ref/ref/netx.y/System.Web.xml
|
||||
Microsoft.NETCore.App.Ref/ref/netx.y/System.Windows.xml
|
||||
Microsoft.NETCore.App.Ref/ref/netx.y/System.xml
|
||||
Microsoft.NETCore.App.Ref/ref/netx.y/System.Xml.Linq.xml
|
||||
Microsoft.NETCore.App.Ref/ref/netx.y/System.Xml.Serialization.xml
|
||||
Microsoft.NETCore.App.Ref/ref/netx.y/System.Xml.xml
|
||||
Microsoft.NETCore.App.Ref/ref/netx.y/System.Xml.XmlDocument.xml
|
||||
Microsoft.NETCore.App.Ref/ref/netx.y/WindowsBase.xml
|
||||
NETStandard.Library.Ref/ref/netstandard2.1/Microsoft.Win32.Primitives.xml
|
||||
NETStandard.Library.Ref/ref/netstandard2.1/mscorlib.xml
|
||||
NETStandard.Library.Ref/ref/netstandard2.1/System.AppContext.xml
|
||||
|
|
|
@ -856,14 +856,6 @@ index ------------
|
|||
./sdk/x.y.z/SDKPrecomputedAssemblyReferences.cache
|
||||
./sdk/x.y.z/SdkResolvers/
|
||||
./sdk/x.y.z/SdkResolvers/Microsoft.Build.NuGetSdkResolver/
|
||||
@@ ------------ @@
|
||||
./sdk/x.y.z/Sdks/FSharp.NET.Sdk/Sdk/Sdk.props
|
||||
./sdk/x.y.z/Sdks/FSharp.NET.Sdk/Sdk/Sdk.targets
|
||||
./sdk/x.y.z/Sdks/Microsoft.Docker.Sdk/
|
||||
+./sdk/x.y.z/Sdks/Microsoft.Docker.Sdk/microsoft.docker.sdk.x.y.z.csproj
|
||||
./sdk/x.y.z/Sdks/Microsoft.Docker.Sdk/Sdk/
|
||||
./sdk/x.y.z/Sdks/Microsoft.Docker.Sdk/Sdk/Sdk.props
|
||||
./sdk/x.y.z/Sdks/Microsoft.Docker.Sdk/Sdk/Sdk.targets
|
||||
@@ ------------ @@
|
||||
./sdk/x.y.z/Sdks/Microsoft.NET.ILLink.Tasks/tools/net472/System.Buffers.dll
|
||||
./sdk/x.y.z/Sdks/Microsoft.NET.ILLink.Tasks/tools/net472/System.Collections.Immutable.dll
|
||||
|
|
Loading…
Reference in a new issue