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
This commit is contained in:
parent
a88b0c7424
commit
e39c6f1a52
|
@ -50,7 +50,7 @@ class OsmoBtsOctphy(log.Origin):
|
|||
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()
|
||||
|
|
|
@ -54,7 +54,7 @@ class OsmoBtsTrx(log.Origin):
|
|||
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...')
|
||||
|
|
|
@ -50,7 +50,9 @@ class OsmoNitb(log.Origin):
|
|||
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',
|
||||
|
|
|
@ -32,6 +32,12 @@ import tty
|
|||
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):
|
||||
|
|
Loading…
Reference in New Issue