summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPaul Eggleton <paul.eggleton@linux.intel.com>2016-11-10 14:45:15 +1300
committerRichard Purdie <richard.purdie@linuxfoundation.org>2016-11-23 11:10:12 +0000
commite5a391795aa49645d1a6033becb6a6c1f96e6fb9 (patch)
tree8673238a7b77ac46410f37904ae3875a3bb5c27d
parent0ffd92707b089ecdd8ec81430cebae85aca4be00 (diff)
downloadpoky-e5a391795aa49645d1a6033becb6a6c1f96e6fb9.tar.gz
oe-selftest: devtool: test update-recipe with only local files
Add a test to ensure devtool update-recipe works properly on recipes that contain only local files (since the other tests we have didn't test that). Relates to [YOCTO #10563]. (From OE-Core rev: bdc844b3f0c3fbddcd3523095899a5bd29797704) Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-rw-r--r--meta-selftest/recipes-test/devtool/devtool-test-localonly.bb6
-rw-r--r--meta-selftest/recipes-test/devtool/devtool-test-localonly/file11
-rw-r--r--meta-selftest/recipes-test/devtool/devtool-test-localonly/file21
-rw-r--r--meta/lib/oeqa/selftest/devtool.py18
4 files changed, 26 insertions, 0 deletions
diff --git a/meta-selftest/recipes-test/devtool/devtool-test-localonly.bb b/meta-selftest/recipes-test/devtool/devtool-test-localonly.bb
new file mode 100644
index 0000000000..28ff49ef85
--- /dev/null
+++ b/meta-selftest/recipes-test/devtool/devtool-test-localonly.bb
@@ -0,0 +1,6 @@
1LICENSE = "CLOSED"
2INHIBIT_DEFAULT_DEPS = "1"
3
4SRC_URI = "file://file1 \
5 file://file2"
6
diff --git a/meta-selftest/recipes-test/devtool/devtool-test-localonly/file1 b/meta-selftest/recipes-test/devtool/devtool-test-localonly/file1
new file mode 100644
index 0000000000..f4bdcfc831
--- /dev/null
+++ b/meta-selftest/recipes-test/devtool/devtool-test-localonly/file1
@@ -0,0 +1 @@
The first file
diff --git a/meta-selftest/recipes-test/devtool/devtool-test-localonly/file2 b/meta-selftest/recipes-test/devtool/devtool-test-localonly/file2
new file mode 100644
index 0000000000..a7e2414bd5
--- /dev/null
+++ b/meta-selftest/recipes-test/devtool/devtool-test-localonly/file2
@@ -0,0 +1 @@
The second file
diff --git a/meta/lib/oeqa/selftest/devtool.py b/meta/lib/oeqa/selftest/devtool.py
index 46f5a0b998..f6226c1ad9 100644
--- a/meta/lib/oeqa/selftest/devtool.py
+++ b/meta/lib/oeqa/selftest/devtool.py
@@ -930,6 +930,24 @@ class DevtoolTests(DevtoolBase):
930 ('??', '.*/0001-Add-new-file.patch$')] 930 ('??', '.*/0001-Add-new-file.patch$')]
931 self._check_repo_status(os.path.dirname(recipefile), expected_status) 931 self._check_repo_status(os.path.dirname(recipefile), expected_status)
932 932
933 def test_devtool_update_recipe_local_files_3(self):
934 # First, modify the recipe
935 testrecipe = 'devtool-test-localonly'
936 recipefile = get_bb_var('FILE', testrecipe)
937 src_uri = get_bb_var('SRC_URI', testrecipe)
938 tempdir = tempfile.mkdtemp(prefix='devtoolqa')
939 self.track_for_cleanup(tempdir)
940 self.track_for_cleanup(self.workspacedir)
941 self.add_command_to_tearDown('bitbake-layers remove-layer */workspace')
942 # (don't bother with cleaning the recipe on teardown, we won't be building it)
943 result = runCmd('devtool modify %s' % testrecipe)
944 # Modify one file
945 runCmd('echo "Another line" >> file2', cwd=os.path.join(self.workspacedir, 'sources', testrecipe, 'oe-local-files'))
946 self.add_command_to_tearDown('cd %s; rm %s/*; git checkout %s %s' % (os.path.dirname(recipefile), testrecipe, testrecipe, os.path.basename(recipefile)))
947 result = runCmd('devtool update-recipe %s' % testrecipe)
948 expected_status = [(' M', '.*/%s/file2$' % testrecipe)]
949 self._check_repo_status(os.path.dirname(recipefile), expected_status)
950
933 @testcase(1163) 951 @testcase(1163)
934 def test_devtool_extract(self): 952 def test_devtool_extract(self):
935 tempdir = tempfile.mkdtemp(prefix='devtoolqa') 953 tempdir = tempfile.mkdtemp(prefix='devtoolqa')