summaryrefslogtreecommitdiffstats
path: root/unitest-xmlrpc.py
diff options
context:
space:
mode:
authorEmmanuel Roullit <emmanuel.roullit@gmail.com>2015-07-20 11:59:40 +0200
committerEmmanuel Roullit <emmanuel.roullit@gmail.com>2015-07-20 11:59:40 +0200
commit485f2203e05593eb3c849081f65605cab9c26163 (patch)
tree326fb0766f70f55b920e2f9d9b7b7745e9af09e8 /unitest-xmlrpc.py
parent49c3c6c6be83ffa73e1a42f26fc2b65f51fe93c1 (diff)
unittest: start server in a modified environment.
This changes allows the user to run the unittests properly in a virtualenv setup. Once the venv activated, /usr/bin/env will point the python executable within the venv instead of the system one. Signed-off-by: Emmanuel Roullit <emmanuel.roullit@gmail.com>
Diffstat (limited to 'unitest-xmlrpc.py')
-rwxr-xr-xunitest-xmlrpc.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/unitest-xmlrpc.py b/unitest-xmlrpc.py
index a6ea3083..6e71279e 100755
--- a/unitest-xmlrpc.py
+++ b/unitest-xmlrpc.py
@@ -86,7 +86,7 @@ class TestGlances(unittest.TestCase):
global pid
- cmdline = "/usr/bin/python -m glances -s -p %s" % SERVER_PORT
+ cmdline = "/usr/bin/env python -m glances -s -p %s" % SERVER_PORT
print("Run the Glances Server on port %s" % SERVER_PORT)
args = shlex.split(cmdline)
pid = subprocess.Popen(args)