summaryrefslogtreecommitdiffstats
path: root/meta/lib/oeqa/selftest/devtool.py
diff options
context:
space:
mode:
authorRichard Purdie <richard.purdie@linuxfoundation.org>2017-01-11 10:38:34 +0000
committerRichard Purdie <richard.purdie@linuxfoundation.org>2017-01-23 12:05:17 +0000
commit209a21ed46ab33b705e2070d7dfccc1cdcb5fabd (patch)
tree4c64a1ece57a04a2fc30c616d0ba846d9fa05c1a /meta/lib/oeqa/selftest/devtool.py
parent9107d6ca144ac1f6169830dee25dae2dad775333 (diff)
downloadpoky-209a21ed46ab33b705e2070d7dfccc1cdcb5fabd.tar.gz
selftest/devtool: Update to account for recipe specific sysroot
There is no common sysroot any more so add the libusb dependency using DEPENDS and check for the output in the sysroot output directory so the tests work with recipe specific sysroots. (From OE-Core rev: ff30b833a423d300ec2b81bf80ef6733a6d8039b) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/lib/oeqa/selftest/devtool.py')
-rw-r--r--meta/lib/oeqa/selftest/devtool.py9
1 files changed, 5 insertions, 4 deletions
diff --git a/meta/lib/oeqa/selftest/devtool.py b/meta/lib/oeqa/selftest/devtool.py
index dc3435fc2b..79a4b1fbaf 100644
--- a/meta/lib/oeqa/selftest/devtool.py
+++ b/meta/lib/oeqa/selftest/devtool.py
@@ -247,8 +247,6 @@ class DevtoolTests(DevtoolBase):
247 247
248 @testcase(1162) 248 @testcase(1162)
249 def test_devtool_add_library(self): 249 def test_devtool_add_library(self):
250 # We don't have the ability to pick up this dependency automatically yet...
251 bitbake('libusb1')
252 # Fetch source 250 # Fetch source
253 tempdir = tempfile.mkdtemp(prefix='devtoolqa') 251 tempdir = tempfile.mkdtemp(prefix='devtoolqa')
254 self.track_for_cleanup(tempdir) 252 self.track_for_cleanup(tempdir)
@@ -277,10 +275,13 @@ class DevtoolTests(DevtoolBase):
277 result = runCmd('recipetool setvar %s EXTRA_OECMAKE -- \'-DPYTHON_BINDINGS=OFF -DLIBFTDI_CMAKE_CONFIG_DIR=${datadir}/cmake/Modules\'' % recipefile) 275 result = runCmd('recipetool setvar %s EXTRA_OECMAKE -- \'-DPYTHON_BINDINGS=OFF -DLIBFTDI_CMAKE_CONFIG_DIR=${datadir}/cmake/Modules\'' % recipefile)
278 with open(recipefile, 'a') as f: 276 with open(recipefile, 'a') as f:
279 f.write('\nFILES_${PN}-dev += "${datadir}/cmake/Modules"\n') 277 f.write('\nFILES_${PN}-dev += "${datadir}/cmake/Modules"\n')
278 # We don't have the ability to pick up this dependency automatically yet...
279 f.write('\nDEPENDS += "libusb1"\n')
280 f.write('\nTESTLIBOUTPUT = "${STAGING_DIR}-components/${TUNE_PKGARCH}/${PN}/${libdir}"\n')
280 # Test devtool build 281 # Test devtool build
281 result = runCmd('devtool build libftdi') 282 result = runCmd('devtool build libftdi')
282 staging_libdir = get_bb_var('STAGING_LIBDIR', 'libftdi') 283 staging_libdir = get_bb_var('TESTLIBOUTPUT', 'libftdi')
283 self.assertTrue(staging_libdir, 'Could not query STAGING_LIBDIR variable') 284 self.assertTrue(staging_libdir, 'Could not query TESTLIBOUTPUT variable')
284 self.assertTrue(os.path.isfile(os.path.join(staging_libdir, 'libftdi1.so.2.1.0')), "libftdi binary not found in STAGING_LIBDIR. Output of devtool build libftdi %s" % result.output) 285 self.assertTrue(os.path.isfile(os.path.join(staging_libdir, 'libftdi1.so.2.1.0')), "libftdi binary not found in STAGING_LIBDIR. Output of devtool build libftdi %s" % result.output)
285 # Test devtool reset 286 # Test devtool reset
286 stampprefix = get_bb_var('STAMP', 'libftdi') 287 stampprefix = get_bb_var('STAMP', 'libftdi')