summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--meta-selftest/recipes-test/devtool/devtool-patch-overrides.bb8
-rw-r--r--meta-selftest/recipes-test/devtool/devtool-patch-overrides/qemuarm/arm.patch5
-rw-r--r--meta-selftest/recipes-test/devtool/devtool-patch-overrides/qemux86/x86.patch5
-rw-r--r--meta-selftest/recipes-test/devtool/devtool-patch-overrides/source1
-rw-r--r--meta/lib/oeqa/selftest/cases/devtool.py20
5 files changed, 39 insertions, 0 deletions
diff --git a/meta-selftest/recipes-test/devtool/devtool-patch-overrides.bb b/meta-selftest/recipes-test/devtool/devtool-patch-overrides.bb
new file mode 100644
index 0000000000..d36c9edee4
--- /dev/null
+++ b/meta-selftest/recipes-test/devtool/devtool-patch-overrides.bb
@@ -0,0 +1,8 @@
1SUMMARY = "devtool test for overrides and patches"
2LICENSE = "CLOSED"
3INHIBIT_DEFAULT_DEPS = "1"
4EXCLUDE_FROM_WORLD = "1"
5
6SRC_URI = "file://source;subdir=${BP}"
7SRC_URI_append_qemuarm = " file://arm.patch;striplevel=0"
8SRC_URI_append_qemux86 = " file://x86.patch;striplevel=0"
diff --git a/meta-selftest/recipes-test/devtool/devtool-patch-overrides/qemuarm/arm.patch b/meta-selftest/recipes-test/devtool/devtool-patch-overrides/qemuarm/arm.patch
new file mode 100644
index 0000000000..e33a2753f9
--- /dev/null
+++ b/meta-selftest/recipes-test/devtool/devtool-patch-overrides/qemuarm/arm.patch
@@ -0,0 +1,5 @@
1--- source.orig 2020-10-06 13:26:10.792688630 +0100
2+++ source 2020-10-06 13:26:18.853424694 +0100
3@@ -1 +1 @@
4-This is a test for something
5+This is a test for qemuarm
diff --git a/meta-selftest/recipes-test/devtool/devtool-patch-overrides/qemux86/x86.patch b/meta-selftest/recipes-test/devtool/devtool-patch-overrides/qemux86/x86.patch
new file mode 100644
index 0000000000..1a0a175fa8
--- /dev/null
+++ b/meta-selftest/recipes-test/devtool/devtool-patch-overrides/qemux86/x86.patch
@@ -0,0 +1,5 @@
1--- source.orig 2020-10-06 13:26:10.792688630 +0100
2+++ source 2020-10-06 13:26:18.853424694 +0100
3@@ -1 +1 @@
4-This is a test for something
5+This is a test for qemux86
diff --git a/meta-selftest/recipes-test/devtool/devtool-patch-overrides/source b/meta-selftest/recipes-test/devtool/devtool-patch-overrides/source
new file mode 100644
index 0000000000..cc14ce627c
--- /dev/null
+++ b/meta-selftest/recipes-test/devtool/devtool-patch-overrides/source
@@ -0,0 +1 @@
This is a test for something
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
787class DevtoolUpdateTests(DevtoolBase): 807class DevtoolUpdateTests(DevtoolBase):
788 808
789 def test_devtool_update_recipe(self): 809 def test_devtool_update_recipe(self):