diff options
Diffstat (limited to 'meta/lib/oeqa/selftest/devtool.py')
| -rw-r--r-- | meta/lib/oeqa/selftest/devtool.py | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/meta/lib/oeqa/selftest/devtool.py b/meta/lib/oeqa/selftest/devtool.py index baa56d6dc1..e4de309e72 100644 --- a/meta/lib/oeqa/selftest/devtool.py +++ b/meta/lib/oeqa/selftest/devtool.py | |||
| @@ -466,6 +466,28 @@ class DevtoolTests(DevtoolBase): | |||
| 466 | # Try building | 466 | # Try building |
| 467 | bitbake(testrecipe) | 467 | bitbake(testrecipe) |
| 468 | 468 | ||
| 469 | def test_devtool_modify_virtual(self): | ||
| 470 | # Try modifying a virtual recipe | ||
| 471 | virtrecipe = 'virtual/libx11' | ||
| 472 | realrecipe = 'libx11' | ||
| 473 | tempdir = tempfile.mkdtemp(prefix='devtoolqa') | ||
| 474 | self.track_for_cleanup(tempdir) | ||
| 475 | self.track_for_cleanup(self.workspacedir) | ||
| 476 | self.add_command_to_tearDown('bitbake-layers remove-layer */workspace') | ||
| 477 | result = runCmd('devtool modify %s -x %s' % (virtrecipe, tempdir)) | ||
| 478 | self.assertTrue(os.path.exists(os.path.join(tempdir, 'Makefile.am')), 'Extracted source could not be found') | ||
| 479 | self.assertTrue(os.path.exists(os.path.join(self.workspacedir, 'conf', 'layer.conf')), 'Workspace directory not created') | ||
| 480 | matches = glob.glob(os.path.join(self.workspacedir, 'appends', '%s_*.bbappend' % realrecipe)) | ||
| 481 | self.assertTrue(matches, 'bbappend not created %s' % result.output) | ||
| 482 | # Test devtool status | ||
| 483 | result = runCmd('devtool status') | ||
| 484 | self.assertNotIn(virtrecipe, result.output) | ||
| 485 | self.assertIn(realrecipe, result.output) | ||
| 486 | # Check git repo | ||
| 487 | self._check_src_repo(tempdir) | ||
| 488 | # This is probably sufficient | ||
| 489 | |||
| 490 | |||
| 469 | @testcase(1169) | 491 | @testcase(1169) |
| 470 | def test_devtool_update_recipe(self): | 492 | def test_devtool_update_recipe(self): |
| 471 | # Check preconditions | 493 | # Check preconditions |
| @@ -805,6 +827,16 @@ class DevtoolTests(DevtoolBase): | |||
| 805 | self.assertTrue(os.path.exists(os.path.join(tempdir, 'Makefile.am')), 'Extracted source could not be found') | 827 | self.assertTrue(os.path.exists(os.path.join(tempdir, 'Makefile.am')), 'Extracted source could not be found') |
| 806 | self._check_src_repo(tempdir) | 828 | self._check_src_repo(tempdir) |
| 807 | 829 | ||
| 830 | def test_devtool_extract_virtual(self): | ||
| 831 | tempdir = tempfile.mkdtemp(prefix='devtoolqa') | ||
| 832 | # Try devtool extract | ||
| 833 | self.track_for_cleanup(tempdir) | ||
| 834 | self.track_for_cleanup(self.workspacedir) | ||
| 835 | self.add_command_to_tearDown('bitbake-layers remove-layer */workspace') | ||
| 836 | result = runCmd('devtool extract virtual/libx11 %s' % tempdir) | ||
| 837 | self.assertTrue(os.path.exists(os.path.join(tempdir, 'Makefile.am')), 'Extracted source could not be found') | ||
| 838 | self._check_src_repo(tempdir) | ||
| 839 | |||
| 808 | @testcase(1168) | 840 | @testcase(1168) |
| 809 | def test_devtool_reset_all(self): | 841 | def test_devtool_reset_all(self): |
| 810 | tempdir = tempfile.mkdtemp(prefix='devtoolqa') | 842 | tempdir = tempfile.mkdtemp(prefix='devtoolqa') |
