From ff285d1ecb08fcdff6ee8628794c6c1f4484d030 Mon Sep 17 00:00:00 2001 From: Joshua Lock Date: Thu, 1 Sep 2016 15:01:04 +0100 Subject: oeqa.selftest.liboe: fix test for xattr in copytree Call programs from attr-native with their full path in STAGING_BINDIR_NATIVE as this isn't part of PATH when running oe-selftest and thus without this change we rely on [g|s]etfattr being available on the host. Signed-off-by: Joshua Lock --- meta/lib/oeqa/selftest/liboe.py | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/meta/lib/oeqa/selftest/liboe.py b/meta/lib/oeqa/selftest/liboe.py index 2aeab614c6..5c93069b5d 100644 --- a/meta/lib/oeqa/selftest/liboe.py +++ b/meta/lib/oeqa/selftest/liboe.py @@ -50,14 +50,15 @@ class LibOE(oeSelfTest): # ensure we have setfattr available bitbake("attr-native") - + bindir = get_bb_var('STAGING_BINDIR_NATIVE') + # create a file with xattr and copy it open(oe.path.join(src, testfilename), 'w+b').close() - runCmd('setfattr -n user.oetest -v "testing liboe" %s' % oe.path.join(src, testfilename)) + runCmd('%s/setfattr -n user.oetest -v "testing liboe" %s' % (bindir, oe.path.join(src, testfilename))) oe.path.copytree(src, dst) - + # ensure file in dest has user.oetest xattr - result = runCmd('getfattr -n user.oetest %s' % oe.path.join(dst, testfilename)) + result = runCmd('%s/getfattr -n user.oetest %s' % (bindir, oe.path.join(dst, testfilename))) self.assertIn('user.oetest="testing liboe"', result.output, 'Extended attribute not sert in dst') oe.path.remove(testloc) -- cgit 1.2.3-korg