diff options
| -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)) |
