oe-selftest: devtool: fix test for changes in lzo recipe
cover oe-selftest: devtool: fix test for changes in lzo recipe
A fix for one of the devtool oe-selftest tests to handle Ross's lzo acinclude.m4 fix.
The following changes since commit a7cd9d1183be603777fc9c8c448281fe01224f7b:
lib/oe/utils: remove param_bool() (2017-12-02 11:24:38 +0000)
are available in the git repository at:
git://git.openembedded.org/openembedded-core-contrib paule/devtool-selftest-fix
http://cgit.openembedded.org/openembedded-core-contrib/log/?h=paule/devtool-selftest-fix
Paul Eggleton (1):
oe-selftest: devtool: fix test for changes in lzo recipe
meta-selftest/recipes-test/devtool/devtool-test-local/file1 | 1 + meta-selftest/recipes-test/devtool/devtool-test-local/file2 | 1 + .../recipes-test/devtool/devtool-test-local_6.03.bb | 10 ++++++++++ meta/lib/oeqa/selftest/cases/devtool.py | 12 ++++++------ 4 files changed, 18 insertions(+), 6 deletions(-) create mode 100644 meta-selftest/recipes-test/devtool/devtool-test-local/file1 create mode 100644 meta-selftest/recipes-test/devtool/devtool-test-local/file2 create mode 100644 meta-selftest/recipes-test/devtool/devtool-test-local_6.03.bb
Signature · 1 line
2.9.5
PATCH 1/1 oe-selftest: devtool: fix test for changes in lzo recipe
acinclude.m4 is about to be removed from the lzo recipe which breaks test_devtool_update_recipe_local_files_2. Create a synthetic recipe in meta-selftest with some local files and use that instead.
--- meta-selftest/recipes-test/devtool/devtool-test-local/file1 | 1 + meta-selftest/recipes-test/devtool/devtool-test-local/file2 | 1 + .../recipes-test/devtool/devtool-test-local_6.03.bb | 10 ++++++++++ meta/lib/oeqa/selftest/cases/devtool.py | 12 ++++++------ 4 files changed, 18 insertions(+), 6 deletions(-) create mode 100644 meta-selftest/recipes-test/devtool/devtool-test-local/file1 create mode 100644 meta-selftest/recipes-test/devtool/devtool-test-local/file2 create mode 100644 meta-selftest/recipes-test/devtool/devtool-test-local_6.03.bb
meta-selftest/recipes-test/devtool/devtool-test-local/file1 new file +1 -0
@@ -0,0 +1 @@ +The first file
meta-selftest/recipes-test/devtool/devtool-test-local/file2 new file +1 -0
@@ -0,0 +1 @@ +The second file
meta-selftest/recipes-test/devtool/devtool-test-local_6.03.bb new file +10 -0
@@ -0,0 +1,10 @@ +LICENSE = "GPLv2+" +LIC_FILES_CHKSUM = "file://COPYING;md5=0636e73ff0215e8d672dc4c32c317bb3" + +INHIBIT_DEFAULT_DEPS = "1" + +SRC_URI = "http://downloads.yoctoproject.org/mirror/sources/syslinux-6.03.tar.xz \ + file://file1 \ + file://file2" + +EXCLUDE_FROM_WORLD = "1"
meta/lib/oeqa/selftest/cases/devtool.py +6 -6
@@ -987,7 +987,7 @@ class DevtoolTests(DevtoolBase): @OETestID(1371) def test_devtool_update_recipe_local_files_2(self): """Check local source files support when oe-local-files is in Git""" - testrecipe = 'lzo' + testrecipe = 'devtool-test-local' recipefile = get_bb_var('FILE', testrecipe) # Setup srctree for modifying the recipe tempdir = tempfile.mkdtemp(prefix='devtoolqa')
@@ -1002,9 +1002,9 @@ class DevtoolTests(DevtoolBase): runCmd('git add oe-local-files', cwd=tempdir) runCmd('git commit -m "Add local sources"', cwd=tempdir) # Edit / commit local sources - runCmd('echo "# Foobar" >> oe-local-files/acinclude.m4', cwd=tempdir) + runCmd('echo "# Foobar" >> oe-local-files/file1', cwd=tempdir) runCmd('git commit -am "Edit existing file"', cwd=tempdir) - runCmd('git rm oe-local-files/run-ptest', cwd=tempdir) + runCmd('git rm oe-local-files/file2', cwd=tempdir) runCmd('git commit -m"Remove file"', cwd=tempdir) runCmd('echo "Foo" > oe-local-files/new-local', cwd=tempdir) runCmd('git add oe-local-files/new-local', cwd=tempdir)
@@ -1016,11 +1016,11 @@ class DevtoolTests(DevtoolBase): os.path.dirname(recipefile)) # Checkout unmodified file to working copy -> devtool should still pick # the modified version from HEAD - runCmd('git checkout HEAD^ -- oe-local-files/acinclude.m4', cwd=tempdir) + runCmd('git checkout HEAD^ -- oe-local-files/file1', cwd=tempdir) runCmd('devtool update-recipe %s' % testrecipe) expected_status = [(' M', '.*/%s$' % os.path.basename(recipefile)), - (' M', '.*/acinclude.m4$'), - (' D', '.*/run-ptest$'), + (' M', '.*/file1$'), + (' D', '.*/file2$'), ('??', '.*/new-local$'), ('??', '.*/0001-Add-new-file.patch$')] self._check_repo_status(os.path.dirname(recipefile), expected_status)
Signature · 1 line
2.9.5