Skip to content

Commit 31755f9

Browse files
committed
Upload all dmp files under TestResults
1 parent 771f946 commit 31755f9

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed

eng/helix/content/RunTests/TestRunner.cs

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -331,6 +331,22 @@ public void UploadResults()
331331
{
332332
Console.WriteLine("No logs found in artifacts/log");
333333
}
334+
Console.WriteLine($"Copying TestResults/**/*.dmp to {HELIX_WORKITEM_UPLOAD_ROOT}/");
335+
if (Directory.Exists("TestResults"))
336+
{
337+
foreach (var file in Directory.EnumerateFiles("TestResults", "*.dmp", SearchOption.AllDirectories))
338+
{
339+
// Combine the directory name + log name for the copied log file name to avoid overwriting duplicate test names in different test projects
340+
Console.WriteLine($"Copying: {file} to {Path.Combine(HELIX_WORKITEM_UPLOAD_ROOT, file)}");
341+
// Need to copy to HELIX_WORKITEM_UPLOAD_ROOT and HELIX_WORKITEM_UPLOAD_ROOT/../ in order for Azure Devops attachments to link properly and for Helix to store the logs
342+
File.Copy(file, Path.Combine(HELIX_WORKITEM_UPLOAD_ROOT, file));
343+
File.Copy(file, Path.Combine(HELIX_WORKITEM_UPLOAD_ROOT, "..", file));
344+
}
345+
}
346+
else
347+
{
348+
Console.WriteLine("No dmps found in TestResults");
349+
}
334350
}
335351
}
336352
}

0 commit comments

Comments
 (0)