Hello Neels Hofmeyr, Jenkins Builder, I'd like you to reexamine a change. Please visit
https://gerrit.osmocom.org/2539 to look at the new patch set (#2). Prepend LD_LIBRARY_PATH instead of overwritting it My current distribution ships a newer libcrypto and libssl which are not ABI compatible with the ones generated by Jenkins. I had to copy those libraries locally and use LD_LIBRARY_PATH to be able to run binaries compiled coming from the jenkins slave. Without this patch I am not able to run it because it is overwriting the previous variable. Change-Id: Id9b16d13d343616cbf87b9da8a99e3fae48da6bd --- M src/osmo_gsm_tester/bts_octphy.py M src/osmo_gsm_tester/bts_osmotrx.py M src/osmo_gsm_tester/osmo_nitb.py M src/osmo_gsm_tester/util.py 4 files changed, 11 insertions(+), 3 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-gsm-tester refs/changes/39/2539/2 diff --git a/src/osmo_gsm_tester/bts_octphy.py b/src/osmo_gsm_tester/bts_octphy.py index 1f36a79..5a73c7d 100644 --- a/src/osmo_gsm_tester/bts_octphy.py +++ b/src/osmo_gsm_tester/bts_octphy.py @@ -50,7 +50,7 @@ lib = self.inst.child('lib') if not os.path.isdir(lib): raise RuntimeError('No lib/ in %r' % self.inst) - self.env = { 'LD_LIBRARY_PATH': lib } + self.env = { 'LD_LIBRARY_PATH': util.prepend_library_path(lib) } self.launch_process(OsmoBtsOctphy.BIN_BTS_OCTPHY, '-r', '1', '-c', os.path.abspath(self.config_file)) self.suite_run.poll() diff --git a/src/osmo_gsm_tester/bts_osmotrx.py b/src/osmo_gsm_tester/bts_osmotrx.py index cadf98f..e62e4e6 100644 --- a/src/osmo_gsm_tester/bts_osmotrx.py +++ b/src/osmo_gsm_tester/bts_osmotrx.py @@ -54,7 +54,7 @@ lib = self.inst.child('lib') if not os.path.isdir(lib): raise RuntimeError('No lib/ in %r' % self.inst) - self.env = { 'LD_LIBRARY_PATH': lib } + self.env = { 'LD_LIBRARY_PATH': util.prepend_library_path(lib) } self.proc_trx = self.launch_process(OsmoBtsTrx.BIN_TRX, '-x') self.log('Waiting for osmo-trx to start up...') diff --git a/src/osmo_gsm_tester/osmo_nitb.py b/src/osmo_gsm_tester/osmo_nitb.py index 4cd6055..3ed48b2 100644 --- a/src/osmo_gsm_tester/osmo_nitb.py +++ b/src/osmo_gsm_tester/osmo_nitb.py @@ -50,7 +50,9 @@ lib = inst.child('lib') if not os.path.isdir(lib): raise RuntimeError('No lib/ in %r' % inst) - env = { 'LD_LIBRARY_PATH': lib } + + env = { 'LD_LIBRARY_PATH': util.prepend_library_path(lib) } + self.dbg(run_dir=self.run_dir, binary=binary, env=env) self.process = process.Process(self.name(), self.run_dir, (binary, '-c', diff --git a/src/osmo_gsm_tester/util.py b/src/osmo_gsm_tester/util.py index 335e3ba..9a4e728 100644 --- a/src/osmo_gsm_tester/util.py +++ b/src/osmo_gsm_tester/util.py @@ -32,6 +32,12 @@ import readline +def prepend_library_path(path): + lp = os.getenv('LD_LIBRARY_PATH') + if not lp: + return path + return path + ':' + lp + class listdict: 'a dict of lists { "a": [1, 2, 3], "b": [1, 2] }' def __getattr__(ld, name): -- To view, visit https://gerrit.osmocom.org/2539 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newpatchset Gerrit-Change-Id: Id9b16d13d343616cbf87b9da8a99e3fae48da6bd Gerrit-PatchSet: 2 Gerrit-Project: osmo-gsm-tester Gerrit-Branch: master Gerrit-Owner: Pau Espin Pedrol <pes...@sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr <nhofm...@sysmocom.de>