From 9d5afd67f09345cb87a3be2cc46a436d76522246 Mon Sep 17 00:00:00 2001 From: Avery Pennarun Date: Sat, 13 Nov 2010 04:42:13 -0800 Subject: [PATCH] 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. --- redo.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/redo.py b/redo.py index 57db064..9cc2c25 100755 --- a/redo.py +++ b/redo.py @@ -1,5 +1,5 @@ #!/usr/bin/python -import sys, os, subprocess, glob, time +import sys, os, subprocess, glob, time, random import options, jwack optspec = """ @@ -146,6 +146,7 @@ def main(): retcode = 0 locked = {} waits = {} + random.shuffle(targets) # make it unpredictable for better testing for t in targets: if os.path.exists('%s/all.do' % t): # t is a directory, but it has a default target