]> git.ipfire.org Git - thirdparty/openembedded/openembedded-core-contrib.git/commitdiff
oeqa.selftest.liboe: fix test for xattr in copytree joshuagl/xattr-fixup
authorJoshua Lock <joshua.g.lock@intel.com>
Thu, 1 Sep 2016 14:01:04 +0000 (15:01 +0100)
committerJoshua Lock <joshua.g.lock@intel.com>
Thu, 1 Sep 2016 14:16:59 +0000 (15:16 +0100)
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>
meta/lib/oeqa/selftest/liboe.py

index 2aeab614c638f1f3ac75116ac44f90bd9d67a10c..5c93069b5dc8f0117e60302cc9172820717ef24a 100644 (file)
@@ -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)