summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJoshua Lock <joshua.g.lock@intel.com>2016-09-01 15:01:04 +0100
committerJoshua Lock <joshua.g.lock@intel.com>2016-09-01 15:16:59 +0100
commitff285d1ecb08fcdff6ee8628794c6c1f4484d030 (patch)
treed715e307ec286f3cdf7673c60781d8b79ea96d94
parent5a2308e131982fc7b28a9f4b4910232a722523bb (diff)
downloadopenembedded-core-contrib-joshuagl/xattr-fixup.tar.gz
openembedded-core-contrib-joshuagl/xattr-fixup.tar.bz2
openembedded-core-contrib-joshuagl/xattr-fixup.zip
oeqa.selftest.liboe: fix test for xattr in copytreejoshuagl/xattr-fixup
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 <joshua.g.lock@intel.com>
-rw-r--r--meta/lib/oeqa/selftest/liboe.py9
1 files 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)