diff options
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 @@ | |||
1 | LICENSE = "CLOSED" | ||
2 | INHIBIT_DEFAULT_DEPS = "1" | ||
3 | |||
4 | SRC_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') |