Patchwork D3443: tests: remove pid file by default

login
register
mail settings
Submitter phabricator
Date May 6, 2018, 12:20 p.m.
Message ID <78670fd370a6687fb04bf52e03a357ae@localhost.localdomain>
Download mbox | patch
Permalink /patch/31291/
State Not Applicable
Headers show

Comments

phabricator - May 6, 2018, 12:20 p.m.
This revision was automatically updated to reflect the committed changes.
Closed by commit rHG89793289c891: tests: remove pid file by default (authored by indygreg, committed by ).

REPOSITORY
  rHG Mercurial

CHANGES SINCE LAST UPDATE
  https://phab.mercurial-scm.org/D3443?vs=8458&id=8473

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

AFFECTED FILES
  tests/killdaemons.py
  tests/test-lfs-test-server.t
  tests/test-obsolete.t
  tests/test-run-tests.t
  tests/test-serve.t

CHANGE DETAILS




To: indygreg, #hg-reviewers
Cc: 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
@@ -6,10 +6,11 @@ 
   >        | sed -e "s/:$HGPORT1\\([^0-9]\\)/:HGPORT1\1/g" \
   >              -e "s/:$HGPORT2\\([^0-9]\\)/:HGPORT2\1/g" \
   >              -e 's/http:\/\/[^/]*\//http:\/\/localhost\//'
-  >    cat hg.pid >> "$DAEMON_PIDS"
+  >    if [ -f hg.pid ]; then
+  >        killdaemons.py hg.pid
+  >    fi
   >    echo % errors
   >    cat errors.log
-  >    killdaemons.py hg.pid
   > }
 
   $ hg init test
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
@@ -574,7 +574,6 @@ 
   # Ran 1 tests, 0 skipped, 0 failed.
   $ rm test-serve-inuse.t
   $ killdaemons.py $DAEMON_PIDS
-  $ rm $DAEMON_PIDS
 
 Running In Debug Mode
 ======================
diff --git a/tests/test-obsolete.t b/tests/test-obsolete.t
--- a/tests/test-obsolete.t
+++ b/tests/test-obsolete.t
@@ -931,7 +931,7 @@ 
   $ echo "evolution.exchange=True" >> $HGRCPATH
   $ echo "evolution.createmarkers=True" >> $HGRCPATH
 
-  $ rm hg.pid access.log errors.log
+  $ rm access.log errors.log
 #endif
 
 Several troubles on the same changeset (create an unstable and bumped changeset)
diff --git a/tests/test-lfs-test-server.t b/tests/test-lfs-test-server.t
--- a/tests/test-lfs-test-server.t
+++ b/tests/test-lfs-test-server.t
@@ -880,7 +880,6 @@ 
   $LOCALIP - - [$LOGDATE$] "POST /.git/info/lfs/objects/batch HTTP/1.1" 200 - (glob)
 #endif
 
-  $ rm $DAEMON_PIDS
   $ mkdir $TESTTMP/lfs-server2
   $ cd $TESTTMP/lfs-server2
 #if no-windows git-server
diff --git a/tests/killdaemons.py b/tests/killdaemons.py
--- a/tests/killdaemons.py
+++ b/tests/killdaemons.py
@@ -124,4 +124,4 @@ 
     else:
         path = os.environ["DAEMON_PIDS"]
 
-    killdaemons(path)
+    killdaemons(path, remove=True)