diff tests/test-run-tests.t @ 27602:67aa88e00fc7

run-tests: fix get port to try differing ports The code was moving its offset each time through the loop, but because it failed to update port, the port was not going to be available...
author timeless <timeless@mozdev.org>
date Tue, 29 Dec 2015 04:30:38 +0000
parents 54bc0e884385
children df142b77b4c2
line wrap: on
line diff
--- a/tests/test-run-tests.t	Thu Dec 31 13:19:20 2015 -0500
+++ b/tests/test-run-tests.t	Tue Dec 29 04:30:38 2015 +0000
@@ -223,6 +223,20 @@
   [1]
   $ rm test-serve-fail.t
 
+Verify that we can try other ports
+===================================
+  $ hg init inuse
+  $ hg serve -R inuse -p $HGPORT -d --pid-file=blocks.pid
+  $ cat blocks.pid >> $DAEMON_PIDS
+  $ cat > test-serve-inuse.t <<EOF
+  >   $ hg serve -R `pwd`/inuse -p \$HGPORT -d --pid-file=hg.pid
+  >   $ cat hg.pid >> \$DAEMON_PIDS
+  > EOF
+  $ rt test-serve-inuse.t
+  .
+  # Ran 1 tests, 0 skipped, 0 warned, 0 failed.
+  $ rm test-serve-inuse.t
+
 Running In Debug Mode
 ======================