diff options
author | Daniel Istrate <daniel.alexandrux.istrate@intel.com> | 2015-10-23 15:07:51 +0300 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2015-10-27 07:24:28 +0000 |
commit | 426a9b78d0018a739ec06c5dddcd0f8b6c4194cf (patch) | |
tree | cc33f531c7c2aa59b43f18c97223efb1b250f6b6 /meta/lib/oeqa/selftest/recipetool.py | |
parent | 835525c8bb79007b262b10e9f473ebfa1e4c8ceb (diff) | |
download | poky-426a9b78d0018a739ec06c5dddcd0f8b6c4194cf.tar.gz |
oeqa/selftest: Added testcase decorators.
Added testcase decorators for testopia integration.
(From OE-Core rev: 9c7ffd397c8232d53c87017e58e03e3056863edf)
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/recipetool.py')
-rw-r--r-- | meta/lib/oeqa/selftest/recipetool.py | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/meta/lib/oeqa/selftest/recipetool.py b/meta/lib/oeqa/selftest/recipetool.py index c34ad68870..b1f1d2ab90 100644 --- a/meta/lib/oeqa/selftest/recipetool.py +++ b/meta/lib/oeqa/selftest/recipetool.py | |||
@@ -492,9 +492,12 @@ class RecipetoolAppendsrcBase(RecipetoolBase): | |||
492 | 492 | ||
493 | 493 | ||
494 | class RecipetoolAppendsrcTests(RecipetoolAppendsrcBase): | 494 | class RecipetoolAppendsrcTests(RecipetoolAppendsrcBase): |
495 | |||
496 | @testcase(1273) | ||
495 | def test_recipetool_appendsrcfile_basic(self): | 497 | def test_recipetool_appendsrcfile_basic(self): |
496 | self._test_appendsrcfile('base-files', 'a-file') | 498 | self._test_appendsrcfile('base-files', 'a-file') |
497 | 499 | ||
500 | @testcase(1274) | ||
498 | def test_recipetool_appendsrcfile_basic_wildcard(self): | 501 | def test_recipetool_appendsrcfile_basic_wildcard(self): |
499 | testrecipe = 'base-files' | 502 | testrecipe = 'base-files' |
500 | self._test_appendsrcfile(testrecipe, 'a-file', options='-w') | 503 | self._test_appendsrcfile(testrecipe, 'a-file', options='-w') |
@@ -502,12 +505,15 @@ class RecipetoolAppendsrcTests(RecipetoolAppendsrcBase): | |||
502 | bbappendfile = self._check_bbappend(testrecipe, recipefile, self.templayerdir) | 505 | bbappendfile = self._check_bbappend(testrecipe, recipefile, self.templayerdir) |
503 | self.assertEqual(os.path.basename(bbappendfile), '%s_%%.bbappend' % testrecipe) | 506 | self.assertEqual(os.path.basename(bbappendfile), '%s_%%.bbappend' % testrecipe) |
504 | 507 | ||
508 | @testcase(1281) | ||
505 | def test_recipetool_appendsrcfile_subdir_basic(self): | 509 | def test_recipetool_appendsrcfile_subdir_basic(self): |
506 | self._test_appendsrcfile('base-files', 'a-file', 'tmp') | 510 | self._test_appendsrcfile('base-files', 'a-file', 'tmp') |
507 | 511 | ||
512 | @testcase(1282) | ||
508 | def test_recipetool_appendsrcfile_subdir_basic_dirdest(self): | 513 | def test_recipetool_appendsrcfile_subdir_basic_dirdest(self): |
509 | self._test_appendsrcfile('base-files', destdir='tmp') | 514 | self._test_appendsrcfile('base-files', destdir='tmp') |
510 | 515 | ||
516 | @testcase(1280) | ||
511 | def test_recipetool_appendsrcfile_srcdir_basic(self): | 517 | def test_recipetool_appendsrcfile_srcdir_basic(self): |
512 | testrecipe = 'bash' | 518 | testrecipe = 'bash' |
513 | srcdir = get_bb_var('S', testrecipe) | 519 | srcdir = get_bb_var('S', testrecipe) |
@@ -515,12 +521,14 @@ class RecipetoolAppendsrcTests(RecipetoolAppendsrcBase): | |||
515 | subdir = os.path.relpath(srcdir, workdir) | 521 | subdir = os.path.relpath(srcdir, workdir) |
516 | self._test_appendsrcfile(testrecipe, 'a-file', srcdir=subdir) | 522 | self._test_appendsrcfile(testrecipe, 'a-file', srcdir=subdir) |
517 | 523 | ||
524 | @testcase(1275) | ||
518 | def test_recipetool_appendsrcfile_existing_in_src_uri(self): | 525 | def test_recipetool_appendsrcfile_existing_in_src_uri(self): |
519 | testrecipe = 'base-files' | 526 | testrecipe = 'base-files' |
520 | filepath = self._get_first_file_uri(testrecipe) | 527 | filepath = self._get_first_file_uri(testrecipe) |
521 | self.assertTrue(filepath, 'Unable to test, no file:// uri found in SRC_URI for %s' % testrecipe) | 528 | self.assertTrue(filepath, 'Unable to test, no file:// uri found in SRC_URI for %s' % testrecipe) |
522 | self._test_appendsrcfile(testrecipe, filepath, has_src_uri=False) | 529 | self._test_appendsrcfile(testrecipe, filepath, has_src_uri=False) |
523 | 530 | ||
531 | @testcase(1276) | ||
524 | def test_recipetool_appendsrcfile_existing_in_src_uri_diff_params(self): | 532 | def test_recipetool_appendsrcfile_existing_in_src_uri_diff_params(self): |
525 | testrecipe = 'base-files' | 533 | testrecipe = 'base-files' |
526 | subdir = 'tmp' | 534 | subdir = 'tmp' |
@@ -530,6 +538,7 @@ class RecipetoolAppendsrcTests(RecipetoolAppendsrcBase): | |||
530 | output = self._test_appendsrcfile(testrecipe, filepath, subdir, has_src_uri=False) | 538 | output = self._test_appendsrcfile(testrecipe, filepath, subdir, has_src_uri=False) |
531 | self.assertTrue(any('with different parameters' in l for l in output)) | 539 | self.assertTrue(any('with different parameters' in l for l in output)) |
532 | 540 | ||
541 | @testcase(1277) | ||
533 | def test_recipetool_appendsrcfile_replace_file_srcdir(self): | 542 | def test_recipetool_appendsrcfile_replace_file_srcdir(self): |
534 | testrecipe = 'bash' | 543 | testrecipe = 'bash' |
535 | filepath = 'Makefile.in' | 544 | filepath = 'Makefile.in' |
@@ -541,6 +550,7 @@ class RecipetoolAppendsrcTests(RecipetoolAppendsrcBase): | |||
541 | bitbake('%s:do_unpack' % testrecipe) | 550 | bitbake('%s:do_unpack' % testrecipe) |
542 | self.assertEqual(open(self.testfile, 'r').read(), open(os.path.join(srcdir, filepath), 'r').read()) | 551 | self.assertEqual(open(self.testfile, 'r').read(), open(os.path.join(srcdir, filepath), 'r').read()) |
543 | 552 | ||
553 | @testcase(1278) | ||
544 | def test_recipetool_appendsrcfiles_basic(self, destdir=None): | 554 | def test_recipetool_appendsrcfiles_basic(self, destdir=None): |
545 | newfiles = [self.testfile] | 555 | newfiles = [self.testfile] |
546 | for i in range(1, 5): | 556 | for i in range(1, 5): |
@@ -550,5 +560,6 @@ class RecipetoolAppendsrcTests(RecipetoolAppendsrcBase): | |||
550 | newfiles.append(testfile) | 560 | newfiles.append(testfile) |
551 | self._test_appendsrcfiles('gcc', newfiles, destdir=destdir, options='-W') | 561 | self._test_appendsrcfiles('gcc', newfiles, destdir=destdir, options='-W') |
552 | 562 | ||
563 | @testcase(1279) | ||
553 | def test_recipetool_appendsrcfiles_basic_subdir(self): | 564 | def test_recipetool_appendsrcfiles_basic_subdir(self): |
554 | self.test_recipetool_appendsrcfiles_basic(destdir='testdir') | 565 | self.test_recipetool_appendsrcfiles_basic(destdir='testdir') |