diff options
Diffstat (limited to 'meta')
| -rw-r--r-- | meta/lib/oeqa/selftest/tinfoil.py | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/meta/lib/oeqa/selftest/tinfoil.py b/meta/lib/oeqa/selftest/tinfoil.py index c8d635cd05..6ad106cad8 100644 --- a/meta/lib/oeqa/selftest/tinfoil.py +++ b/meta/lib/oeqa/selftest/tinfoil.py | |||
| @@ -10,6 +10,7 @@ from oeqa.utils.decorators import testcase | |||
| 10 | class TinfoilTests(oeSelfTest): | 10 | class TinfoilTests(oeSelfTest): |
| 11 | """ Basic tests for the tinfoil API """ | 11 | """ Basic tests for the tinfoil API """ |
| 12 | 12 | ||
| 13 | @testcase(1568) | ||
| 13 | def test_getvar(self): | 14 | def test_getvar(self): |
| 14 | with bb.tinfoil.Tinfoil() as tinfoil: | 15 | with bb.tinfoil.Tinfoil() as tinfoil: |
| 15 | tinfoil.prepare(True) | 16 | tinfoil.prepare(True) |
| @@ -17,6 +18,7 @@ class TinfoilTests(oeSelfTest): | |||
| 17 | if not machine: | 18 | if not machine: |
| 18 | self.fail('Unable to get MACHINE value - returned %s' % machine) | 19 | self.fail('Unable to get MACHINE value - returned %s' % machine) |
| 19 | 20 | ||
| 21 | @testcase(1569) | ||
| 20 | def test_expand(self): | 22 | def test_expand(self): |
| 21 | with bb.tinfoil.Tinfoil() as tinfoil: | 23 | with bb.tinfoil.Tinfoil() as tinfoil: |
| 22 | tinfoil.prepare(True) | 24 | tinfoil.prepare(True) |
| @@ -25,6 +27,7 @@ class TinfoilTests(oeSelfTest): | |||
| 25 | if not pid: | 27 | if not pid: |
| 26 | self.fail('Unable to expand "%s" - returned %s' % (expr, pid)) | 28 | self.fail('Unable to expand "%s" - returned %s' % (expr, pid)) |
| 27 | 29 | ||
| 30 | @testcase(1570) | ||
| 28 | def test_getvar_bb_origenv(self): | 31 | def test_getvar_bb_origenv(self): |
| 29 | with bb.tinfoil.Tinfoil() as tinfoil: | 32 | with bb.tinfoil.Tinfoil() as tinfoil: |
| 30 | tinfoil.prepare(True) | 33 | tinfoil.prepare(True) |
| @@ -33,6 +36,7 @@ class TinfoilTests(oeSelfTest): | |||
| 33 | self.fail('Unable to get BB_ORIGENV value - returned %s' % origenv) | 36 | self.fail('Unable to get BB_ORIGENV value - returned %s' % origenv) |
| 34 | self.assertEqual(origenv.getVar('HOME', False), os.environ['HOME']) | 37 | self.assertEqual(origenv.getVar('HOME', False), os.environ['HOME']) |
| 35 | 38 | ||
| 39 | @testcase(1571) | ||
| 36 | def test_parse_recipe(self): | 40 | def test_parse_recipe(self): |
| 37 | with bb.tinfoil.Tinfoil() as tinfoil: | 41 | with bb.tinfoil.Tinfoil() as tinfoil: |
| 38 | tinfoil.prepare(config_only=False, quiet=2) | 42 | tinfoil.prepare(config_only=False, quiet=2) |
| @@ -43,6 +47,7 @@ class TinfoilTests(oeSelfTest): | |||
| 43 | rd = tinfoil.parse_recipe_file(best[3]) | 47 | rd = tinfoil.parse_recipe_file(best[3]) |
| 44 | self.assertEqual(testrecipe, rd.getVar('PN')) | 48 | self.assertEqual(testrecipe, rd.getVar('PN')) |
| 45 | 49 | ||
| 50 | @testcase(1572) | ||
| 46 | def test_parse_recipe_copy_expand(self): | 51 | def test_parse_recipe_copy_expand(self): |
| 47 | with bb.tinfoil.Tinfoil() as tinfoil: | 52 | with bb.tinfoil.Tinfoil() as tinfoil: |
| 48 | tinfoil.prepare(config_only=False, quiet=2) | 53 | tinfoil.prepare(config_only=False, quiet=2) |
| @@ -61,6 +66,7 @@ class TinfoilTests(oeSelfTest): | |||
| 61 | localdata.setVar('PN', 'hello') | 66 | localdata.setVar('PN', 'hello') |
| 62 | self.assertEqual('hello', localdata.getVar('BPN')) | 67 | self.assertEqual('hello', localdata.getVar('BPN')) |
| 63 | 68 | ||
| 69 | @testcase(1573) | ||
| 64 | def test_parse_recipe_initial_datastore(self): | 70 | def test_parse_recipe_initial_datastore(self): |
| 65 | with bb.tinfoil.Tinfoil() as tinfoil: | 71 | with bb.tinfoil.Tinfoil() as tinfoil: |
| 66 | tinfoil.prepare(config_only=False, quiet=2) | 72 | tinfoil.prepare(config_only=False, quiet=2) |
| @@ -74,6 +80,7 @@ class TinfoilTests(oeSelfTest): | |||
| 74 | # Check we can get variable values | 80 | # Check we can get variable values |
| 75 | self.assertEqual('somevalue', rd.getVar('MYVARIABLE')) | 81 | self.assertEqual('somevalue', rd.getVar('MYVARIABLE')) |
| 76 | 82 | ||
| 83 | @testcase(1574) | ||
| 77 | def test_list_recipes(self): | 84 | def test_list_recipes(self): |
| 78 | with bb.tinfoil.Tinfoil() as tinfoil: | 85 | with bb.tinfoil.Tinfoil() as tinfoil: |
| 79 | tinfoil.prepare(config_only=False, quiet=2) | 86 | tinfoil.prepare(config_only=False, quiet=2) |
| @@ -92,6 +99,7 @@ class TinfoilTests(oeSelfTest): | |||
| 92 | if checkpns: | 99 | if checkpns: |
| 93 | self.fail('Unable to find pkg_fn entries for: %s' % ', '.join(checkpns)) | 100 | self.fail('Unable to find pkg_fn entries for: %s' % ', '.join(checkpns)) |
| 94 | 101 | ||
| 102 | @testcase(1575) | ||
| 95 | def test_wait_event(self): | 103 | def test_wait_event(self): |
| 96 | with bb.tinfoil.Tinfoil() as tinfoil: | 104 | with bb.tinfoil.Tinfoil() as tinfoil: |
| 97 | tinfoil.prepare(config_only=True) | 105 | tinfoil.prepare(config_only=True) |
| @@ -122,6 +130,7 @@ class TinfoilTests(oeSelfTest): | |||
| 122 | self.assertNotEqual(waitcount, 0, 'Timed out waiting for CommandCompleted event from bitbake server') | 130 | self.assertNotEqual(waitcount, 0, 'Timed out waiting for CommandCompleted event from bitbake server') |
| 123 | self.assertTrue(eventreceived, 'Did not receive FilesMatchingFound event from bitbake server') | 131 | self.assertTrue(eventreceived, 'Did not receive FilesMatchingFound event from bitbake server') |
| 124 | 132 | ||
| 133 | @testcase(1576) | ||
| 125 | def test_setvariable_clean(self): | 134 | def test_setvariable_clean(self): |
| 126 | # First check that setVariable affects the datastore | 135 | # First check that setVariable affects the datastore |
| 127 | with bb.tinfoil.Tinfoil() as tinfoil: | 136 | with bb.tinfoil.Tinfoil() as tinfoil: |
