aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChornyi, TarasX <tarasx.chornyi@intel.com>2018-09-28 11:43:19 +0300
committerAbhijit Sinha <abhijit.sinha@intel.com>2018-11-05 14:25:16 +0000
commitdd5b689629437bfa1c40d00ae40d664c5f19b0d5 (patch)
tree240ce7d9448e8e5954e2f795200eaf4e2148e00b
parentb08ec122e407dee72514adbe14feb2314ec0245e (diff)
Fix python lib path for ixload control subprocess
JIRA: YARDSTICK-1390 Change-Id: I3ef5242862c98d3b389ba127f909f47e26c0711d Signed-off-by: Chornyi, TarasX <tarasx.chornyi@intel.com> (cherry picked from commit 376720a9ff56a9e71b6bc63b1d621f0c600088e1)
-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