Patchwork [2,of,7] tests: make killdaemons.py use DAEMON_PIDS by default

login
register
mail settings
Submitter Matt Mackall
Date June 8, 2015, 10:52 p.m.
Message ID <5f79c9bae94e73c80872.1433803922@ruin.waste.org>
Download mbox | patch
Permalink /patch/9560/
State Accepted
Delegated to: Pierre-Yves David
Headers show

Comments

Matt Mackall - June 8, 2015, 10:52 p.m.
# HG changeset patch
# User Matt Mackall <mpm@selenic.com>
# Date 1433791305 18000
#      Mon Jun 08 14:21:45 2015 -0500
# Node ID 5f79c9bae94e73c8087229f91e0d55de39b104d5
# Parent  76bcb941ef7cd6811bda0b40c4af1ec02e76dc30
tests: make killdaemons.py use DAEMON_PIDS by default

Patch

diff -r 76bcb941ef7c -r 5f79c9bae94e tests/killdaemons.py
--- a/tests/killdaemons.py	Mon Jun 08 14:44:30 2015 -0500
+++ b/tests/killdaemons.py	Mon Jun 08 14:21:45 2015 -0500
@@ -87,5 +87,9 @@ 
         pass
 
 if __name__ == '__main__':
-    path, = sys.argv[1:]
+    if len(sys.argv) > 1:
+        path, = sys.argv[1:]
+    else:
+        path = os.environ["DAEMON_PIDS"]
+
     killdaemons(path)