Write and upload updated baselines for source-build content tests (#16088)

Co-authored-by: Logan Bussell <loganbussell@microsoft.com>
This commit is contained in:
Matt Thalman 2023-04-13 09:21:52 -05:00 committed by GitHub
parent 013a5c821e
commit 668276750a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 1 deletions

View file

@ -182,6 +182,8 @@ jobs:
find src/ -type f -name "*.binlog" -exec cp {} --parents -t ${targetFolder} \;
find src/ -type f -name "*.log" -exec cp {} --parents -t ${targetFolder} \;
find test/ -type f -name "*.binlog" -exec cp {} --parents -t ${targetFolder} \;
find test/ -type f -name "Updated*.diff" -exec cp {} --parents -t ${targetFolder} \;
find test/ -type f -name "Updated*.txt" -exec cp {} --parents -t ${targetFolder} \;
displayName: Prepare BuildLogs staging directory
continueOnError: true
condition: succeededOrFailed()

View file

@ -37,7 +37,7 @@ namespace Microsoft.DotNet.SourceBuild.SmokeTests
public static void CompareContents(string baselineFileName, string actualContents, ITestOutputHelper outputHelper, bool warnOnDiffs = false)
{
string actualFilePath = Path.Combine(Environment.CurrentDirectory, $"{baselineFileName}");
string actualFilePath = Path.Combine(DotNetHelper.LogsDirectory, $"Updated{baselineFileName}");
File.WriteAllText(actualFilePath, actualContents);
CompareFiles(baselineFileName, actualFilePath, outputHelper, warnOnDiffs);