oe-selftest fixes for devtool
cover oe-selftest fixes for devtool
Fix a couple of regressions in the oe-selftest tests for devtool (one caused by me, the other caused by the recent PN change in gcc-source), plus one more improvement to how we deal with tap devices in the test for "devtool deploy-target".
The following changes since commit 52d5ab7fcea7028ff1d10b3e2416c0179128ba71:
bluez: update to 5.30 (2015-05-07 13:14:39 +0100)
are available in the git repository at:
git://git.openembedded.org/openembedded-core-contrib paule/devtool-selftests
http://cgit.openembedded.org/cgit.cgi/openembedded-core-contrib/log/?h=paule/devtool-selftests
Paul Eggleton (3):
oe-selftest: devtool: fix broken URL in test_devtool_add_fetch
devtool: fix for rename of gcc-source
oe-selftest: devtool: add a proper test to see if tap devices exist
meta/lib/oeqa/selftest/devtool.py | 22 ++++++++++++++++++++-- scripts/lib/devtool/standard.py | 2 +- 2 files changed, 21 insertions(+), 3 deletions(-)
Signature · 1 line
2.1.0
PATCH 1/3 oe-selftest: devtool: fix broken URL in test_devtool_add_fetch
I already had the file fetched from some previous work and thus it didn't attempt to download the invalid URL when I tested it earlier.
Part of the fix for [YOCTO #7729].
--- meta/lib/oeqa/selftest/devtool.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
meta/lib/oeqa/selftest/devtool.py +1 -1
@@ -175,7 +175,7 @@ class DevtoolTests(oeSelfTest): tempdir = tempfile.mkdtemp(prefix='devtoolqa') self.track_for_cleanup(tempdir) testver = '0.23' - url = 'https://pypi.python.org/packages/source/J/MarkupSafe/MarkupSafe-%s.tar.gz' % testver + url = 'https://pypi.python.org/packages/source/M/MarkupSafe/MarkupSafe-%s.tar.gz' % testver testrecipe = 'python-markupsafe' srcdir = os.path.join(tempdir, testrecipe) # Test devtool add
Signature · 1 line
2.1.0
PATCH 2/3 devtool: fix for rename of gcc-source
In reply to Paul EggletonAfter OE-Core commit 67db7182faf6742b0d971d61d8c5ba34f69d2e12, PV is appended to the end of the gcc-source PN, thus we need to handle that in devtool and the corresponding test.
Part of the fix for [YOCTO #7729].
--- meta/lib/oeqa/selftest/devtool.py | 10 +++++++++- scripts/lib/devtool/standard.py | 2 +- 2 files changed, 10 insertions(+), 2 deletions(-)
meta/lib/oeqa/selftest/devtool.py +9 -1
@@ -325,7 +325,15 @@ class DevtoolTests(oeSelfTest): self.track_for_cleanup(workspacedir) self.add_command_to_tearDown('bitbake-layers remove-layer */workspace') - testrecipes = 'perf gcc-source kernel-devsrc package-index core-image-minimal meta-toolchain packagegroup-core-sdk meta-ide-support'.split() + testrecipes = 'perf kernel-devsrc package-index core-image-minimal meta-toolchain packagegroup-core-sdk meta-ide-support'.split() + # Find actual name of gcc-source since it now includes the version - crude, but good enough for this purpose + result = runCmd('bitbake-layers show-recipes gcc-source*') + reading = False + for line in result.output.splitlines(): + if line.startswith('=='): + reading = True + elif reading and not line.startswith(' '): + testrecipes.append(line.split(':')[0]) for testrecipe in testrecipes: # Check it's a valid recipe bitbake('%s -e' % testrecipe)
scripts/lib/devtool/standard.py +1 -1
@@ -124,7 +124,7 @@ def _check_compatible_recipe(pn, d): logger.error("The perf recipe does not actually check out source and thus cannot be supported by this tool") return False - if pn in ['gcc-source', 'kernel-devsrc', 'package-index']: + if pn in ['kernel-devsrc', 'package-index'] or pn.startswith('gcc-source'): logger.error("The %s recipe is not supported by this tool" % pn) return False
Signature · 1 line
2.1.0
PATCH 3/3 oe-selftest: devtool: add a proper test to see if tap devices exist
In reply to Paul EggletonCheck up front in test_devtool_deploy_target whether the tap devices exist and skip if not. If we don't do this we get a significantly less comprehensible error via pexpect.
--- meta/lib/oeqa/selftest/devtool.py | 10 ++++++++++ 1 file changed, 10 insertions(+)
meta/lib/oeqa/selftest/devtool.py +10 -0
@@ -587,6 +587,16 @@ class DevtoolTests(oeSelfTest): self.skipTest('This test only works with qemu machines') if not os.path.exists('/etc/runqemu-nosudo'): self.skipTest('You must set up tap devices with scripts/runqemu-gen-tapdevs before running this test') + result = runCmd('PATH="$PATH:/sbin:/usr/sbin" ip tuntap show', ignore_status=True) + if result.status != 0: + result = runCmd('PATH="$PATH:/sbin:/usr/sbin" ifconfig -a', ignore_status=True) + if result.status != 0: + self.skipTest('Failed to determine if tap devices exist with ifconfig or ip: %s' % result.output) + for line in result.output.splitlines(): + if line.startswith('tap'): + break + else: + self.skipTest('No tap devices found - you must set up tap devices with scripts/runqemu-gen-tapdevs before running this test') workspacedir = os.path.join(self.builddir, 'workspace') self.assertTrue(not os.path.exists(workspacedir), 'This test cannot be run with a workspace directory under the build directory') import pexpect
Signature · 1 line
2.1.0