Patchwork D8720: tests: stablize test-serve.t on Windows

login
register
mail settings
Submitter phabricator
Date July 10, 2020, 3:13 a.m.
Message ID <differential-rev-PHID-DREV-35ci24koxhoyycdirc7f-req@mercurial-scm.org>
Download mbox | patch
Permalink /patch/46678/
State Superseded
Headers show

Comments

phabricator - July 10, 2020, 3:13 a.m.
mharbison72 created this revision.
Herald added a reviewer: hg-reviewers.
Herald added a subscriber: mercurial-patches.

REVISION SUMMARY
  I forget the reason that the subprocess on Windows doesn't print this, but all
  other instances of this are similarly conditionalized, so I didn't think too
  hard about it.
  
  Also, the server needs to be killed so it doesn't prevent the next run from
  working, especially since the port isn't randomized.

REPOSITORY
  rHG Mercurial

BRANCH
  stable

REVISION DETAIL
  https://phab.mercurial-scm.org/D8720

AFFECTED FILES
  tests/test-serve.t

CHANGE DETAILS




To: mharbison72, #hg-reviewers
Cc: mercurial-patches, mercurial-devel

Patch

diff --git a/tests/test-serve.t b/tests/test-serve.t
--- a/tests/test-serve.t
+++ b/tests/test-serve.t
@@ -103,7 +103,10 @@ 
 
 issue6362: Previously, this crashed on Python 3
 
-  $ hg serve -a 0.0.0.0 -d
-  listening at http://*:$HGPORT1/ (bound to *:$HGPORT1) (glob)
+  $ hg serve -a 0.0.0.0 -d --pid-file=hg.pid
+  listening at http://*:$HGPORT1/ (bound to *:$HGPORT1) (glob) (?)
+
+  $ cat hg.pid > "$DAEMON_PIDS"
+  $ "$PYTHON" $RUNTESTDIR/killdaemons.py $DAEMON_PIDS
 
   $ cd ..