summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorimarom <imarom@cisco.com>2015-09-02 05:48:43 +0300
committerimarom <imarom@cisco.com>2015-09-02 05:48:43 +0300
commitffd4e944b9905144682e9f0b77ce0af02c6a43d7 (patch)
tree15b57bbc0200688ae87461cccf372137b9ac55af
parent29b23b05dd1b0fe34af9448fdcbbd2e6a3a594fb (diff)
make the mock server run on scripts path
-rwxr-xr-xlinux/ws_main.py11
1 files changed, 8 insertions, 3 deletions
diff --git a/linux/ws_main.py b/linux/ws_main.py
index 218cbe24..dc22be07 100755
--- a/linux/ws_main.py
+++ b/linux/ws_main.py
@@ -249,7 +249,7 @@ PLATFORM_32 = "32"
class build_option:
- def __init__(self, name, src, platform, debug_mode, is_pie, use = [], flags = []):
+ def __init__(self, name, src, platform, debug_mode, is_pie, use = [], flags = [], rpath = []):
self.mode = debug_mode; ##debug,release
self.platform = platform; #['32','64']
self.is_pie = is_pie
@@ -257,6 +257,7 @@ class build_option:
self.src = src
self.use = use
self.flags = flags
+ self.rpath = rpath
def __str__(self):
s=self.mode+","+self.platform;
@@ -337,6 +338,9 @@ class build_option:
def get_src (self):
return self.src.file_list(top)
+ def get_rpath (self):
+ return self.rpath
+
def get_link_flags(self):
# add here basic flags
base_flags = ['-pthread'];
@@ -363,7 +367,8 @@ build_types = [
build_option(name = "bp-sim", src = bp, debug_mode= RELEASE_,platform = PLATFORM_32, is_pie = False),
build_option(name = "bp-sim", src = bp, debug_mode= RELEASE_,platform = PLATFORM_64, is_pie = False),
- build_option(name = "mock-rpc-server", use = ['zmq'], src = rpc_server_mock, debug_mode= DEBUG_,platform = PLATFORM_64, is_pie = False, flags = ['-DTREX_RPC_MOCK_SERVER']),
+ build_option(name = "mock-rpc-server", use = ['zmq'], src = rpc_server_mock, debug_mode= DEBUG_,platform = PLATFORM_64, is_pie = False, flags = ['-DTREX_RPC_MOCK_SERVER'],
+ rpath = ['.']),
]
@@ -378,7 +383,7 @@ def build_prog (bld, build_obj):
linkflags = build_obj.get_link_flags(),
source = build_obj.get_src(),
use = build_obj.get_use_libs(),
- rpath = bld.env.RPATH,
+ rpath = bld.env.RPATH + build_obj.get_rpath(),
target = build_obj.get_target())