summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPatrick Vacek <patrickvacek@gmail.com>2019-01-25 18:01:48 +0100
committerPatrick Vacek <patrickvacek@gmail.com>2019-01-29 16:39:35 +0100
commit988addc752e331cbf8994a6532d18830dffdd378 (patch)
tree8ba7d4a643ea2b4041fbfe8d739fed7aa6a23971
parenta20b2fba46607121031d400400c16d0f033b8a94 (diff)
downloadmeta-updater-988addc752e331cbf8994a6532d18830dffdd378.tar.gz
oe-selftest: Fix native binary execution.
This fixes SotaToolsTests and AktualizrToolsTests. Signed-off-by: Patrick Vacek <patrickvacek@gmail.com>
-rw-r--r--lib/oeqa/selftest/updater.py12
1 files changed, 3 insertions, 9 deletions
diff --git a/lib/oeqa/selftest/updater.py b/lib/oeqa/selftest/updater.py
index d189323..a37c6e6 100644
--- a/lib/oeqa/selftest/updater.py
+++ b/lib/oeqa/selftest/updater.py
@@ -692,22 +692,16 @@ def akt_native_run(testInst, cmd, **kwargs):
692 # - the command runs without error 692 # - the command runs without error
693 # NOTE: the base test class must have built aktualizr-native (in 693 # NOTE: the base test class must have built aktualizr-native (in
694 # setUpClass, for example) 694 # setUpClass, for example)
695 bb_vars = get_bb_vars(['SYSROOT_DESTDIR', 'base_prefix', 'libdir', 'bindir'], 695 bb_vars = get_bb_vars(['SYSROOT_DESTDIR', 'libdir', 'bindir'], 'aktualizr-native')
696 'aktualizr-native')
697 sysroot = bb_vars['SYSROOT_DESTDIR'] + bb_vars['base_prefix']
698 sysrootbin = bb_vars['SYSROOT_DESTDIR'] + bb_vars['bindir'] 696 sysrootbin = bb_vars['SYSROOT_DESTDIR'] + bb_vars['bindir']
699 libdir = bb_vars['libdir'] 697 libdir = bb_vars['libdir']
700 698
701 program, *_ = cmd.split(' ') 699 program, args = cmd.split(' ', maxsplit=1)
702 p = '{}/{}'.format(sysrootbin, program) 700 p = '{}/{}'.format(sysrootbin, program)
703 testInst.assertTrue(os.path.isfile(p), msg="No {} found ({})".format(program, p)) 701 testInst.assertTrue(os.path.isfile(p), msg="No {} found ({})".format(program, p))
704 env = dict(os.environ) 702 result = runCmd('LD_LIBRARY_PATH=%s %s %s' % (libdir, p, args), ignore_status=True)
705 env['LD_LIBRARY_PATH'] = libdir
706 #result = runCmd(cmd, env=env, native_sysroot=sysroot, ignore_status=True, **kwargs)
707 result = runCmd(cmd, env=env, ignore_status=True, **kwargs)
708 testInst.assertEqual(result.status, 0, "Status not equal to 0. output: %s" % result.output) 703 testInst.assertEqual(result.status, 0, "Status not equal to 0. output: %s" % result.output)
709 704
710
711def verifyProvisioned(testInst, machine): 705def verifyProvisioned(testInst, machine):
712 # Verify that device HAS provisioned. 706 # Verify that device HAS provisioned.
713 ran_ok = False 707 ran_ok = False