summaryrefslogtreecommitdiff
path: root/test/pacman/util.py
diff options
context:
space:
mode:
authorDan McGee <dan@archlinux.org>2011-01-22 16:11:33 -0600
committerDan McGee <dan@archlinux.org>2011-01-22 16:29:32 -0600
commita99e7272b8703e54b3c96ac0fdb7fe7eacfabbe8 (patch)
tree65d3bf3f105c73627cb34331505ea0d6b9e5cf25 /test/pacman/util.py
parentb3d71bf7d0ef8f577114bc39abecdc7ade0395dd (diff)
pactest: sort repos by alpha order in config file
The order was non-deterministic before, and just happened to work for sync023.py as it was written. Ensure there is some sort of predictable ordering. Signed-off-by: Dan McGee <dan@archlinux.org>
Diffstat (limited to 'test/pacman/util.py')
-rwxr-xr-xtest/pacman/util.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/test/pacman/util.py b/test/pacman/util.py
index 652467ae..359b42bf 100755
--- a/test/pacman/util.py
+++ b/test/pacman/util.py
@@ -125,8 +125,11 @@ def mkcfgfile(filename, root, option, db):
data.extend(["%s = %s" % (key, j) for j in value])
# Repositories
- for key, value in db.iteritems():
+ # sort by repo name so tests can predict repo order, rather than be
+ # subjects to the whims of python dict() ordering
+ for key in sorted(db.iterkeys()):
if key != "local":
+ value = db[key]
data.append("[%s]\n" \
"Server = file://%s" \
% (value.treename,