test-revert: temporarily sort by input states instead of output filename
authorMartin von Zweigbergk <martinvonz@google.com>
Fri, 17 Oct 2014 06:27:43 -0700
changeset 23158 33a67fa048bf
parent 23157 0e80564a6f3c
child 23159 20d3e2d73432
test-revert: temporarily sort by input states instead of output filename The next patch will change the names of the files produced by the script in test-revert. In order to reduce the size and increase the clarity of the next patch, make the order produced by the internal 'gen-revert-cases.py filelist' command independent of the filenames.
tests/test-revert.t
--- a/tests/test-revert.t	Sat Oct 18 22:23:19 2014 -0700
+++ b/tests/test-revert.t	Fri Oct 17 06:27:43 2014 -0700
@@ -465,8 +465,8 @@
   > 
   > # build the combination of possible states
   > combination = []
-  > for ctxkey, ctxvalue in ctxcontent.iteritems():
-  >     for wckey in wccontent:
+  > for ctxkey, ctxvalue in sorted(ctxcontent.iteritems()):
+  >     for wckey in sorted(wccontent):
   >         base, parent = ctxvalue
   >         if (base == parent and 'revert' in wckey):
   >             continue
@@ -478,9 +478,6 @@
   >         combination.append((filename, base, parent,
   >                             wccontent[wckey](ctxvalue)))
   > 
-  > # make sure we have stable output
-  > combination.sort()
-  > 
   > # retrieve the state we must generate
   > target = sys.argv[1]
   >