comparison 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
comparison
equal deleted inserted replaced
28454:8062869860b8 28455:412ee35a8005
2382 sys.exit(1) 2382 sys.exit(1)
2383 2383
2384 def _killchgdaemons(self): 2384 def _killchgdaemons(self):
2385 """Kill all background chg command servers spawned by tests""" 2385 """Kill all background chg command servers spawned by tests"""
2386 for f in os.listdir(self._chgsockdir): 2386 for f in os.listdir(self._chgsockdir):
2387 if not f.endswith(b'.pid'): 2387 if '.' in f:
2388 continue 2388 continue
2389 killdaemons(os.path.join(self._chgsockdir, f)) 2389 os.unlink(os.path.join(self._chgsockdir, f))
2390 2390
2391 def _outputcoverage(self): 2391 def _outputcoverage(self):
2392 """Produce code coverage output.""" 2392 """Produce code coverage output."""
2393 from coverage import coverage 2393 from coverage import coverage
2394 2394