GeezerVison is showing github.com — test: runner should return 0 on flaky tests · nodejs/node@8f8ab6f
File tree
Expand file treeCollapse file tree
Open diff view settings
Expand file treeCollapse file tree
Open diff view settings
Collapse file
Copy file name to clipboardExpand all lines: tools/test.py +10-3Lines changed: 10 additions & 3 deletions | Original file line number | Diff line number | Diff line change |
|---|
@@ -75,7 +75,9 @@ def __init__(self, cases, flaky_tests_mode): |
75 | 75 | self.remaining = len(cases) |
76 | 76 | self.total = len(cases) |
77 | 77 | self.failed = [ ] |
| 78 | + self.flaky_failed = [ ] |
78 | 79 | self.crashed = 0 |
| 80 | + self.flaky_crashed = 0 |
79 | 81 | self.lock = threading.Lock() |
80 | 82 | self.shutdown_event = threading.Event() |
81 | 83 |
|
@@ -143,9 +145,14 @@ def RunSingle(self, parallel, thread_id): |
143 | 145 | return |
144 | 146 | self.lock.acquire() |
145 | 147 | if output.UnexpectedOutput(): |
146 | | - self.failed.append(output) |
147 | | - if output.HasCrashed(): |
148 | | - self.crashed += 1 |
| 148 | + if FLAKY in output.test.outcomes and self.flaky_tests_mode == DONTCARE: |
| 149 | + self.flaky_failed.append(output) |
| 150 | + if output.HasCrashed(): |
| 151 | + self.flaky_crashed += 1 |
| 152 | + else: |
| 153 | + self.failed.append(output) |
| 154 | + if output.HasCrashed(): |
| 155 | + self.crashed += 1 |
149 | 156 | else: |
150 | 157 | self.succeeded += 1 |
151 | 158 | self.remaining -= 1 |
|