summaryrefslogtreecommitdiffstats
path: root/meta/lib/oeqa/selftest/devtool.py
diff options
context:
space:
mode:
authorDaniel Istrate <daniel.alexandrux.istrate@intel.com>2015-06-29 15:18:41 +0300
committerRichard Purdie <richard.purdie@linuxfoundation.org>2015-07-08 00:01:19 +0100
commitffa54b94b636a24aa5264916d2b1abfcf029f7ae (patch)
tree1d8ec88873ceaf27a0c6bb1045c6d0ee8f7887ea /meta/lib/oeqa/selftest/devtool.py
parent9f91aa697fb2cf5314aa4a99b2abbf0229cb1ea2 (diff)
downloadpoky-ffa54b94b636a24aa5264916d2b1abfcf029f7ae.tar.gz
oeqa/selftest: Added @testcase decorators to oeselftest testcases.
Added decorator to some testcases missing this feature. (From OE-Core rev: 2a9009583fd498df94a55f21a149e302180f19cc) Signed-off-by: Daniel Istrate <daniel.alexandrux.istrate@intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/lib/oeqa/selftest/devtool.py')
-rw-r--r--meta/lib/oeqa/selftest/devtool.py15
1 files changed, 15 insertions, 0 deletions
diff --git a/meta/lib/oeqa/selftest/devtool.py b/meta/lib/oeqa/selftest/devtool.py
index c4a0399832..ab412b6168 100644
--- a/meta/lib/oeqa/selftest/devtool.py
+++ b/meta/lib/oeqa/selftest/devtool.py
@@ -84,6 +84,7 @@ class DevtoolBase(oeSelfTest):
84 84
85class DevtoolTests(DevtoolBase): 85class DevtoolTests(DevtoolBase):
86 86
87 @testcase(1158)
87 def test_create_workspace(self): 88 def test_create_workspace(self):
88 # Check preconditions 89 # Check preconditions
89 workspacedir = os.path.join(self.builddir, 'workspace') 90 workspacedir = os.path.join(self.builddir, 'workspace')
@@ -106,6 +107,7 @@ class DevtoolTests(DevtoolBase):
106 self.assertNotIn(tempdir, result.output) 107 self.assertNotIn(tempdir, result.output)
107 self.assertIn(workspacedir, result.output) 108 self.assertIn(workspacedir, result.output)
108 109
110 @testcase(1159)
109 def test_devtool_add(self): 111 def test_devtool_add(self):
110 # Check preconditions 112 # Check preconditions
111 workspacedir = os.path.join(self.builddir, 'workspace') 113 workspacedir = os.path.join(self.builddir, 'workspace')
@@ -140,6 +142,7 @@ class DevtoolTests(DevtoolBase):
140 bindir = bindir[1:] 142 bindir = bindir[1:]
141 self.assertTrue(os.path.isfile(os.path.join(installdir, bindir, 'pv')), 'pv binary not found in D') 143 self.assertTrue(os.path.isfile(os.path.join(installdir, bindir, 'pv')), 'pv binary not found in D')
142 144
145 @testcase(1162)
143 def test_devtool_add_library(self): 146 def test_devtool_add_library(self):
144 # Check preconditions 147 # Check preconditions
145 workspacedir = os.path.join(self.builddir, 'workspace') 148 workspacedir = os.path.join(self.builddir, 'workspace')
@@ -180,6 +183,7 @@ class DevtoolTests(DevtoolBase):
180 self.assertFalse(matches, 'Stamp files exist for recipe libftdi that should have been cleaned') 183 self.assertFalse(matches, 'Stamp files exist for recipe libftdi that should have been cleaned')
181 self.assertFalse(os.path.isfile(os.path.join(staging_libdir, 'libftdi1.so.2.1.0')), 'libftdi binary still found in STAGING_LIBDIR after cleaning') 184 self.assertFalse(os.path.isfile(os.path.join(staging_libdir, 'libftdi1.so.2.1.0')), 'libftdi binary still found in STAGING_LIBDIR after cleaning')
182 185
186 @testcase(1160)
183 def test_devtool_add_fetch(self): 187 def test_devtool_add_fetch(self):
184 # Check preconditions 188 # Check preconditions
185 workspacedir = os.path.join(self.builddir, 'workspace') 189 workspacedir = os.path.join(self.builddir, 'workspace')
@@ -226,6 +230,7 @@ class DevtoolTests(DevtoolBase):
226 checkvars['SRC_URI'] = url.replace(testver, '${PV}') 230 checkvars['SRC_URI'] = url.replace(testver, '${PV}')
227 self._test_recipe_contents(recipefile, checkvars, []) 231 self._test_recipe_contents(recipefile, checkvars, [])
228 232
233 @testcase(1161)
229 def test_devtool_add_fetch_git(self): 234 def test_devtool_add_fetch_git(self):
230 # Check preconditions 235 # Check preconditions
231 workspacedir = os.path.join(self.builddir, 'workspace') 236 workspacedir = os.path.join(self.builddir, 'workspace')
@@ -277,6 +282,7 @@ class DevtoolTests(DevtoolBase):
277 checkvars['SRCREV'] = checkrev 282 checkvars['SRCREV'] = checkrev
278 self._test_recipe_contents(recipefile, checkvars, []) 283 self._test_recipe_contents(recipefile, checkvars, [])
279 284
285 @testcase(1164)
280 def test_devtool_modify(self): 286 def test_devtool_modify(self):
281 # Check preconditions 287 # Check preconditions
282 workspacedir = os.path.join(self.builddir, 'workspace') 288 workspacedir = os.path.join(self.builddir, 'workspace')
@@ -328,6 +334,7 @@ class DevtoolTests(DevtoolBase):
328 matches = glob.glob(stampprefix + '*') 334 matches = glob.glob(stampprefix + '*')
329 self.assertFalse(matches, 'Stamp files exist for recipe mdadm that should have been cleaned') 335 self.assertFalse(matches, 'Stamp files exist for recipe mdadm that should have been cleaned')
330 336
337 @testcase(1166)
331 def test_devtool_modify_invalid(self): 338 def test_devtool_modify_invalid(self):
332 # Check preconditions 339 # Check preconditions
333 workspacedir = os.path.join(self.builddir, 'workspace') 340 workspacedir = os.path.join(self.builddir, 'workspace')
@@ -360,6 +367,7 @@ class DevtoolTests(DevtoolBase):
360 self.assertNotEqual(result.status, 0, 'devtool modify on %s should have failed' % testrecipe) 367 self.assertNotEqual(result.status, 0, 'devtool modify on %s should have failed' % testrecipe)
361 self.assertIn('ERROR: ', result.output, 'devtool modify on %s should have given an ERROR' % testrecipe) 368 self.assertIn('ERROR: ', result.output, 'devtool modify on %s should have given an ERROR' % testrecipe)
362 369
370 @testcase(1165)
363 def test_devtool_modify_git(self): 371 def test_devtool_modify_git(self):
364 # Check preconditions 372 # Check preconditions
365 workspacedir = os.path.join(self.builddir, 'workspace') 373 workspacedir = os.path.join(self.builddir, 'workspace')
@@ -393,6 +401,7 @@ class DevtoolTests(DevtoolBase):
393 # Try building 401 # Try building
394 bitbake(testrecipe) 402 bitbake(testrecipe)
395 403
404 @testcase(1167)
396 def test_devtool_modify_localfiles(self): 405 def test_devtool_modify_localfiles(self):
397 # Check preconditions 406 # Check preconditions
398 workspacedir = os.path.join(self.builddir, 'workspace') 407 workspacedir = os.path.join(self.builddir, 'workspace')
@@ -425,6 +434,7 @@ class DevtoolTests(DevtoolBase):
425 # Try building 434 # Try building
426 bitbake(testrecipe) 435 bitbake(testrecipe)
427 436
437 @testcase(1169)
428 def test_devtool_update_recipe(self): 438 def test_devtool_update_recipe(self):
429 # Check preconditions 439 # Check preconditions
430 workspacedir = os.path.join(self.builddir, 'workspace') 440 workspacedir = os.path.join(self.builddir, 'workspace')
@@ -471,6 +481,7 @@ class DevtoolTests(DevtoolBase):
471 else: 481 else:
472 raise AssertionError('Unexpected modified file in status: %s' % line) 482 raise AssertionError('Unexpected modified file in status: %s' % line)
473 483
484 @testcase(1172)
474 def test_devtool_update_recipe_git(self): 485 def test_devtool_update_recipe_git(self):
475 # Check preconditions 486 # Check preconditions
476 workspacedir = os.path.join(self.builddir, 'workspace') 487 workspacedir = os.path.join(self.builddir, 'workspace')
@@ -545,6 +556,7 @@ class DevtoolTests(DevtoolBase):
545 break 556 break
546 self.assertTrue(matched, 'Unexpected diff remove line: %s' % line) 557 self.assertTrue(matched, 'Unexpected diff remove line: %s' % line)
547 558
559 @testcase(1170)
548 def test_devtool_update_recipe_append(self): 560 def test_devtool_update_recipe_append(self):
549 # Check preconditions 561 # Check preconditions
550 workspacedir = os.path.join(self.builddir, 'workspace') 562 workspacedir = os.path.join(self.builddir, 'workspace')
@@ -620,6 +632,7 @@ class DevtoolTests(DevtoolBase):
620 self.assertEqual(expectedlines, f.readlines()) 632 self.assertEqual(expectedlines, f.readlines())
621 # Deleting isn't expected to work under these circumstances 633 # Deleting isn't expected to work under these circumstances
622 634
635 @testcase(1171)
623 def test_devtool_update_recipe_append_git(self): 636 def test_devtool_update_recipe_append_git(self):
624 # Check preconditions 637 # Check preconditions
625 workspacedir = os.path.join(self.builddir, 'workspace') 638 workspacedir = os.path.join(self.builddir, 'workspace')
@@ -716,6 +729,7 @@ class DevtoolTests(DevtoolBase):
716 self.assertEqual(expectedlines, f.readlines()) 729 self.assertEqual(expectedlines, f.readlines())
717 # Deleting isn't expected to work under these circumstances 730 # Deleting isn't expected to work under these circumstances
718 731
732 @testcase(1163)
719 def test_devtool_extract(self): 733 def test_devtool_extract(self):
720 # Check preconditions 734 # Check preconditions
721 workspacedir = os.path.join(self.builddir, 'workspace') 735 workspacedir = os.path.join(self.builddir, 'workspace')
@@ -729,6 +743,7 @@ class DevtoolTests(DevtoolBase):
729 self.assertTrue(os.path.exists(os.path.join(tempdir, 'Makefile.am')), 'Extracted source could not be found') 743 self.assertTrue(os.path.exists(os.path.join(tempdir, 'Makefile.am')), 'Extracted source could not be found')
730 self.assertTrue(os.path.isdir(os.path.join(tempdir, '.git')), 'git repository for external source tree not found') 744 self.assertTrue(os.path.isdir(os.path.join(tempdir, '.git')), 'git repository for external source tree not found')
731 745
746 @testcase(1168)
732 def test_devtool_reset_all(self): 747 def test_devtool_reset_all(self):
733 # Check preconditions 748 # Check preconditions
734 workspacedir = os.path.join(self.builddir, 'workspace') 749 workspacedir = os.path.join(self.builddir, 'workspace')