File flaky_test_rerun.patch of Package nodejs16
22
1
Index: node-v16.13.0/tools/test.py
2
===================================================================
3
--- node-v16.13.0.orig/tools/test.py
4
+++ node-v16.13.0/tools/test.py
5
6
self.context.store_unexpected_output)
7
8
def Run(self):
9
+ reruns = 0
10
+ while (reruns < 5):
11
+ reruns += 1
12
+ result = self.OriginalRun()
13
+ if (not result.HasFailed()):
14
+ break
15
+ print("FLAKY TEST rerun: ", self.GetCommand())
16
+ return result
17
+
18
+ def OriginalRun(self):
19
try:
20
result = self.RunCommand(self.GetCommand(), {
21
"TEST_SERIAL_ID": "%d" % self.serial_id,
22