From 6413382f3c7cca2873315b84798167856a9411fd Mon Sep 17 00:00:00 2001 From: imarom Date: Wed, 10 Feb 2016 08:12:45 -0500 Subject: simulator didn't work in package mode --- .../trex_control_plane/stl/trex_stl_lib/trex_stl_sim.py | 11 +++++++++-- scripts/stl-sim | 2 +- 2 files changed, 10 insertions(+), 3 deletions(-) diff --git a/scripts/automation/trex_control_plane/stl/trex_stl_lib/trex_stl_sim.py b/scripts/automation/trex_control_plane/stl/trex_stl_lib/trex_stl_sim.py index 9cea3ea8..71af88d0 100644 --- a/scripts/automation/trex_control_plane/stl/trex_stl_lib/trex_stl_sim.py +++ b/scripts/automation/trex_control_plane/stl/trex_stl_lib/trex_stl_sim.py @@ -259,7 +259,7 @@ class STLSim(object): cmd = ['valgrind', '--leak-check=full', '--error-exitcode=1'] + cmd elif self.mode == 'gdb': - cmd = ['/bin/gdb', '--args'] + cmd + cmd = ['/usr/bin/gdb', '--args'] + cmd print "executing command: '{0}'".format(" ".join(cmd)) rc = subprocess.call(cmd) @@ -352,6 +352,12 @@ def setParserOptions(): default = -1, type = float) + parser.add_argument('-p', '--path', + help = "BP sim path", + dest = 'bp_sim_path', + default = None, + type = str) + group = parser.add_mutually_exclusive_group() @@ -402,7 +408,8 @@ def main (): mode = 'none' try: - r = STLSim() + r = STLSim(bp_sim_path = options.bp_sim_path) + r.run(input_list = options.input_file, outfile = options.output_file, dp_core_count = options.dp_core_count, diff --git a/scripts/stl-sim b/scripts/stl-sim index ed859aa6..57fe4fa8 100755 --- a/scripts/stl-sim +++ b/scripts/stl-sim @@ -3,4 +3,4 @@ source find_python.sh export PYTHONPATH=automation/trex_control_plane/stl -$PYTHON -m trex_stl_lib.trex_stl_sim $@ +$PYTHON -m trex_stl_lib.trex_stl_sim -p $PWD $@ -- cgit 1.2.3-korg