Commit b6e31df
authored
Add standard output and error when a test fails and does not display it (#7847)
## Summary of changes
We get [some CI errors
](https://dev.azure.com/datadoghq/dd-trace-dotnet/_build/results?buildId=191248&view=logs&j=5635f724-ec42-5e82-7816-fb263b6cfcc0&t=e80b9b00-921f-539a-741c-f91926c040ef)in
tests caused by a non 0 exit code from a sample but we get no output
from the sample itself.
This PR improves error reporting when tests fail due to non-zero exit
codes by ensuring that process stdout and stderr are logged to the test
output before assertions fail. This makes debugging CI failures
significantly easier, especially for signal-related crashes (SIGABRT,
SIGSEGV, etc.).
## Reason for change
## Implementation details
## Test coverage
## Other details
<!-- Fixes #{issue} -->
<!-- 1 parent c6a2350 commit b6e31df
File tree
4 files changed
+24
-5
lines changed- profiler/test/Datadog.Profiler.IntegrationTests/Helpers
- tracer/test
- Datadog.Trace.Debugger.IntegrationTests/Helpers
- Datadog.Trace.TestHelpers.AutoInstrumentation
4 files changed
+24
-5
lines changedLines changed: 10 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
235 | 235 | | |
236 | 236 | | |
237 | 237 | | |
238 | | - | |
239 | | - | |
240 | | - | |
| 238 | + | |
| 239 | + | |
| 240 | + | |
| 241 | + | |
| 242 | + | |
| 243 | + | |
| 244 | + | |
| 245 | + | |
| 246 | + | |
| 247 | + | |
241 | 248 | | |
242 | 249 | | |
243 | 250 | | |
| |||
Lines changed: 11 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
8 | 8 | | |
9 | 9 | | |
10 | 10 | | |
| 11 | + | |
11 | 12 | | |
12 | 13 | | |
13 | 14 | | |
| |||
17 | 18 | | |
18 | 19 | | |
19 | 20 | | |
| 21 | + | |
20 | 22 | | |
21 | | - | |
| 23 | + | |
22 | 24 | | |
23 | 25 | | |
24 | 26 | | |
25 | 27 | | |
| 28 | + | |
26 | 29 | | |
27 | 30 | | |
28 | 31 | | |
| |||
36 | 39 | | |
37 | 40 | | |
38 | 41 | | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
39 | 49 | | |
40 | 50 | | |
41 | 51 | | |
| |||
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
68 | 68 | | |
69 | 69 | | |
70 | 70 | | |
71 | | - | |
| 71 | + | |
72 | 72 | | |
73 | 73 | | |
74 | 74 | | |
| |||
Lines changed: 2 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
71 | 71 | | |
72 | 72 | | |
73 | 73 | | |
| 74 | + | |
| 75 | + | |
74 | 76 | | |
75 | 77 | | |
76 | 78 | | |
| |||
0 commit comments