Improve crash/hang support in helix (#24489)
This commit is contained in:
parent
723e32a47d
commit
130ec438fd
|
|
@ -247,7 +247,7 @@ namespace RunTests
|
|||
{
|
||||
// Timeout test run 5 minutes before the Helix job would timeout
|
||||
var cts = new CancellationTokenSource(Options.Timeout.Subtract(TimeSpan.FromMinutes(5)));
|
||||
var commonTestArgs = $"vstest {Options.Target} --logger:xunit --logger:\"console;verbosity=normal\" --blame";
|
||||
var commonTestArgs = $"test {Options.Target} --logger:xunit --logger:\"console;verbosity=normal\" --blame \"CollectHangDump;TestTimeout=5m\"";
|
||||
if (Options.Quarantined)
|
||||
{
|
||||
Console.WriteLine("Running quarantined tests.");
|
||||
|
|
@ -331,6 +331,22 @@ namespace RunTests
|
|||
{
|
||||
Console.WriteLine("No logs found in artifacts/log");
|
||||
}
|
||||
Console.WriteLine($"Copying TestResults/**/*.dmp to {HELIX_WORKITEM_UPLOAD_ROOT}/");
|
||||
if (Directory.Exists("TestResults"))
|
||||
{
|
||||
foreach (var file in Directory.EnumerateFiles("TestResults", "*.dmp", SearchOption.AllDirectories))
|
||||
{
|
||||
var fileName = Path.GetFileName(file);
|
||||
Console.WriteLine($"Copying: {file} to {Path.Combine(HELIX_WORKITEM_UPLOAD_ROOT, fileName)}");
|
||||
// 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
|
||||
File.Copy(file, Path.Combine(HELIX_WORKITEM_UPLOAD_ROOT, fileName));
|
||||
File.Copy(file, Path.Combine(HELIX_WORKITEM_UPLOAD_ROOT, "..", fileName));
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
Console.WriteLine("No dmps found in TestResults");
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue