summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorYaroslav Brustinov <ybrustin@cisco.com>2016-03-31 23:33:14 +0300
committerYaroslav Brustinov <ybrustin@cisco.com>2016-03-31 23:33:14 +0300
commit8be43de7d790e43f608e0b918863da83731e738e (patch)
tree02a7df39a517fb5e9b6601a8829b907dec3199e5
parentcf6092b407c624ab8d6cf671e1e30bc981ed6826 (diff)
make the stl console to work at client package/from stl directory itself
-rw-r--r--scripts/automation/trex_control_plane/stl/console/stl_path.py7
-rwxr-xr-xscripts/automation/trex_control_plane/stl/console/trex_console.py10
2 files changed, 15 insertions, 2 deletions
diff --git a/scripts/automation/trex_control_plane/stl/console/stl_path.py b/scripts/automation/trex_control_plane/stl/console/stl_path.py
new file mode 100644
index 00000000..f15c666e
--- /dev/null
+++ b/scripts/automation/trex_control_plane/stl/console/stl_path.py
@@ -0,0 +1,7 @@
+import sys, os
+
+# FIXME to the write path for trex_stl_lib
+sys.path.insert(0, "../")
+
+STL_PROFILES_PATH = os.path.join(os.pardir, 'profiles')
+
diff --git a/scripts/automation/trex_control_plane/stl/console/trex_console.py b/scripts/automation/trex_control_plane/stl/console/trex_console.py
index 8c71065c..da4c4486 100755
--- a/scripts/automation/trex_control_plane/stl/console/trex_console.py
+++ b/scripts/automation/trex_control_plane/stl/console/trex_console.py
@@ -30,14 +30,20 @@ import os
import sys
import tty, termios
+try:
+ import stl_path
+except:
+ from . import stl_path
from trex_stl_lib.api import *
from trex_stl_lib.utils.text_opts import *
from trex_stl_lib.utils.common import user_input, get_current_user
from trex_stl_lib.utils import parsing_opts
-
-from . import trex_tui
+try:
+ import trex_tui
+except:
+ from . import trex_tui
from functools import wraps