Patchwork [09,of,11,FOR-REFERENCE] test-run-tests.t: tests --jobs option

login
register
mail settings
Submitter Pierre-Yves David
Date June 2, 2014, 7:54 p.m.
Message ID <583b86b30cd591b09461.1401738884@marginatus.alto.octopoid.net>
Download mbox | patch
Permalink /patch/4922/
State Accepted
Commit 395e29928db23da55d2ac42d44d146af2f6b8f7b
Headers show

Comments

Pierre-Yves David - June 2, 2014, 7:54 p.m.
# HG changeset patch
# User Pierre-Yves David <pierre-yves.david@fb.com>
# Date 1401477123 25200
#      Fri May 30 12:12:03 2014 -0700
# Node ID 583b86b30cd591b09461083a123ff69cb87b12df
# Parent  dc6d787b019c310f4d5963fcdfec8f25cbe13a76
test-run-tests.t: tests --jobs option

Patch

diff --git a/tests/test-run-tests.t b/tests/test-run-tests.t
--- a/tests/test-run-tests.t
+++ b/tests/test-run-tests.t
@@ -105,5 +105,41 @@  Running In Debug Mode
   babar
   + echo SALT* 2 0 (glob)
   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
+