redo.py: shuffle the list of targets.
This encourages greater randomness in builds, which both decreases lock contention and should help with testing the consistency of parallel builds.
This commit is contained in:
parent
bd5daf9754
commit
9d5afd67f0
1 changed files with 2 additions and 1 deletions
3
redo.py
3
redo.py
|
|
@ -1,5 +1,5 @@
|
||||||
#!/usr/bin/python
|
#!/usr/bin/python
|
||||||
import sys, os, subprocess, glob, time
|
import sys, os, subprocess, glob, time, random
|
||||||
import options, jwack
|
import options, jwack
|
||||||
|
|
||||||
optspec = """
|
optspec = """
|
||||||
|
|
@ -146,6 +146,7 @@ def main():
|
||||||
retcode = 0
|
retcode = 0
|
||||||
locked = {}
|
locked = {}
|
||||||
waits = {}
|
waits = {}
|
||||||
|
random.shuffle(targets) # make it unpredictable for better testing
|
||||||
for t in targets:
|
for t in targets:
|
||||||
if os.path.exists('%s/all.do' % t):
|
if os.path.exists('%s/all.do' % t):
|
||||||
# t is a directory, but it has a default target
|
# t is a directory, but it has a default target
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue