diff tests/run-tests.py @ 28455:412ee35a8005

chg: do not write pidfile Current pidfile logic will only keep the pid of the newest server, which is not very useful if we want to kill all servers, and will become outdated if the server auto exits after being idle for too long. Besides, the server-side pidfile writing logic runs before chgserver gets confighash so it's not trivial to append confighash to pidfile basename like we did for socket file. This patch removes --pidfile from the command starting chgserver and switches to an alternative way (unlink socket file) to stop the server.
author Jun Wu <quark@fb.com>
date Thu, 10 Mar 2016 00:19:55 +0000
parents 98a1a9547bb1
children 4a908089fe29
line wrap: on
line diff
--- a/tests/run-tests.py	Thu Mar 10 00:12:33 2016 +0000
+++ b/tests/run-tests.py	Thu Mar 10 00:19:55 2016 +0000
@@ -2384,9 +2384,9 @@
     def _killchgdaemons(self):
         """Kill all background chg command servers spawned by tests"""
         for f in os.listdir(self._chgsockdir):
-            if not f.endswith(b'.pid'):
+            if '.' in f:
                 continue
-            killdaemons(os.path.join(self._chgsockdir, f))
+            os.unlink(os.path.join(self._chgsockdir, f))
 
     def _outputcoverage(self):
         """Produce code coverage output."""