diff options
author | Ross Burton <ross@burtonini.com> | 2020-10-07 19:21:51 +0100 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2020-10-08 08:08:32 +0100 |
commit | d6bc178f33179b2254533d486082a9b0de36477e (patch) | |
tree | 3fa71a3c5afb88e5d0d8551277829e8bc63e587a /meta/lib | |
parent | 961de02fd14bcd201a07a69eb3287be76084a5a2 (diff) | |
download | poky-d6bc178f33179b2254533d486082a9b0de36477e.tar.gz |
selftest: add test for recipes with patches in overrides
devtool doesn't quite behave right when a recipe has patches applied in overrides, so
add a test case to exercise that behaviour.
(From OE-Core rev: ad89c3254cc6c06026f1bebe23ec3717c1546633)
Signed-off-by: Ross Burton <ross.burton@arm.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/lib')
-rw-r--r-- | meta/lib/oeqa/selftest/cases/devtool.py | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/meta/lib/oeqa/selftest/cases/devtool.py b/meta/lib/oeqa/selftest/cases/devtool.py index 2c9ff7a95a..0185e670ad 100644 --- a/meta/lib/oeqa/selftest/cases/devtool.py +++ b/meta/lib/oeqa/selftest/cases/devtool.py | |||
@@ -784,6 +784,26 @@ class DevtoolModifyTests(DevtoolBase): | |||
784 | self._check_src_repo(tempdir) | 784 | self._check_src_repo(tempdir) |
785 | # This is probably sufficient | 785 | # This is probably sufficient |
786 | 786 | ||
787 | def test_devtool_modify_overrides(self): | ||
788 | # Try modifying a recipe with patches in overrides | ||
789 | tempdir = tempfile.mkdtemp(prefix='devtoolqa') | ||
790 | self.track_for_cleanup(tempdir) | ||
791 | self.track_for_cleanup(self.workspacedir) | ||
792 | self.add_command_to_tearDown('bitbake-layers remove-layer */workspace') | ||
793 | result = runCmd('devtool modify devtool-patch-overrides -x %s' % (tempdir)) | ||
794 | |||
795 | self._check_src_repo(tempdir) | ||
796 | source = os.path.join(tempdir, "source") | ||
797 | def check(branch, expected): | ||
798 | runCmd('git -C %s checkout %s' % (tempdir, branch)) | ||
799 | with open(source, "rt") as f: | ||
800 | content = f.read() | ||
801 | self.assertEquals(content, expected) | ||
802 | check('devtool', 'This is a test for something\n') | ||
803 | check('devtool-no-overrides', 'This is a test for something\n') | ||
804 | check('devtool-override-qemuarm', 'This is a test for qemuarm\n') | ||
805 | check('devtool-override-qemux86', 'This is a test for qemux86\n') | ||
806 | |||
787 | class DevtoolUpdateTests(DevtoolBase): | 807 | class DevtoolUpdateTests(DevtoolBase): |
788 | 808 | ||
789 | def test_devtool_update_recipe(self): | 809 | def test_devtool_update_recipe(self): |