Skip to content

Commit 57dc27b

Browse files
Log exceptions from the failed step in perf test environment (Azure#17629)
1 parent e20cdf4 commit 57dc27b

File tree

1 file changed

+19
-1
lines changed

1 file changed

+19
-1
lines changed

common/Perf/Azure.Test.Perf/PerfProgram.cs

Lines changed: 19 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ private static async Task Run(Type testType, PerfOptions options)
6666
Console.WriteLine("=== Versions ===");
6767
Console.WriteLine($"Runtime: {Environment.Version}");
6868
var azureAssemblies = testType.Assembly.GetReferencedAssemblies()
69-
.Where(a => a.Name.StartsWith("Azure", StringComparison.OrdinalIgnoreCase))
69+
.Where(a => a.Name.StartsWith("Azure", StringComparison.OrdinalIgnoreCase) || a.Name.StartsWith("Microsoft.Azure", StringComparison.OrdinalIgnoreCase))
7070
.Where(a => !a.Name.Equals("Azure.Test.Perf", StringComparison.OrdinalIgnoreCase))
7171
.OrderBy(a => a.Name);
7272
foreach (var a in azureAssemblies)
@@ -121,6 +121,19 @@ private static async Task Run(Type testType, PerfOptions options)
121121
await RunTestsAsync(tests, options, title);
122122
}
123123
}
124+
catch (AggregateException ae)
125+
{
126+
foreach (Exception e in ae.InnerExceptions)
127+
{
128+
Console.WriteLine($"Exception: {e}");
129+
}
130+
throw;
131+
}
132+
catch (Exception e)
133+
{
134+
Console.WriteLine($"Exception: {e}");
135+
throw;
136+
}
124137
finally
125138
{
126139
if (!options.NoCleanup)
@@ -134,6 +147,11 @@ private static async Task Run(Type testType, PerfOptions options)
134147
}
135148
}
136149
}
150+
catch (Exception e)
151+
{
152+
Console.WriteLine($"Exception: {e}");
153+
throw;
154+
}
137155
finally
138156
{
139157
if (!options.NoCleanup)

0 commit comments

Comments
 (0)