Fix Amarisoft local execution
Passing an asterisk as a string into a local process does not work because it is interpreted as a string. To make this work we have to adress the binaries directly by name instead of using something like 'lteue-*'. Change-Id: I50adcef36694f05613c2c7ce10ad5828290d6e9c
This commit is contained in:
parent
dcc0b5577c
commit
bec730477d
|
@ -101,7 +101,7 @@ class AmarisoftEPC(epc.EPC):
|
|||
self.process.launch()
|
||||
|
||||
def start_locally(self):
|
||||
binary = self.inst.child('', BINFILE)
|
||||
binary = self.inst.child('', AmarisoftEPC.BINFILE)
|
||||
|
||||
env = {}
|
||||
# setting capabilities will later disable use of LD_LIBRARY_PATH from ELF loader -> modify RPATH instead.
|
||||
|
|
|
@ -180,14 +180,16 @@ class AmarisoftUE(MS):
|
|||
|
||||
# setting capabilities will later disable use of LD_LIBRARY_PATH from ELF loader -> modify RPATH instead.
|
||||
self.log('Setting RPATH for lteue')
|
||||
util.change_elf_rpath(binary, util.prepend_library_path(self.inst), self.run_dir.new_dir('patchelf'))
|
||||
util.change_elf_rpath(binary, str(util.prepend_library_path(self.inst)), self.run_dir.new_dir('patchelf'))
|
||||
# We also need to patch the arch-optimized binaries that lteue() will exec() into:
|
||||
util.change_elf_rpath(self.inst.child('', 'lteue-*'), util.prepend_library_path(self.inst), self.run_dir.new_dir('patchelf2'))
|
||||
util.change_elf_rpath(self.inst.child('', 'lteue-avx'), str(util.prepend_library_path(self.inst)), self.run_dir.new_dir('patchelf2'))
|
||||
util.change_elf_rpath(self.inst.child('', 'lteue-avx2'), str(util.prepend_library_path(self.inst)), self.run_dir.new_dir('patchelf2'))
|
||||
|
||||
# lteue requires CAP_NET_ADMIN to create tunnel devices: ioctl(TUNSETIFF):
|
||||
self.log('Applying CAP_NET_ADMIN capability to lteue')
|
||||
util.setcap_net_admin(binary, self.run_dir.new_dir('setcap_net_admin'))
|
||||
util.setcap_net_admin(self.inst.child('', 'lteue-*'), self.run_dir.new_dir('setcap_net_admin2'))
|
||||
util.setcap_net_admin(self.inst.child('', 'lteue-avx'), str(self.run_dir.new_dir('setcap_net_admin2')))
|
||||
util.setcap_net_admin(self.inst.child('', 'lteue-avx2'), str(self.run_dir.new_dir('setcap_net_admin2')))
|
||||
|
||||
args = (binary, os.path.abspath(self.config_file))
|
||||
self.dbg(run_dir=self.run_dir, binary=binary, env=env)
|
||||
|
|
Loading…
Reference in New Issue