diff options
author | Leonardo Sandoval <leonardo.sandoval.gonzalez@linux.intel.com> | 2017-01-09 11:45:51 -0600 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2017-01-16 18:05:14 +0000 |
commit | 5c5db3a477955ac4d8175565a5fa7edc61aa49cd (patch) | |
tree | 7683b363a46b99c37e01e6c0115fc252a48b0889 /meta | |
parent | 55228a1ca42f8e45b5ec992b10c763bd2164639f (diff) | |
download | poky-5c5db3a477955ac4d8175565a5fa7edc61aa49cd.tar.gz |
selftest: devtool: use distro agnostic recipes for devtool checks
The recipes being replaced are not compatible with all distros, so
use mraa and virtual/make for some checks.
(From OE-Core rev: bb32b232d686d1c057dede6f61ed4051b0088673)
Signed-off-by: Leonardo Sandoval <leonardo.sandoval.gonzalez@linux.intel.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta')
-rw-r--r-- | meta/lib/oeqa/selftest/devtool.py | 19 |
1 files changed, 9 insertions, 10 deletions
diff --git a/meta/lib/oeqa/selftest/devtool.py b/meta/lib/oeqa/selftest/devtool.py index abe60906b8..94b6b393c8 100644 --- a/meta/lib/oeqa/selftest/devtool.py +++ b/meta/lib/oeqa/selftest/devtool.py | |||
@@ -340,12 +340,11 @@ class DevtoolTests(DevtoolBase): | |||
340 | 340 | ||
341 | @testcase(1161) | 341 | @testcase(1161) |
342 | def test_devtool_add_fetch_git(self): | 342 | def test_devtool_add_fetch_git(self): |
343 | # Fetch source | ||
344 | tempdir = tempfile.mkdtemp(prefix='devtoolqa') | 343 | tempdir = tempfile.mkdtemp(prefix='devtoolqa') |
345 | self.track_for_cleanup(tempdir) | 344 | self.track_for_cleanup(tempdir) |
346 | url = 'git://git.yoctoproject.org/libmatchbox' | 345 | url = 'gitsm://git.yoctoproject.org/mraa' |
347 | checkrev = '462f0652055d89c648ddd54fd7b03f175c2c6973' | 346 | checkrev = 'ae127b19a50aa54255e4330ccfdd9a5d058e581d' |
348 | testrecipe = 'libmatchbox2' | 347 | testrecipe = 'mraa' |
349 | srcdir = os.path.join(tempdir, testrecipe) | 348 | srcdir = os.path.join(tempdir, testrecipe) |
350 | # Test devtool add | 349 | # Test devtool add |
351 | self.track_for_cleanup(self.workspacedir) | 350 | self.track_for_cleanup(self.workspacedir) |
@@ -353,7 +352,7 @@ class DevtoolTests(DevtoolBase): | |||
353 | self.add_command_to_tearDown('bitbake-layers remove-layer */workspace') | 352 | self.add_command_to_tearDown('bitbake-layers remove-layer */workspace') |
354 | result = runCmd('devtool add %s %s -a -f %s' % (testrecipe, srcdir, url)) | 353 | result = runCmd('devtool add %s %s -a -f %s' % (testrecipe, srcdir, url)) |
355 | self.assertTrue(os.path.exists(os.path.join(self.workspacedir, 'conf', 'layer.conf')), 'Workspace directory not created: %s' % result.output) | 354 | self.assertTrue(os.path.exists(os.path.join(self.workspacedir, 'conf', 'layer.conf')), 'Workspace directory not created: %s' % result.output) |
356 | self.assertTrue(os.path.isfile(os.path.join(srcdir, 'configure.ac')), 'Unable to find configure.ac in source directory') | 355 | self.assertTrue(os.path.isfile(os.path.join(srcdir, 'imraa', 'imraa.c')), 'Unable to find imraa/imraa.c in source directory') |
357 | # Test devtool status | 356 | # Test devtool status |
358 | result = runCmd('devtool status') | 357 | result = runCmd('devtool status') |
359 | self.assertIn(testrecipe, result.output) | 358 | self.assertIn(testrecipe, result.output) |
@@ -363,7 +362,7 @@ class DevtoolTests(DevtoolBase): | |||
363 | self.assertIn('_git.bb', recipefile, 'Recipe file incorrectly named') | 362 | self.assertIn('_git.bb', recipefile, 'Recipe file incorrectly named') |
364 | checkvars = {} | 363 | checkvars = {} |
365 | checkvars['S'] = '${WORKDIR}/git' | 364 | checkvars['S'] = '${WORKDIR}/git' |
366 | checkvars['PV'] = '1.12+git${SRCPV}' | 365 | checkvars['PV'] = '1.0+git${SRCPV}' |
367 | checkvars['SRC_URI'] = url | 366 | checkvars['SRC_URI'] = url |
368 | checkvars['SRCREV'] = '${AUTOREV}' | 367 | checkvars['SRCREV'] = '${AUTOREV}' |
369 | self._test_recipe_contents(recipefile, checkvars, []) | 368 | self._test_recipe_contents(recipefile, checkvars, []) |
@@ -372,7 +371,7 @@ class DevtoolTests(DevtoolBase): | |||
372 | shutil.rmtree(srcdir) | 371 | shutil.rmtree(srcdir) |
373 | url_rev = '%s;rev=%s' % (url, checkrev) | 372 | url_rev = '%s;rev=%s' % (url, checkrev) |
374 | result = runCmd('devtool add %s %s -f "%s" -V 1.5' % (testrecipe, srcdir, url_rev)) | 373 | result = runCmd('devtool add %s %s -f "%s" -V 1.5' % (testrecipe, srcdir, url_rev)) |
375 | self.assertTrue(os.path.isfile(os.path.join(srcdir, 'configure.ac')), 'Unable to find configure.ac in source directory') | 374 | self.assertTrue(os.path.isfile(os.path.join(srcdir, 'imraa', 'imraa.c')), 'Unable to find imraa/imraa.c in source directory') |
376 | # Test devtool status | 375 | # Test devtool status |
377 | result = runCmd('devtool status') | 376 | result = runCmd('devtool status') |
378 | self.assertIn(testrecipe, result.output) | 377 | self.assertIn(testrecipe, result.output) |
@@ -658,8 +657,8 @@ class DevtoolTests(DevtoolBase): | |||
658 | @testcase(1378) | 657 | @testcase(1378) |
659 | def test_devtool_modify_virtual(self): | 658 | def test_devtool_modify_virtual(self): |
660 | # Try modifying a virtual recipe | 659 | # Try modifying a virtual recipe |
661 | virtrecipe = 'virtual/libx11' | 660 | virtrecipe = 'virtual/make' |
662 | realrecipe = 'libx11' | 661 | realrecipe = 'make' |
663 | tempdir = tempfile.mkdtemp(prefix='devtoolqa') | 662 | tempdir = tempfile.mkdtemp(prefix='devtoolqa') |
664 | self.track_for_cleanup(tempdir) | 663 | self.track_for_cleanup(tempdir) |
665 | self.track_for_cleanup(self.workspacedir) | 664 | self.track_for_cleanup(self.workspacedir) |
@@ -1093,7 +1092,7 @@ class DevtoolTests(DevtoolBase): | |||
1093 | tempdir = tempfile.mkdtemp(prefix='devtoolqa') | 1092 | tempdir = tempfile.mkdtemp(prefix='devtoolqa') |
1094 | # Try devtool extract | 1093 | # Try devtool extract |
1095 | self.track_for_cleanup(tempdir) | 1094 | self.track_for_cleanup(tempdir) |
1096 | result = runCmd('devtool extract virtual/libx11 %s' % tempdir) | 1095 | result = runCmd('devtool extract virtual/make %s' % tempdir) |
1097 | self.assertTrue(os.path.exists(os.path.join(tempdir, 'Makefile.am')), 'Extracted source could not be found') | 1096 | self.assertTrue(os.path.exists(os.path.join(tempdir, 'Makefile.am')), 'Extracted source could not be found') |
1098 | # devtool extract shouldn't create the workspace | 1097 | # devtool extract shouldn't create the workspace |
1099 | self.assertFalse(os.path.exists(self.workspacedir)) | 1098 | self.assertFalse(os.path.exists(self.workspacedir)) |