Implement beginnings of C# based tests (#13052)

* Implement beginnings of C# based tests

* Convert xml dox tests

* Updates per code review

* Fixup of previous commit

* Edits per code review

* Refactor testRunTitle to make distinguishable between build legs
This commit is contained in:
Michael Simons 2022-01-21 07:59:36 -06:00 committed by GitHub
parent b9540d3005
commit 0dec528400
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
14 changed files with 484 additions and 263 deletions

View file

@ -82,7 +82,7 @@ steps:
find artifacts/prebuilt-report/ -exec cp {} --parents -t ${targetFolder} \; find artifacts/prebuilt-report/ -exec cp {} --parents -t ${targetFolder} \;
find src/ -type f -name "*.binlog" -exec cp {} --parents -t ${targetFolder} \; find src/ -type f -name "*.binlog" -exec cp {} --parents -t ${targetFolder} \;
find src/ -type f -name "*.log" -exec cp {} --parents -t ${targetFolder} \; find src/ -type f -name "*.log" -exec cp {} --parents -t ${targetFolder} \;
find testing-smoke/logs -exec cp {} --parents -t ${targetFolder} \; find test/*/*/*/*/*/testing-smoke/logs -exec cp {} --parents -t ${targetFolder} \;
displayName: Prepare BuildLogs staging directory displayName: Prepare BuildLogs staging directory
continueOnError: true continueOnError: true
condition: succeededOrFailed() condition: succeededOrFailed()
@ -93,6 +93,18 @@ steps:
continueOnError: true continueOnError: true
condition: succeededOrFailed() condition: succeededOrFailed()
- task: PublishTestResults@2
displayName: Publish Test Results
condition: succeededOrFailed()
continueOnError: true
inputs:
testRunner: vSTest
testResultsFiles: 'test/**/*.trx'
searchFolder: ${{ parameters.tarballDir }}
mergeTestResults: true
publishRunAttachments: true
testRunTitle: SourceBuild_SmokeTests_$(Agent.JobName)
- publish: '${{ parameters.tarballDir }}/artifacts/${{ parameters.buildArch}}/Release/' - publish: '${{ parameters.tarballDir }}/artifacts/${{ parameters.buildArch}}/Release/'
artifact: $(Agent.JobName)_Artifacts artifact: $(Agent.JobName)_Artifacts
displayName: Publish Artifacts displayName: Publish Artifacts

View file

@ -14,7 +14,7 @@
<MSBuild Projects="repos\$(RootRepo).proj" Targets="Build" BuildInParallel="$(BuildInParallel)" StopOnFirstFailure="true" /> <MSBuild Projects="repos\$(RootRepo).proj" Targets="Build" BuildInParallel="$(BuildInParallel)" StopOnFirstFailure="true" />
</Target> </Target>
<Target Name="RunTests" DependsOnTargets="PrepareOutput;InitBuild"> <Target Name="RunRepoTests" DependsOnTargets="PrepareOutput;InitBuild">
<Message Text="Build Environment: $(Platform) $(Configuration) $(TargetOS) $(TargetRid)" /> <Message Text="Build Environment: $(Platform) $(Configuration) $(TargetOS) $(TargetRid)" />
<MSBuild Projects="repos\$(RootRepoTests).proj" Targets="Build" Properties="PrepForTests=true;SkipEnsurePackagesCreated=true" BuildInParallel="$(BuildInParallel)" StopOnFirstFailure="true" /> <MSBuild Projects="repos\$(RootRepoTests).proj" Targets="Build" Properties="PrepForTests=true;SkipEnsurePackagesCreated=true" BuildInParallel="$(BuildInParallel)" StopOnFirstFailure="true" />
@ -91,20 +91,19 @@
</Target> </Target>
<Target Name="RunSmokeTest"> <Target Name="RunSmokeTest">
<PropertyGroup> <ItemGroup>
<SmokeTestCommand>./smoke-test.sh</SmokeTestCommand> <SdkTarballItem Include="$(SourceBuiltTarBallPath)**/dotnet-sdk*$(TarBallExtension)" />
<SmokeTestCommand>$(SmokeTestCommand) --minimal</SmokeTestCommand> </ItemGroup>
<SmokeTestCommand>$(SmokeTestCommand) --projectOutput</SmokeTestCommand>
<SmokeTestCommand>$(SmokeTestCommand) --configuration $(Configuration)</SmokeTestCommand>
<SmokeTestCommand>$(SmokeTestCommand) --archiveRestoredPackages</SmokeTestCommand>
<!-- Dev certs don't work on this platform. --> <PropertyGroup>
<SmokeTestCommand Condition="'$(TargetOS)' == 'OSX'">$(SmokeTestCommand) --excludeWebHttpsTests</SmokeTestCommand> <SdkTarballPath>%(SdkTarballItem.Identity)</SdkTarballPath>
</PropertyGroup> </PropertyGroup>
<Exec Command="$(SmokeTestCommand)" <Exec Command="$(DotnetToolCommand) test ./test/Microsoft.DotNet.SourceBuild.SmokeTests --logger:trx"
EnvironmentVariables=" EnvironmentVariables="
targetRid=$(TargetRid)" /> DOTNET_TARBALL_PATH=$(SdkTarballPath);
TARGET_RID=$(TargetRid);
" />
</Target> </Target>
<UsingTask AssemblyFile="$(XPlatSourceBuildTasksAssembly)" TaskName="UploadToAzure" /> <UsingTask AssemblyFile="$(XPlatSourceBuildTasksAssembly)" TaskName="UploadToAzure" />

View file

@ -0,0 +1,7 @@
<Project>
<!--
Prevent repo src automatic Directory.Build imports from finding source-build infra.
-->
</Project>

View file

@ -0,0 +1,7 @@
<Project>
<!--
Prevent repo src automatic Directory.Build imports from finding source-build infra.
-->
</Project>

View file

@ -0,0 +1,37 @@
// 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.Collections.Generic;
using System.IO;
using System.Linq;
using Xunit;
namespace Microsoft.DotNet.SourceBuild.SmokeTests
{
internal class BaselineHelper
{
public static void Compare(string baselineFileName, IOrderedEnumerable<string> actualEntries)
{
IEnumerable<string> baseline = File.ReadAllLines(GetBaselineFilePath(baselineFileName));
string[] missingEntries = actualEntries.Except(baseline).ToArray();
string[] extraEntries = baseline.Except(actualEntries).ToArray();
string? message = null;
if (missingEntries.Length > 0)
{
message = $"Missing entries in '{baselineFileName}' baseline: {Environment.NewLine}{string.Join(Environment.NewLine, missingEntries)}{Environment.NewLine}{Environment.NewLine}";
}
if (extraEntries.Length > 0)
{
message += $"Extra entries in '{baselineFileName}' baseline: {Environment.NewLine}{string.Join(Environment.NewLine, extraEntries)}{Environment.NewLine}{Environment.NewLine}";
}
Assert.Null(message);
}
private static string GetBaselineFilePath(string baselineFileName) => Path.Combine(Directory.GetCurrentDirectory(), "baselines", baselineFileName);
}
}

View file

@ -0,0 +1,15 @@
// 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;
namespace Microsoft.DotNet.SourceBuild.SmokeTests;
internal static class Config
{
public static string DotNetDirectory { get; } = Environment.GetEnvironmentVariable("DOTNET_DIR") ?? "./.dotnet";
public static string DotNetTarballPath { get; } = Environment.GetEnvironmentVariable(DotNetTarballPathEnv) ?? string.Empty;
public const string DotNetTarballPathEnv = "DOTNET_TARBALL_PATH";
public static string TargetRid { get; } = Environment.GetEnvironmentVariable("TARGET_RID") ?? string.Empty;
}

View file

@ -0,0 +1,41 @@
// 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.Diagnostics;
using System.IO;
using Xunit;
using Xunit.Abstractions;
namespace Microsoft.DotNet.SourceBuild.SmokeTests;
internal class DotNetHelper
{
public string DotNetPath { get; }
public string DotNetInstallDirectory { get; }
public DotNetHelper(ITestOutputHelper outputHelper)
{
if (!Directory.Exists(Config.DotNetDirectory))
{
if (!File.Exists(Config.DotNetTarballPath))
{
throw new InvalidOperationException($"Tarball path '{Config.DotNetTarballPath}' specified in {Config.DotNetTarballPathEnv} does not exist.");
}
Directory.CreateDirectory(Config.DotNetDirectory);
ExecuteHelper.ExecuteProcess("tar", $"xzf {Config.DotNetTarballPath} -C {Config.DotNetDirectory}", outputHelper);
}
DotNetInstallDirectory = Path.Combine(Directory.GetCurrentDirectory(), Config.DotNetDirectory);
DotNetPath = Path.Combine(DotNetInstallDirectory, "dotnet");
}
public void ExecuteDotNetCmd(string args, ITestOutputHelper outputHelper)
{
(Process Process, string StdOut, string StdErr) executeResult = ExecuteHelper.ExecuteProcess(DotNetPath, args, outputHelper);
Assert.Equal(0, executeResult.Process.ExitCode);
}
}

View file

@ -0,0 +1,55 @@
// 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.Diagnostics;
using System.Text;
using Xunit.Abstractions;
namespace Microsoft.DotNet.SourceBuild.SmokeTests;
internal static class ExecuteHelper
{
public static (Process Process, string StdOut, string StdErr) ExecuteProcess(
string fileName, string args, ITestOutputHelper outputHelper)
{
outputHelper.WriteLine($"Executing: {fileName} {args}");
Process process = new()
{
EnableRaisingEvents = true,
StartInfo =
{
FileName = fileName,
Arguments = args,
RedirectStandardOutput = true,
RedirectStandardError = true,
}
};
StringBuilder stdOutput = new();
process.OutputDataReceived += new DataReceivedEventHandler((sender, e) => stdOutput.AppendLine(e.Data));
StringBuilder stdError = new();
process.ErrorDataReceived += new DataReceivedEventHandler((sender, e) => stdError.AppendLine(e.Data));
process.Start();
process.BeginOutputReadLine();
process.BeginErrorReadLine();
process.WaitForExit();
string output = stdOutput.ToString().Trim();
if (outputHelper != null && !string.IsNullOrWhiteSpace(output))
{
outputHelper.WriteLine(output);
}
string error = stdError.ToString().Trim();
if (outputHelper != null && !string.IsNullOrWhiteSpace(error))
{
outputHelper.WriteLine(error);
}
return (process, output, error);
}
}

View file

@ -0,0 +1,28 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>net6.0</TargetFramework>
<Nullable>enable</Nullable>
<IsPackable>false</IsPackable>
<IsTestProject>true</IsTestProject>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="16.11.0" />
<PackageReference Include="xunit" Version="2.4.1" />
<PackageReference Include="xunit.runner.visualstudio" Version="2.4.3">
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
<PrivateAssets>all</PrivateAssets>
</PackageReference>
</ItemGroup>
<ItemGroup>
<Content Include="baselines/*">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
<Content Include="smoke-tests/*">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
</ItemGroup>
</Project>

View file

@ -0,0 +1,37 @@
// 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.Diagnostics;
using System.IO;
using Xunit;
using Xunit.Abstractions;
namespace Microsoft.DotNet.SourceBuild.SmokeTests;
// This test suite invokes the smoke-test.sh which should be considered legacy. Those tests should be migrated to this test suite overtime.
public class SmokeTests
{
private ITestOutputHelper OutputHelper { get; }
private DotNetHelper DotNetHelper { get; }
public SmokeTests(ITestOutputHelper outputHelper)
{
OutputHelper = outputHelper;
DotNetHelper = new DotNetHelper(outputHelper);
}
[Fact]
public void SmokeTestsScript()
{
string smokeTestArgs = $"--dotnetDir {Directory.GetParent(DotNetHelper.DotNetPath)} --minimal --projectOutput --archiveRestoredPackages --targetRid {Config.TargetRid}";
if (Config.TargetRid.Contains("osx"))
{
smokeTestArgs += " --excludeWebHttpsTests";
}
(Process Process, string StdOut, string StdErr) executeResult = ExecuteHelper.ExecuteProcess("./smoke-tests/smoke-test.sh", smokeTestArgs, OutputHelper);
Assert.Equal(0, executeResult.Process.ExitCode);
}
}

View file

@ -0,0 +1,54 @@
// 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.Collections.Generic;
using System.IO;
using Xunit;
using Xunit.Abstractions;
using System;
using System.Linq;
namespace Microsoft.DotNet.SourceBuild.SmokeTests;
public class XmlDocTests
{
private ITestOutputHelper OutputHelper { get; }
private DotNetHelper DotNetHelper { get; }
public XmlDocTests(ITestOutputHelper outputHelper)
{
OutputHelper = outputHelper;
DotNetHelper = new DotNetHelper(outputHelper);
}
/// <Summary>
/// Verifies every targeting pack assembly has a xml doc file.
/// There are exceptions which are specified in baselines/XmlDocIgnore.*.txt.
/// </Summary>
[Fact]
public void VerifyTargetingPacksHaveDoc()
{
List<string> missingXmlDoc = new();
string targetingPacksDirectory = Path.Combine(DotNetHelper.DotNetInstallDirectory, "packs");
foreach (string targetingPackAssembly in Directory.EnumerateFiles(targetingPacksDirectory, "*.dll", SearchOption.AllDirectories))
{
if (targetingPackAssembly.EndsWith("resources.dll"))
{
continue;
}
string xmlFile = Path.ChangeExtension(targetingPackAssembly, ".xml");
if (!File.Exists(xmlFile))
{
string pathWithoutPacksPrefix = xmlFile.Substring(targetingPacksDirectory.Length + 1);
String[] pathParts = pathWithoutPacksPrefix.Split(Path.DirectorySeparatorChar);
string pathWithoutVersion = string.Join(Path.DirectorySeparatorChar, pathParts.Take(1).Concat(pathParts.Skip(2)));
missingXmlDoc.Add(pathWithoutVersion);
}
}
BaselineHelper.Compare("MissingXmlDoc.txt", missingXmlDoc.OrderBy(entry => entry));
}
}

View file

@ -0,0 +1,175 @@
Microsoft.AspNetCore.App.Ref/analyzers/dotnet/cs/Microsoft.AspNetCore.App.Analyzers.xml
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
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
NETStandard.Library.Ref/ref/netstandard2.1/System.Buffers.xml
NETStandard.Library.Ref/ref/netstandard2.1/System.Collections.Concurrent.xml
NETStandard.Library.Ref/ref/netstandard2.1/System.Collections.NonGeneric.xml
NETStandard.Library.Ref/ref/netstandard2.1/System.Collections.Specialized.xml
NETStandard.Library.Ref/ref/netstandard2.1/System.Collections.xml
NETStandard.Library.Ref/ref/netstandard2.1/System.ComponentModel.Composition.xml
NETStandard.Library.Ref/ref/netstandard2.1/System.ComponentModel.EventBasedAsync.xml
NETStandard.Library.Ref/ref/netstandard2.1/System.ComponentModel.Primitives.xml
NETStandard.Library.Ref/ref/netstandard2.1/System.ComponentModel.TypeConverter.xml
NETStandard.Library.Ref/ref/netstandard2.1/System.ComponentModel.xml
NETStandard.Library.Ref/ref/netstandard2.1/System.Console.xml
NETStandard.Library.Ref/ref/netstandard2.1/System.Core.xml
NETStandard.Library.Ref/ref/netstandard2.1/System.Data.Common.xml
NETStandard.Library.Ref/ref/netstandard2.1/System.Data.xml
NETStandard.Library.Ref/ref/netstandard2.1/System.Diagnostics.Contracts.xml
NETStandard.Library.Ref/ref/netstandard2.1/System.Diagnostics.Debug.xml
NETStandard.Library.Ref/ref/netstandard2.1/System.Diagnostics.FileVersionInfo.xml
NETStandard.Library.Ref/ref/netstandard2.1/System.Diagnostics.Process.xml
NETStandard.Library.Ref/ref/netstandard2.1/System.Diagnostics.StackTrace.xml
NETStandard.Library.Ref/ref/netstandard2.1/System.Diagnostics.TextWriterTraceListener.xml
NETStandard.Library.Ref/ref/netstandard2.1/System.Diagnostics.Tools.xml
NETStandard.Library.Ref/ref/netstandard2.1/System.Diagnostics.TraceSource.xml
NETStandard.Library.Ref/ref/netstandard2.1/System.Diagnostics.Tracing.xml
NETStandard.Library.Ref/ref/netstandard2.1/System.Drawing.Primitives.xml
NETStandard.Library.Ref/ref/netstandard2.1/System.Drawing.xml
NETStandard.Library.Ref/ref/netstandard2.1/System.Dynamic.Runtime.xml
NETStandard.Library.Ref/ref/netstandard2.1/System.Globalization.Calendars.xml
NETStandard.Library.Ref/ref/netstandard2.1/System.Globalization.Extensions.xml
NETStandard.Library.Ref/ref/netstandard2.1/System.Globalization.xml
NETStandard.Library.Ref/ref/netstandard2.1/System.IO.Compression.FileSystem.xml
NETStandard.Library.Ref/ref/netstandard2.1/System.IO.Compression.xml
NETStandard.Library.Ref/ref/netstandard2.1/System.IO.Compression.ZipFile.xml
NETStandard.Library.Ref/ref/netstandard2.1/System.IO.FileSystem.DriveInfo.xml
NETStandard.Library.Ref/ref/netstandard2.1/System.IO.FileSystem.Primitives.xml
NETStandard.Library.Ref/ref/netstandard2.1/System.IO.FileSystem.Watcher.xml
NETStandard.Library.Ref/ref/netstandard2.1/System.IO.FileSystem.xml
NETStandard.Library.Ref/ref/netstandard2.1/System.IO.IsolatedStorage.xml
NETStandard.Library.Ref/ref/netstandard2.1/System.IO.MemoryMappedFiles.xml
NETStandard.Library.Ref/ref/netstandard2.1/System.IO.Pipes.xml
NETStandard.Library.Ref/ref/netstandard2.1/System.IO.UnmanagedMemoryStream.xml
NETStandard.Library.Ref/ref/netstandard2.1/System.IO.xml
NETStandard.Library.Ref/ref/netstandard2.1/System.Linq.Expressions.xml
NETStandard.Library.Ref/ref/netstandard2.1/System.Linq.Parallel.xml
NETStandard.Library.Ref/ref/netstandard2.1/System.Linq.Queryable.xml
NETStandard.Library.Ref/ref/netstandard2.1/System.Linq.xml
NETStandard.Library.Ref/ref/netstandard2.1/System.Memory.xml
NETStandard.Library.Ref/ref/netstandard2.1/System.Net.Http.xml
NETStandard.Library.Ref/ref/netstandard2.1/System.Net.NameResolution.xml
NETStandard.Library.Ref/ref/netstandard2.1/System.Net.NetworkInformation.xml
NETStandard.Library.Ref/ref/netstandard2.1/System.Net.Ping.xml
NETStandard.Library.Ref/ref/netstandard2.1/System.Net.Primitives.xml
NETStandard.Library.Ref/ref/netstandard2.1/System.Net.Requests.xml
NETStandard.Library.Ref/ref/netstandard2.1/System.Net.Security.xml
NETStandard.Library.Ref/ref/netstandard2.1/System.Net.Sockets.xml
NETStandard.Library.Ref/ref/netstandard2.1/System.Net.WebHeaderCollection.xml
NETStandard.Library.Ref/ref/netstandard2.1/System.Net.WebSockets.Client.xml
NETStandard.Library.Ref/ref/netstandard2.1/System.Net.WebSockets.xml
NETStandard.Library.Ref/ref/netstandard2.1/System.Net.xml
NETStandard.Library.Ref/ref/netstandard2.1/System.Numerics.Vectors.xml
NETStandard.Library.Ref/ref/netstandard2.1/System.Numerics.xml
NETStandard.Library.Ref/ref/netstandard2.1/System.ObjectModel.xml
NETStandard.Library.Ref/ref/netstandard2.1/System.Reflection.DispatchProxy.xml
NETStandard.Library.Ref/ref/netstandard2.1/System.Reflection.Emit.ILGeneration.xml
NETStandard.Library.Ref/ref/netstandard2.1/System.Reflection.Emit.Lightweight.xml
NETStandard.Library.Ref/ref/netstandard2.1/System.Reflection.Emit.xml
NETStandard.Library.Ref/ref/netstandard2.1/System.Reflection.Extensions.xml
NETStandard.Library.Ref/ref/netstandard2.1/System.Reflection.Primitives.xml
NETStandard.Library.Ref/ref/netstandard2.1/System.Reflection.xml
NETStandard.Library.Ref/ref/netstandard2.1/System.Resources.Reader.xml
NETStandard.Library.Ref/ref/netstandard2.1/System.Resources.ResourceManager.xml
NETStandard.Library.Ref/ref/netstandard2.1/System.Resources.Writer.xml
NETStandard.Library.Ref/ref/netstandard2.1/System.Runtime.CompilerServices.VisualC.xml
NETStandard.Library.Ref/ref/netstandard2.1/System.Runtime.Extensions.xml
NETStandard.Library.Ref/ref/netstandard2.1/System.Runtime.Handles.xml
NETStandard.Library.Ref/ref/netstandard2.1/System.Runtime.InteropServices.RuntimeInformation.xml
NETStandard.Library.Ref/ref/netstandard2.1/System.Runtime.InteropServices.xml
NETStandard.Library.Ref/ref/netstandard2.1/System.Runtime.Numerics.xml
NETStandard.Library.Ref/ref/netstandard2.1/System.Runtime.Serialization.Formatters.xml
NETStandard.Library.Ref/ref/netstandard2.1/System.Runtime.Serialization.Json.xml
NETStandard.Library.Ref/ref/netstandard2.1/System.Runtime.Serialization.Primitives.xml
NETStandard.Library.Ref/ref/netstandard2.1/System.Runtime.Serialization.xml
NETStandard.Library.Ref/ref/netstandard2.1/System.Runtime.Serialization.Xml.xml
NETStandard.Library.Ref/ref/netstandard2.1/System.Runtime.xml
NETStandard.Library.Ref/ref/netstandard2.1/System.Security.Claims.xml
NETStandard.Library.Ref/ref/netstandard2.1/System.Security.Cryptography.Algorithms.xml
NETStandard.Library.Ref/ref/netstandard2.1/System.Security.Cryptography.Csp.xml
NETStandard.Library.Ref/ref/netstandard2.1/System.Security.Cryptography.Encoding.xml
NETStandard.Library.Ref/ref/netstandard2.1/System.Security.Cryptography.Primitives.xml
NETStandard.Library.Ref/ref/netstandard2.1/System.Security.Cryptography.X509Certificates.xml
NETStandard.Library.Ref/ref/netstandard2.1/System.Security.Principal.xml
NETStandard.Library.Ref/ref/netstandard2.1/System.Security.SecureString.xml
NETStandard.Library.Ref/ref/netstandard2.1/System.ServiceModel.Web.xml
NETStandard.Library.Ref/ref/netstandard2.1/System.Text.Encoding.Extensions.xml
NETStandard.Library.Ref/ref/netstandard2.1/System.Text.Encoding.xml
NETStandard.Library.Ref/ref/netstandard2.1/System.Text.RegularExpressions.xml
NETStandard.Library.Ref/ref/netstandard2.1/System.Threading.Overlapped.xml
NETStandard.Library.Ref/ref/netstandard2.1/System.Threading.Tasks.Extensions.xml
NETStandard.Library.Ref/ref/netstandard2.1/System.Threading.Tasks.Parallel.xml
NETStandard.Library.Ref/ref/netstandard2.1/System.Threading.Tasks.xml
NETStandard.Library.Ref/ref/netstandard2.1/System.Threading.Thread.xml
NETStandard.Library.Ref/ref/netstandard2.1/System.Threading.ThreadPool.xml
NETStandard.Library.Ref/ref/netstandard2.1/System.Threading.Timer.xml
NETStandard.Library.Ref/ref/netstandard2.1/System.Threading.xml
NETStandard.Library.Ref/ref/netstandard2.1/System.Transactions.xml
NETStandard.Library.Ref/ref/netstandard2.1/System.ValueTuple.xml
NETStandard.Library.Ref/ref/netstandard2.1/System.Web.xml
NETStandard.Library.Ref/ref/netstandard2.1/System.Windows.xml
NETStandard.Library.Ref/ref/netstandard2.1/System.xml
NETStandard.Library.Ref/ref/netstandard2.1/System.Xml.Linq.xml
NETStandard.Library.Ref/ref/netstandard2.1/System.Xml.ReaderWriter.xml
NETStandard.Library.Ref/ref/netstandard2.1/System.Xml.Serialization.xml
NETStandard.Library.Ref/ref/netstandard2.1/System.Xml.XDocument.xml
NETStandard.Library.Ref/ref/netstandard2.1/System.Xml.xml
NETStandard.Library.Ref/ref/netstandard2.1/System.Xml.XmlDocument.xml
NETStandard.Library.Ref/ref/netstandard2.1/System.Xml.XmlSerializer.xml
NETStandard.Library.Ref/ref/netstandard2.1/System.Xml.XPath.XDocument.xml
NETStandard.Library.Ref/ref/netstandard2.1/System.Xml.XPath.xml

View file

@ -7,7 +7,8 @@ VERSION_PREFIX=6.0
# See https://github.com/dotnet/source-build/issues/579, this version # See https://github.com/dotnet/source-build/issues/579, this version
# needs to be compatible with the runtime produced from source-build # needs to be compatible with the runtime produced from source-build
DEV_CERTS_VERSION_DEFAULT=6.0.0-preview.6.21355.2 DEV_CERTS_VERSION_DEFAULT=6.0.0-preview.6.21355.2
__ROOT_REPO=$(sed 's/\r$//' "$SCRIPT_ROOT/artifacts/obj/rootrepo.txt") # remove CR if mounted repo on Windows drive ARTIFACTS_DIR="$SCRIPT_ROOT/../../../../../../artifacts/"
__ROOT_REPO=$(sed 's/\r$//' "${ARTIFACTS_DIR}obj/rootrepo.txt") # remove CR if mounted repo on Windows drive
executingUserHome=${HOME:-} executingUserHome=${HOME:-}
export DOTNET_CLI_TELEMETRY_OPTOUT=1 export DOTNET_CLI_TELEMETRY_OPTOUT=1
@ -362,247 +363,6 @@ function runWebTests() {
doCommand F# webapi "$@" new restore build run multi-rid-publish doCommand F# webapi "$@" new restore build run multi-rid-publish
} }
function runXmlDocTests() {
targetingPacksDir="$dotnetDir/packs/"
echo "Looking for xml docs in targeting packs in $targetingPacksDir"
netstandardIgnoreList=(
Microsoft.Win32.Primitives.xml
mscorlib.xml
System.AppContext.xml
System.Buffers.xml
System.Collections.Concurrent.xml
System.Collections.NonGeneric.xml
System.Collections.Specialized.xml
System.Collections.xml
System.ComponentModel.Composition.xml
System.ComponentModel.EventBasedAsync.xml
System.ComponentModel.Primitives.xml
System.ComponentModel.TypeConverter.xml
System.ComponentModel.xml
System.Console.xml
System.Core.xml
System.Data.Common.xml
System.Data.xml
System.Diagnostics.Contracts.xml
System.Diagnostics.Debug.xml
System.Diagnostics.FileVersionInfo.xml
System.Diagnostics.Process.xml
System.Diagnostics.StackTrace.xml
System.Diagnostics.TextWriterTraceListener.xml
System.Diagnostics.Tools.xml
System.Diagnostics.TraceSource.xml
System.Diagnostics.Tracing.xml
System.Drawing.Primitives.xml
System.Drawing.xml
System.Dynamic.Runtime.xml
System.Globalization.Calendars.xml
System.Globalization.Extensions.xml
System.Globalization.xml
System.IO.Compression.FileSystem.xml
System.IO.Compression.xml
System.IO.Compression.ZipFile.xml
System.IO.FileSystem.DriveInfo.xml
System.IO.FileSystem.Primitives.xml
System.IO.FileSystem.Watcher.xml
System.IO.FileSystem.xml
System.IO.IsolatedStorage.xml
System.IO.MemoryMappedFiles.xml
System.IO.Pipes.xml
System.IO.UnmanagedMemoryStream.xml
System.IO.xml
System.Linq.Expressions.xml
System.Linq.Parallel.xml
System.Linq.Queryable.xml
System.Linq.xml
System.Memory.xml
System.Net.Http.xml
System.Net.NameResolution.xml
System.Net.NetworkInformation.xml
System.Net.Ping.xml
System.Net.Primitives.xml
System.Net.Requests.xml
System.Net.Security.xml
System.Net.Sockets.xml
System.Net.WebHeaderCollection.xml
System.Net.WebSockets.Client.xml
System.Net.WebSockets.xml
System.Net.xml
System.Numerics.Vectors.xml
System.Numerics.xml
System.ObjectModel.xml
System.Reflection.DispatchProxy.xml
System.Reflection.Emit.ILGeneration.xml
System.Reflection.Emit.Lightweight.xml
System.Reflection.Emit.xml
System.Reflection.Extensions.xml
System.Reflection.Primitives.xml
System.Reflection.xml
System.Resources.Reader.xml
System.Resources.ResourceManager.xml
System.Resources.Writer.xml
System.Runtime.CompilerServices.VisualC.xml
System.Runtime.Extensions.xml
System.Runtime.Handles.xml
System.Runtime.InteropServices.RuntimeInformation.xml
System.Runtime.InteropServices.xml
System.Runtime.Numerics.xml
System.Runtime.Serialization.Formatters.xml
System.Runtime.Serialization.Json.xml
System.Runtime.Serialization.Primitives.xml
System.Runtime.Serialization.xml
System.Runtime.Serialization.Xml.xml
System.Runtime.xml
System.Security.Claims.xml
System.Security.Cryptography.Algorithms.xml
System.Security.Cryptography.Csp.xml
System.Security.Cryptography.Encoding.xml
System.Security.Cryptography.Primitives.xml
System.Security.Cryptography.X509Certificates.xml
System.Security.Principal.xml
System.Security.SecureString.xml
System.ServiceModel.Web.xml
System.Text.Encoding.Extensions.xml
System.Text.Encoding.xml
System.Text.RegularExpressions.xml
System.Threading.Overlapped.xml
System.Threading.Tasks.Extensions.xml
System.Threading.Tasks.Parallel.xml
System.Threading.Tasks.xml
System.Threading.ThreadPool.xml
System.Threading.Thread.xml
System.Threading.Timer.xml
System.Threading.xml
System.Transactions.xml
System.ValueTuple.xml
System.Web.xml
System.Windows.xml
System.xml
System.Xml.Linq.xml
System.Xml.ReaderWriter.xml
System.Xml.Serialization.xml
System.Xml.XDocument.xml
System.Xml.xml
System.Xml.XmlDocument.xml
System.Xml.XmlSerializer.xml
System.Xml.XPath.XDocument.xml
System.Xml.XPath.xml
)
netcoreappIgnoreList=(
mscorlib.xml
Microsoft.VisualBasic.xml
System.AppContext.xml
System.Buffers.xml
System.ComponentModel.DataAnnotations.xml
System.Configuration.xml
System.Core.xml
System.Data.DataSetExtensions.xml
System.Data.xml
System.Diagnostics.Debug.xml
System.Diagnostics.Tools.xml
System.Drawing.xml
System.Dynamic.Runtime.xml
System.Globalization.Calendars.xml
System.Globalization.Extensions.xml
System.Globalization.xml
System.IO.Compression.Brotli.xml
System.IO.Compression.FileSystem.xml
System.IO.FileSystem.xml
System.IO.FileSystem.Primitives.xml
System.IO.UnmanagedMemoryStream.xml
System.IO.xml
System.Net.xml
System.Numerics.xml
System.Numerics.Vectors.xml
System.Reflection.Extensions.xml
System.Reflection.xml
System.Resources.Reader.xml
System.Resources.ResourceManager.xml
System.Runtime.Extensions.xml
System.Runtime.Handles.xml
System.Runtime.Serialization.xml
System.Security.Principal.xml
System.Security.SecureString.xml
System.Security.xml
System.ServiceModel.Web.xml
System.ServiceProcess.xml
System.Text.Encoding.xml
System.Text.Json.SourceGeneration.resources.xml
System.Text.Json.SourceGeneration.xml
System.Threading.Tasks.Extensions.xml
System.Threading.Tasks.xml
System.Threading.Timer.xml
System.Transactions.xml
System.ValueTuple.xml
System.Web.xml
System.Windows.xml
System.xml
System.Xml.Linq.xml
System.Xml.Serialization.xml
System.Xml.xml
System.Xml.XmlDocument.xml
WindowsBase.xml
)
aspnetcoreappIgnoreList=(
Microsoft.AspNetCore.App.Analyzers.xml
Microsoft.AspNetCore.App.CodeFixes.xml
Microsoft.Extensions.Logging.Generators.resources.xml
Microsoft.Extensions.Logging.Generators.xml
)
error=0
while IFS= read -r -d '' dllFile; do
xmlDocFile=${dllFile%.*}.xml
skip=0
if [[ "$xmlDocFile" == *"/packs/Microsoft.NETCore.App.Ref"* ]]; then
xmlFileBasename=$(basename "$xmlDocFile")
for ignoreItem in "${netcoreappIgnoreList[@]}"; do
if [[ "$ignoreItem" == "$xmlFileBasename" ]]; then
skip=1;
break
fi
done
fi
if [[ "$xmlDocFile" == *"/packs/NETStandard.Library.Ref"* ]]; then
xmlFileBasename=$(basename "$xmlDocFile")
for ignoreItem in "${netstandardIgnoreList[@]}"; do
if [[ "$ignoreItem" == "$xmlFileBasename" ]]; then
skip=1;
break
fi
done
fi
if [[ "$xmlDocFile" == *"/packs/Microsoft.AspNetCore.App.Ref"* ]]; then
xmlFileBasename=$(basename "$xmlDocFile")
for ignoreItem in "${aspnetcoreappIgnoreList[@]}"; do
if [[ "$ignoreItem" == "$xmlFileBasename" ]]; then
skip=1;
break
fi
done
fi
if [[ $skip == 0 ]] && [[ ! -f "$xmlDocFile" ]]; then
error=1
echo "error: missing $xmlDocFile"
fi
if [[ $skip == 1 ]] && [[ -f "$xmlDocFile" ]]; then
error=1
echo "error: Ignored xml doc was found: $xmlDocFile"
fi
done < <(find "$targetingPacksDir" -name '*.dll' -print0)
if [[ $error != 0 ]]; then
echo "error: Missing or unexpected xml documents"
exit 1
else
echo "All expected xml docs are present"
fi
}
function runOmniSharpTests() { function runOmniSharpTests() {
dotnetCmd=${dotnetDir}/dotnet dotnetCmd=${dotnetDir}/dotnet
@ -701,11 +461,7 @@ fi
# Clean up and create directory # Clean up and create directory
if [ -e "$testingDir" ]; then if [ -e "$testingDir" ]; then
read -p "testing-smoke directory exists, remove it? [Y]es / [n]o" -n 1 -r rm -rf "$testingDir"
echo
if [[ $REPLY == "" || $REPLY == " " || $REPLY =~ ^[Yy]$ ]]; then
rm -rf "$testingDir"
fi
fi fi
mkdir -p "$testingDir" mkdir -p "$testingDir"
@ -717,7 +473,7 @@ echo "<Project />" | tee Directory.Build.props > Directory.Build.targets
# Unzip dotnet if the dotnetDir is not specified # Unzip dotnet if the dotnetDir is not specified
if [ "$dotnetDir" == "" ]; then if [ "$dotnetDir" == "" ]; then
OUTPUT_DIR="$SCRIPT_ROOT/artifacts/$buildArch/$configuration/" OUTPUT_DIR="$ARTIFACTS_DIR$buildArch/$configuration/"
DOTNET_TARBALL="$(ls "${OUTPUT_DIR}${TARBALL_PREFIX}${VERSION_PREFIX}"*)" DOTNET_TARBALL="$(ls "${OUTPUT_DIR}${TARBALL_PREFIX}${VERSION_PREFIX}"*)"
mkdir -p "$cliDir" mkdir -p "$cliDir"
@ -734,7 +490,7 @@ echo SDK under test is:
# setup restore path # setup restore path
export NUGET_PACKAGES="$restoredPackagesDir" export NUGET_PACKAGES="$restoredPackagesDir"
SOURCE_BUILT_PKGS_PATH="$SCRIPT_ROOT/artifacts/obj/$buildArch/$configuration/blob-feed/packages/" SOURCE_BUILT_PKGS_PATH="${ARTIFACTS_DIR}obj/$buildArch/$configuration/blob-feed/packages/"
export DOTNET_ROOT="$dotnetDir" export DOTNET_ROOT="$dotnetDir"
export PATH="$dotnetDir:$PATH" export PATH="$dotnetDir:$PATH"
@ -775,8 +531,6 @@ if [ "$excludeOnlineTests" == "false" ]; then
echo "ONLINE RESTORE SOURCE - ALL TESTS PASSED!" echo "ONLINE RESTORE SOURCE - ALL TESTS PASSED!"
fi fi
runXmlDocTests
if [ "$excludeOmniSharpTests" == "false" ]; then if [ "$excludeOmniSharpTests" == "false" ]; then
runOmniSharpTests runOmniSharpTests
fi fi