summaryrefslogtreecommitdiffstats
path: root/scripts/automation/trex_control_plane
diff options
context:
space:
mode:
authorimarom <imarom@cisco.com>2016-01-11 04:30:39 -0500
committerimarom <imarom@cisco.com>2016-01-11 05:48:04 -0500
commit816e2e3b844c009efe698adc97cd67286e13584e (patch)
tree86792e42cdaa332346c18a6c5f79cd1bdfc9a1fb /scripts/automation/trex_control_plane
parent8ef7485303273dbdf9291cc16c6f32450786333e (diff)
small problem in the stl simulation
Diffstat (limited to 'scripts/automation/trex_control_plane')
-rw-r--r--scripts/automation/trex_control_plane/client/trex_stateless_sim.py7
-rwxr-xr-xscripts/automation/trex_control_plane/client_utils/external_packages.py9
2 files changed, 9 insertions, 7 deletions
diff --git a/scripts/automation/trex_control_plane/client/trex_stateless_sim.py b/scripts/automation/trex_control_plane/client/trex_stateless_sim.py
index d38411a3..32bd2de3 100644
--- a/scripts/automation/trex_control_plane/client/trex_stateless_sim.py
+++ b/scripts/automation/trex_control_plane/client/trex_stateless_sim.py
@@ -24,13 +24,12 @@ except ImportError:
# support import for Python 3
import client.outer_packages
-from client_utils.jsonrpc_client import JsonRpcClient, BatchMessage
-from client_utils.packet_builder import CTRexPktBuilder
+from common.trex_streams import *
from client_utils import parsing_opts
import json
-from common.trex_streams import *
+
import argparse
import tempfile
@@ -138,7 +137,7 @@ class SimRun(object):
def execute_bp_sim (self, json_filename):
- exe = 'bp-sim-64' if self.options.release else 'bp-sim-64-debug'
+ exe = './bp-sim-64' if self.options.release else './bp-sim-64-debug'
if not os.path.exists(exe):
print "cannot find executable '{0}'".format(exe)
exit(-1)
diff --git a/scripts/automation/trex_control_plane/client_utils/external_packages.py b/scripts/automation/trex_control_plane/client_utils/external_packages.py
index 9d8c4dcf..c41f8f2f 100755
--- a/scripts/automation/trex_control_plane/client_utils/external_packages.py
+++ b/scripts/automation/trex_control_plane/client_utils/external_packages.py
@@ -2,6 +2,7 @@
import sys
import os
+import warnings
CURRENT_PATH = os.path.dirname(os.path.realpath(__file__))
ROOT_PATH = os.path.abspath(os.path.join(CURRENT_PATH, os.pardir)) # path to trex_control_plane directory
@@ -48,6 +49,7 @@ def import_platform_dirs ():
del zmq
return
except:
+ sys.path.pop(0)
pass
full_path = os.path.join(PATH_TO_PYTHON_LIB, 'platform/cel59')
@@ -60,9 +62,10 @@ def import_platform_dirs ():
return
except:
- raise Exception("unable to determine platform type for ZMQ import")
-
+ sys.path.pop(0)
+ sys.modules['zmq'] = None
+ warnings.warn("unable to determine platform type for ZMQ import")
+
import_client_utils_modules()
-