All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/3] oe-selftest fixes for devtool
@ 2015-05-07 13:52 Paul Eggleton
  2015-05-07 13:52 ` [PATCH 1/3] oe-selftest: devtool: fix broken URL in test_devtool_add_fetch Paul Eggleton
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Paul Eggleton @ 2015-05-07 13:52 UTC (permalink / raw)
  To: openembedded-core

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(-)

-- 
2.1.0



^ permalink raw reply	[flat|nested] 4+ messages in thread

* [PATCH 1/3] oe-selftest: devtool: fix broken URL in test_devtool_add_fetch
  2015-05-07 13:52 [PATCH 0/3] oe-selftest fixes for devtool Paul Eggleton
@ 2015-05-07 13:52 ` Paul Eggleton
  2015-05-07 13:52 ` [PATCH 2/3] devtool: fix for rename of gcc-source Paul Eggleton
  2015-05-07 13:52 ` [PATCH 3/3] oe-selftest: devtool: add a proper test to see if tap devices exist Paul Eggleton
  2 siblings, 0 replies; 4+ messages in thread
From: Paul Eggleton @ 2015-05-07 13:52 UTC (permalink / raw)
  To: openembedded-core

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].

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
---
 meta/lib/oeqa/selftest/devtool.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/meta/lib/oeqa/selftest/devtool.py b/meta/lib/oeqa/selftest/devtool.py
index 1a506d9..2af6114 100644
--- a/meta/lib/oeqa/selftest/devtool.py
+++ b/meta/lib/oeqa/selftest/devtool.py
@@ -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
-- 
2.1.0



^ permalink raw reply related	[flat|nested] 4+ messages in thread

* [PATCH 2/3] devtool: fix for rename of gcc-source
  2015-05-07 13:52 [PATCH 0/3] oe-selftest fixes for devtool Paul Eggleton
  2015-05-07 13:52 ` [PATCH 1/3] oe-selftest: devtool: fix broken URL in test_devtool_add_fetch Paul Eggleton
@ 2015-05-07 13:52 ` Paul Eggleton
  2015-05-07 13:52 ` [PATCH 3/3] oe-selftest: devtool: add a proper test to see if tap devices exist Paul Eggleton
  2 siblings, 0 replies; 4+ messages in thread
From: Paul Eggleton @ 2015-05-07 13:52 UTC (permalink / raw)
  To: openembedded-core

After 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].

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
---
 meta/lib/oeqa/selftest/devtool.py | 10 +++++++++-
 scripts/lib/devtool/standard.py   |  2 +-
 2 files changed, 10 insertions(+), 2 deletions(-)

diff --git a/meta/lib/oeqa/selftest/devtool.py b/meta/lib/oeqa/selftest/devtool.py
index 2af6114..2344fac 100644
--- a/meta/lib/oeqa/selftest/devtool.py
+++ b/meta/lib/oeqa/selftest/devtool.py
@@ -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)
diff --git a/scripts/lib/devtool/standard.py b/scripts/lib/devtool/standard.py
index cb4b57b..81a44d4 100644
--- a/scripts/lib/devtool/standard.py
+++ b/scripts/lib/devtool/standard.py
@@ -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
 
-- 
2.1.0



^ permalink raw reply related	[flat|nested] 4+ messages in thread

* [PATCH 3/3] oe-selftest: devtool: add a proper test to see if tap devices exist
  2015-05-07 13:52 [PATCH 0/3] oe-selftest fixes for devtool Paul Eggleton
  2015-05-07 13:52 ` [PATCH 1/3] oe-selftest: devtool: fix broken URL in test_devtool_add_fetch Paul Eggleton
  2015-05-07 13:52 ` [PATCH 2/3] devtool: fix for rename of gcc-source Paul Eggleton
@ 2015-05-07 13:52 ` Paul Eggleton
  2 siblings, 0 replies; 4+ messages in thread
From: Paul Eggleton @ 2015-05-07 13:52 UTC (permalink / raw)
  To: openembedded-core

Check 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.

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
---
 meta/lib/oeqa/selftest/devtool.py | 10 ++++++++++
 1 file changed, 10 insertions(+)

diff --git a/meta/lib/oeqa/selftest/devtool.py b/meta/lib/oeqa/selftest/devtool.py
index 2344fac..1d16113 100644
--- a/meta/lib/oeqa/selftest/devtool.py
+++ b/meta/lib/oeqa/selftest/devtool.py
@@ -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
-- 
2.1.0



^ permalink raw reply related	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2015-05-07 13:52 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-05-07 13:52 [PATCH 0/3] oe-selftest fixes for devtool Paul Eggleton
2015-05-07 13:52 ` [PATCH 1/3] oe-selftest: devtool: fix broken URL in test_devtool_add_fetch Paul Eggleton
2015-05-07 13:52 ` [PATCH 2/3] devtool: fix for rename of gcc-source Paul Eggleton
2015-05-07 13:52 ` [PATCH 3/3] oe-selftest: devtool: add a proper test to see if tap devices exist Paul Eggleton

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.