test-run-tests.t: tests --jobs option
authorPierre-Yves David <pierre-yves.david@fb.com>
Fri, 30 May 2014 12:12:03 -0700
changeset 21744 395e29928db2
parent 21743 d72bea858cbd
child 21745 4c62478be2ea
test-run-tests.t: tests --jobs option
tests/test-run-tests.t
--- a/tests/test-run-tests.t	Fri May 30 12:11:51 2014 -0700
+++ b/tests/test-run-tests.t	Fri May 30 12:12:03 2014 -0700
@@ -107,3 +107,39 @@
   SALT* 2 0 (glob)
   .
   # Ran 2 tests, 0 skipped, 0 warned, 0 failed.
+
+Parallel runs
+==============
+
+(duplicate the failing test to get predictable output)
+  $ cp test-failure.t test-failure-copy.t
+
+  $ $TESTDIR/run-tests.py --with-hg=`which hg` --jobs 2 test-failure*.t
+  
+  --- $TESTTMP/test-failure*.t (glob)
+  +++ $TESTTMP/test-failure*.t.err (glob)
+  @@ -1,2 +1,2 @@
+     $ echo babar
+  -  rataxes
+  +  babar
+  
+  ERROR: test-failure*.t output changed (glob)
+  !
+  --- $TESTTMP/test-failure*.t (glob)
+  +++ $TESTTMP/test-failure*.t.err (glob)
+  @@ -1,2 +1,2 @@
+     $ echo babar
+  -  rataxes
+  +  babar
+  
+  ERROR: test-failure*.t output changed (glob)
+  !
+  Failed test-failure*.t: output changed (glob)
+  Failed test-failure*.t: output changed (glob)
+  # Ran 2 tests, 0 skipped, 0 warned, 2 failed.
+  python hash seed: * (glob)
+  [1]
+
+(delete the duplicated test file)
+  $ rm test-failure-copy.t
+