diff --git a/src/SourceBuild/tarball/content/test/Microsoft.DotNet.SourceBuild.SmokeTests/BaselineHelper.cs b/src/SourceBuild/tarball/content/test/Microsoft.DotNet.SourceBuild.SmokeTests/BaselineHelper.cs index 8070b2576..32a23d76f 100644 --- a/src/SourceBuild/tarball/content/test/Microsoft.DotNet.SourceBuild.SmokeTests/BaselineHelper.cs +++ b/src/SourceBuild/tarball/content/test/Microsoft.DotNet.SourceBuild.SmokeTests/BaselineHelper.cs @@ -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); } } } diff --git a/src/SourceBuild/tarball/content/test/Microsoft.DotNet.SourceBuild.SmokeTests/XmlDocTests.cs b/src/SourceBuild/tarball/content/test/Microsoft.DotNet.SourceBuild.SmokeTests/XmlDocTests.cs index e99125700..00c0c2b79 100644 --- a/src/SourceBuild/tarball/content/test/Microsoft.DotNet.SourceBuild.SmokeTests/XmlDocTests.cs +++ b/src/SourceBuild/tarball/content/test/Microsoft.DotNet.SourceBuild.SmokeTests/XmlDocTests.cs @@ -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); } } diff --git a/src/SourceBuild/tarball/content/test/Microsoft.DotNet.SourceBuild.SmokeTests/assets/baselines/MissingXmlDoc.txt b/src/SourceBuild/tarball/content/test/Microsoft.DotNet.SourceBuild.SmokeTests/assets/baselines/MissingXmlDoc.txt index 8db91d9d7..38f80e186 100644 --- a/src/SourceBuild/tarball/content/test/Microsoft.DotNet.SourceBuild.SmokeTests/assets/baselines/MissingXmlDoc.txt +++ b/src/SourceBuild/tarball/content/test/Microsoft.DotNet.SourceBuild.SmokeTests/assets/baselines/MissingXmlDoc.txt @@ -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