diff options
-rw-r--r-- | meta/lib/oeqa/selftest/cases/recipetool.py | 17 |
1 files changed, 14 insertions, 3 deletions
diff --git a/meta/lib/oeqa/selftest/cases/recipetool.py b/meta/lib/oeqa/selftest/cases/recipetool.py index 8dc00ac10e..1aedc02b99 100644 --- a/meta/lib/oeqa/selftest/cases/recipetool.py +++ b/meta/lib/oeqa/selftest/cases/recipetool.py | |||
@@ -68,7 +68,7 @@ class RecipetoolBase(devtool.DevtoolBase): | |||
68 | return bbappendfile, result.output | 68 | return bbappendfile, result.output |
69 | 69 | ||
70 | 70 | ||
71 | class RecipetoolTests(RecipetoolBase): | 71 | class RecipetoolAppendTests(RecipetoolBase): |
72 | 72 | ||
73 | @classmethod | 73 | @classmethod |
74 | def setUpClass(cls): | 74 | def setUpClass(cls): |
@@ -76,9 +76,8 @@ class RecipetoolTests(RecipetoolBase): | |||
76 | # Ensure we have the right data in shlibs/pkgdata | 76 | # Ensure we have the right data in shlibs/pkgdata |
77 | cls.logger.info('Running bitbake to generate pkgdata') | 77 | cls.logger.info('Running bitbake to generate pkgdata') |
78 | bitbake('-c packagedata base-files coreutils busybox selftest-recipetool-appendfile') | 78 | bitbake('-c packagedata base-files coreutils busybox selftest-recipetool-appendfile') |
79 | bb_vars = get_bb_vars(['COREBASE', 'BBPATH']) | 79 | bb_vars = get_bb_vars(['COREBASE']) |
80 | cls.corebase = bb_vars['COREBASE'] | 80 | cls.corebase = bb_vars['COREBASE'] |
81 | cls.bbpath = bb_vars['BBPATH'] | ||
82 | 81 | ||
83 | def _try_recipetool_appendfile(self, testrecipe, destfile, newfile, options, expectedlines, expectedfiles): | 82 | def _try_recipetool_appendfile(self, testrecipe, destfile, newfile, options, expectedlines, expectedfiles): |
84 | cmd = 'recipetool appendfile %s %s %s %s' % (self.templayerdir, destfile, newfile, options) | 83 | cmd = 'recipetool appendfile %s %s %s %s' % (self.templayerdir, destfile, newfile, options) |
@@ -332,6 +331,9 @@ class RecipetoolTests(RecipetoolBase): | |||
332 | filename = try_appendfile_wc('-w') | 331 | filename = try_appendfile_wc('-w') |
333 | self.assertEqual(filename, recipefn.split('_')[0] + '_%.bbappend') | 332 | self.assertEqual(filename, recipefn.split('_')[0] + '_%.bbappend') |
334 | 333 | ||
334 | |||
335 | class RecipetoolCreateTests(RecipetoolBase): | ||
336 | |||
335 | def test_recipetool_create(self): | 337 | def test_recipetool_create(self): |
336 | # Try adding a recipe | 338 | # Try adding a recipe |
337 | tempsrc = os.path.join(self.tempdir, 'srctree') | 339 | tempsrc = os.path.join(self.tempdir, 'srctree') |
@@ -518,6 +520,15 @@ class RecipetoolTests(RecipetoolBase): | |||
518 | inherits = ['pkgconfig', 'autotools'] | 520 | inherits = ['pkgconfig', 'autotools'] |
519 | self._test_recipe_contents(recipefile, checkvars, inherits) | 521 | self._test_recipe_contents(recipefile, checkvars, inherits) |
520 | 522 | ||
523 | |||
524 | class RecipetoolTests(RecipetoolBase): | ||
525 | |||
526 | @classmethod | ||
527 | def setUpClass(cls): | ||
528 | super(RecipetoolTests, cls).setUpClass() | ||
529 | bb_vars = get_bb_vars(['BBPATH']) | ||
530 | cls.bbpath = bb_vars['BBPATH'] | ||
531 | |||
521 | def _copy_file_with_cleanup(self, srcfile, basedstdir, *paths): | 532 | def _copy_file_with_cleanup(self, srcfile, basedstdir, *paths): |
522 | dstdir = basedstdir | 533 | dstdir = basedstdir |
523 | self.assertTrue(os.path.exists(dstdir)) | 534 | self.assertTrue(os.path.exists(dstdir)) |