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

This commit is contained in:
Logan Bussell 2022-07-06 19:08:12 -07:00 committed by GitHub
parent 8e717e1b99
commit f5683bb85d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 1 deletions

View file

@ -174,6 +174,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);