aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChornyi, TarasX <tarasx.chornyi@intel.com>2018-09-28 11:43:19 +0300
committerTaras Chornyi <tarasx.chornyi@intel.com>2018-10-11 08:44:11 +0000
commit376720a9ff56a9e71b6bc63b1d621f0c600088e1 (patch)
treea2aee3cb285ea32dc939998ac3db31e10d097491
parentee5d6413dbcbab40234e47ed3e74b85b704d6493 (diff)
Fix python lib path for ixload control subprocess
JIRA: YARDSTICK-1390 Change-Id: I3ef5242862c98d3b389ba127f909f47e26c0711d Signed-off-by: Chornyi, TarasX <tarasx.chornyi@intel.com>
-rw-r--r--yardstick/network_services/traffic_profile/http_ixload.py10
1 files changed, 9 insertions, 1 deletions
diff --git a/yardstick/network_services/traffic_profile/http_ixload.py b/yardstick/network_services/traffic_profile/http_ixload.py
index 6cbdb8ab2..39ee16b42 100644
--- a/yardstick/network_services/traffic_profile/http_ixload.py
+++ b/yardstick/network_services/traffic_profile/http_ixload.py
@@ -16,6 +16,14 @@ import sys
import os
import logging
import collections
+import subprocess
+try:
+ libs = subprocess.check_output(
+ 'python -c "import site; print(site.getsitepackages())"', shell=True)
+
+ sys.path.extend(libs[1:-1].replace("'", "").split(','))
+except subprocess.CalledProcessError:
+ pass
# ixload uses its own py2. So importing jsonutils fails. So adding below
# workaround to support call from yardstick
@@ -24,7 +32,7 @@ try:
except ImportError:
import json as jsonutils
-from yardstick.common import exceptions
+from yardstick.common import exceptions #pylint: disable=wrong-import-position
try:
from IxLoad import IxLoad, StatCollectorUtils