All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/3] oe-selftest improvements
@ 2015-11-06 13:16 Paul Eggleton
  2015-11-06 13:16 ` [PATCH 1/3] oeqa/selftest/devtool: fix test if build directory is not inside COREBASE Paul Eggleton
                   ` (2 more replies)
  0 siblings, 3 replies; 5+ messages in thread
From: Paul Eggleton @ 2015-11-06 13:16 UTC (permalink / raw)
  To: openembedded-core

A fix for two tests plus an additional test for the bitbake-layers
show-recipes command.


The following changes since commit e44ed8c18e395b9c055aefee113b90708e8a8a2f:

  build-appliance-image: Update to jethro head revision (2015-11-03 14:02:57 +0000)

are available in the git repository at:

  git://git.openembedded.org/openembedded-core-contrib paule/oe-selftest-1
  http://cgit.openembedded.org/cgit.cgi/openembedded-core-contrib/log/?h=paule/oe-selftest-1

Paul Eggleton (3):
  oeqa/selftest/devtool: fix test if build directory is not inside
    COREBASE
  oeqa/selftest/layerappend: fix test if build directory is not inside
    COREBASE
  oe-selftest: add test for bitbake-layers show-recipes

 meta/lib/oeqa/selftest/bblayers.py    | 25 +++++++++++++++++++++++++
 meta/lib/oeqa/selftest/devtool.py     |  2 +-
 meta/lib/oeqa/selftest/layerappend.py |  9 ++++++---
 3 files changed, 32 insertions(+), 4 deletions(-)

-- 
2.1.0



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

* [PATCH 1/3] oeqa/selftest/devtool: fix test if build directory is not inside COREBASE
  2015-11-06 13:16 [PATCH 0/3] oe-selftest improvements Paul Eggleton
@ 2015-11-06 13:16 ` Paul Eggleton
  2015-11-06 13:16 ` [PATCH 2/3] oeqa/selftest/layerappend: " Paul Eggleton
  2015-11-06 13:17 ` [PATCH 3/3] oe-selftest: add test for bitbake-layers show-recipes Paul Eggleton
  2 siblings, 0 replies; 5+ messages in thread
From: Paul Eggleton @ 2015-11-06 13:16 UTC (permalink / raw)
  To: openembedded-core

Fix test_devtool_update_recipe_git to work when build directory is not
inside COREBASE.

Fixes [YOCTO #8639].

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 f48e6a2..dcdef5a 100644
--- a/meta/lib/oeqa/selftest/devtool.py
+++ b/meta/lib/oeqa/selftest/devtool.py
@@ -582,7 +582,7 @@ class DevtoolTests(DevtoolBase):
         # Now try with auto mode
         runCmd('cd %s; git checkout %s %s' % (os.path.dirname(recipefile), testrecipe, os.path.basename(recipefile)))
         result = runCmd('devtool update-recipe %s' % testrecipe)
-        result = runCmd('git rev-parse --show-toplevel')
+        result = runCmd('git rev-parse --show-toplevel', cwd=os.path.dirname(recipefile))
         topleveldir = result.output.strip()
         relpatchpath = os.path.join(os.path.relpath(os.path.dirname(recipefile), topleveldir), testrecipe)
         expected_status = [(' M', os.path.relpath(recipefile, topleveldir)),
-- 
2.1.0



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

* [PATCH 2/3] oeqa/selftest/layerappend: fix test if build directory is not inside COREBASE
  2015-11-06 13:16 [PATCH 0/3] oe-selftest improvements Paul Eggleton
  2015-11-06 13:16 ` [PATCH 1/3] oeqa/selftest/devtool: fix test if build directory is not inside COREBASE Paul Eggleton
@ 2015-11-06 13:16 ` Paul Eggleton
  2015-11-06 13:17 ` [PATCH 3/3] oe-selftest: add test for bitbake-layers show-recipes Paul Eggleton
  2 siblings, 0 replies; 5+ messages in thread
From: Paul Eggleton @ 2015-11-06 13:16 UTC (permalink / raw)
  To: openembedded-core

Fix test_layer_appends to work when build directory is not inside
COREBASE.

Fixes [YOCTO #8639].

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

diff --git a/meta/lib/oeqa/selftest/layerappend.py b/meta/lib/oeqa/selftest/layerappend.py
index a82a6c8..4de5034 100644
--- a/meta/lib/oeqa/selftest/layerappend.py
+++ b/meta/lib/oeqa/selftest/layerappend.py
@@ -46,10 +46,11 @@ FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:"
 
 SRC_URI_append += "file://appendtest.txt"
 """
-    layerappend = "BBLAYERS += \"COREBASE/meta-layertest0 COREBASE/meta-layertest1 COREBASE/meta-layertest2\""
+    layerappend = ''
 
     def tearDownLocal(self):
-        ftools.remove_from_file(self.builddir + "/conf/bblayers.conf", self.layerappend.replace("COREBASE", self.builddir + "/.."))
+        if self.layerappend:
+            ftools.remove_from_file(self.builddir + "/conf/bblayers.conf", self.layerappend)
 
     @testcase(1196)
     def test_layer_appends(self):
@@ -79,7 +80,9 @@ SRC_URI_append += "file://appendtest.txt"
                 with open(layer + "/recipes-test/layerappendtest/appendtest.txt", "w") as f:
                     f.write("Layer 2 test")
             self.track_for_cleanup(layer)
-        ftools.append_file(self.builddir + "/conf/bblayers.conf", self.layerappend.replace("COREBASE", self.builddir + "/.."))
+
+        self.layerappend = "BBLAYERS += \"{0}/meta-layertest0 {0}/meta-layertest1 {0}/meta-layertest2\"".format(corebase)
+        ftools.append_file(self.builddir + "/conf/bblayers.conf", self.layerappend)
         bitbake("layerappendtest")
         data = ftools.read_file(stagingdir + "/appendtest.txt")
         self.assertEqual(data, "Layer 2 test")
-- 
2.1.0



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

* [PATCH 3/3] oe-selftest: add test for bitbake-layers show-recipes
  2015-11-06 13:16 [PATCH 0/3] oe-selftest improvements Paul Eggleton
  2015-11-06 13:16 ` [PATCH 1/3] oeqa/selftest/devtool: fix test if build directory is not inside COREBASE Paul Eggleton
  2015-11-06 13:16 ` [PATCH 2/3] oeqa/selftest/layerappend: " Paul Eggleton
@ 2015-11-06 13:17 ` Paul Eggleton
  2 siblings, 0 replies; 5+ messages in thread
From: Paul Eggleton @ 2015-11-06 13:17 UTC (permalink / raw)
  To: openembedded-core

Add a test for bitbake-layers show-recipes including the recently
added -i option.

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

diff --git a/meta/lib/oeqa/selftest/bblayers.py b/meta/lib/oeqa/selftest/bblayers.py
index 20c17e4..5452925 100644
--- a/meta/lib/oeqa/selftest/bblayers.py
+++ b/meta/lib/oeqa/selftest/bblayers.py
@@ -60,3 +60,28 @@ class BitbakeLayers(oeSelfTest):
         result = runCmd('bitbake-layers remove-layer */meta-skeleton')
         result = runCmd('bitbake-layers show-layers')
         self.assertNotIn('meta-skeleton', result.output, msg = "meta-skeleton should have been removed at this step.  bitbake-layers show-layers output: %s" % result.output)
+
+    def test_bitbakelayers_showrecipes(self):
+        result = runCmd('bitbake-layers show-recipes')
+        self.assertIn('aspell:', result.output)
+        self.assertIn('mtd-utils:', result.output)
+        self.assertIn('linux-yocto:', result.output)
+        self.assertIn('core-image-minimal:', result.output)
+        result = runCmd('bitbake-layers show-recipes mtd-utils')
+        self.assertIn('mtd-utils:', result.output)
+        self.assertNotIn('aspell:', result.output)
+        result = runCmd('bitbake-layers show-recipes -i kernel')
+        self.assertIn('linux-yocto:', result.output)
+        self.assertNotIn('mtd-utils:', result.output)
+        result = runCmd('bitbake-layers show-recipes -i image')
+        self.assertIn('core-image-minimal', result.output)
+        self.assertNotIn('linux-yocto:', result.output)
+        self.assertNotIn('mtd-utils:', result.output)
+        result = runCmd('bitbake-layers show-recipes -i cmake,pkgconfig')
+        self.assertIn('libproxy:', result.output)
+        self.assertNotIn('mtd-utils:', result.output) # doesn't inherit either
+        self.assertNotIn('wget:', result.output) # doesn't inherit cmake
+        self.assertNotIn('waffle:', result.output) # doesn't inherit pkgconfig
+        result = runCmd('bitbake-layers show-recipes -i nonexistentclass', ignore_status=True)
+        self.assertNotEqual(result.status, 0, 'bitbake-layers show-recipes -i nonexistentclass should have failed')
+        self.assertIn('ERROR:', result.output)
-- 
2.1.0



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

* [PATCH 0/3] oe-selftest improvements
@ 2020-06-03 20:07 Paul Barker
  0 siblings, 0 replies; 5+ messages in thread
From: Paul Barker @ 2020-06-03 20:07 UTC (permalink / raw)
  To: openembedded-core; +Cc: Paul Barker

These patches add some extra options to oe-selftest and fix the test
case patching logic discussed with RP on IRC.

The last patch may fix [1] but further confirmation is needed.

[1]: https://bugzilla.yoctoproject.org/show_bug.cgi?id=13815 

Paul Barker (3):
  oe-selftest: Allow overriding the build directory used for tests
  oe-selftest: Support verbose log output
  oe-selftest: Recursively patch test case paths

 meta/lib/oeqa/core/context.py     |  2 ++
 meta/lib/oeqa/selftest/context.py | 25 +++++++++++++++++++++----
 2 files changed, 23 insertions(+), 4 deletions(-)

-- 
2.26.2


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

end of thread, other threads:[~2020-06-03 20:07 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-11-06 13:16 [PATCH 0/3] oe-selftest improvements Paul Eggleton
2015-11-06 13:16 ` [PATCH 1/3] oeqa/selftest/devtool: fix test if build directory is not inside COREBASE Paul Eggleton
2015-11-06 13:16 ` [PATCH 2/3] oeqa/selftest/layerappend: " Paul Eggleton
2015-11-06 13:17 ` [PATCH 3/3] oe-selftest: add test for bitbake-layers show-recipes Paul Eggleton
  -- strict thread matches above, loose matches on Subject: below --
2020-06-03 20:07 [PATCH 0/3] oe-selftest improvements Paul Barker

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.