All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/4] chkconfig-alternatives-native: fix obey_variables
@ 2017-03-08 17:24 Joshua Lock
  2017-03-08 17:24 ` [PATCH 2/4] meta-selftest: add selftest-ed recipes Joshua Lock
                   ` (2 more replies)
  0 siblings, 3 replies; 7+ messages in thread
From: Joshua Lock @ 2017-03-08 17:24 UTC (permalink / raw)
  To: openembedded-core

This postfunc assumes it's run from S, whereas that seems not to always
be the case in practice. Explicitly define the full path of the file
we wish to sed.

Signed-off-by: Joshua Lock <joshua.g.lock@intel.com>
---
 meta/recipes-extended/chkconfig/chkconfig-alternatives-native_1.3.59.bb | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/meta/recipes-extended/chkconfig/chkconfig-alternatives-native_1.3.59.bb b/meta/recipes-extended/chkconfig/chkconfig-alternatives-native_1.3.59.bb
index c0f7f16..87fa8eb 100644
--- a/meta/recipes-extended/chkconfig/chkconfig-alternatives-native_1.3.59.bb
+++ b/meta/recipes-extended/chkconfig/chkconfig-alternatives-native_1.3.59.bb
@@ -21,7 +21,7 @@ inherit native
 # into the sysroot, as we may use them to construct the rootfs. As such, we
 # only adjust the paths to match the metadata for the target, not native.
 obey_variables () {
-	sed -i 's,ALTERNATIVES_ROOT,OPKG_OFFLINE_ROOT,' alternatives.c
+	sed -i 's,ALTERNATIVES_ROOT,OPKG_OFFLINE_ROOT,' ${S}/alternatives.c
 }
 
 do_compile () {
-- 
2.9.3



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

* [PATCH 2/4] meta-selftest: add selftest-ed recipes
  2017-03-08 17:24 [PATCH 1/4] chkconfig-alternatives-native: fix obey_variables Joshua Lock
@ 2017-03-08 17:24 ` Joshua Lock
  2017-03-09 20:05   ` Patrick Ohly
  2017-03-08 17:24 ` [PATCH 3/4] lib/oeqa/selftest/oescripts: make test_cleanup_workdir use selftest-ed Joshua Lock
  2017-03-08 17:24 ` [PATCH 4/4] lib/oeqa/selftest/bbtests: update test_non_gplv3 to " Joshua Lock
  2 siblings, 1 reply; 7+ messages in thread
From: Joshua Lock @ 2017-03-08 17:24 UTC (permalink / raw)
  To: openembedded-core

The oe-selftest oescripts.TestScripts.test_cleanup_workdir was using
gzip and the GPLv2 variant to test cleanup of the workdir. This broke
with the removal of GPLv2 recipes from OE-Core.

Instead of relying on recipes in OE-Core remaining static we should
ensure that meta-selftest provides recipes required for the tests to pass.
To that end we take a copy of the current GPLv2 and GPLv3 variants of ed
and include them in meta-selftest as new recipes.
We chose ed over gzip as gzip has dependencies which would require
additional GPLv2 recipes to be included in meta-selftest.

Signed-off-by: Joshua Lock <joshua.g.lock@intel.com>
---
 .../recipes-test/selftest-ed/selftest-ed_0.5.bb    | 22 ++++++++++++++
 .../recipes-test/selftest-ed/selftest-ed_1.14.1.bb | 35 ++++++++++++++++++++++
 2 files changed, 57 insertions(+)
 create mode 100644 meta-selftest/recipes-test/selftest-ed/selftest-ed_0.5.bb
 create mode 100644 meta-selftest/recipes-test/selftest-ed/selftest-ed_1.14.1.bb

diff --git a/meta-selftest/recipes-test/selftest-ed/selftest-ed_0.5.bb b/meta-selftest/recipes-test/selftest-ed/selftest-ed_0.5.bb
new file mode 100644
index 0000000..8e0d1cd
--- /dev/null
+++ b/meta-selftest/recipes-test/selftest-ed/selftest-ed_0.5.bb
@@ -0,0 +1,22 @@
+SUMMARY = "Line-oriented text editor -- selftest GPLv2 version"
+HOMEPAGE = "http://www.gnu.org/software/ed/"
+SECTION = "base"
+LICENSE = "GPLv2+"
+LIC_FILES_CHKSUM = "file://COPYING;md5=6ddd5335ef96fb858a138230af773710 \
+                    file://main.c;beginline=1;endline=17;md5=36d4b85e5ae9028e918d1cc775c2475e"
+
+PR = "r2"
+SRC_URI = "${SAVANNAH_GNU_MIRROR}/ed/ed-${PV}.tar.bz2"
+
+SRC_URI[md5sum] = "4ee21e9dcc9b5b6012c23038734e1632"
+SRC_URI[sha256sum] = "edef2bbde0fbf0d88232782a0eded323f483a0519d6fde9a3b1809056fd35f3e"
+
+inherit autotools texinfo
+
+S = "${WORKDIR}/ed-${PV}"
+
+EXTRA_OECONF = "'CC=${CC}' 'CXX=${CXX}' 'CFLAGS=${CFLAGS}' 'CXXFLAGS=${CXXFLAGS}' 'CPPFLAGS=${CPPFLAGS}' 'LDFLAGS=${LDFLAGS}'"
+
+CONFIGUREOPTS_remove = "--disable-dependency-tracking"
+CONFIGUREOPTS_remove = "--disable-silent-rules"
+EXTRA_OECONF_remove = "--disable-static"
diff --git a/meta-selftest/recipes-test/selftest-ed/selftest-ed_1.14.1.bb b/meta-selftest/recipes-test/selftest-ed/selftest-ed_1.14.1.bb
new file mode 100644
index 0000000..62931c4
--- /dev/null
+++ b/meta-selftest/recipes-test/selftest-ed/selftest-ed_1.14.1.bb
@@ -0,0 +1,35 @@
+SUMMARY = "Line-oriented text editor -- selftest variant"
+HOMEPAGE = "http://www.gnu.org/software/ed/"
+
+LICENSE = "GPLv3+"
+LIC_FILES_CHKSUM = "file://COPYING;md5=0c7051aef9219dc7237f206c5c4179a7 \
+                    file://ed.h;endline=20;md5=4e36b7a40e137f42aee718165590d125 \
+                    file://main.c;endline=17;md5=c5b8f78f115df187af76868a2aead16a"
+
+SECTION = "base"
+
+# LSB states that ed should be in /bin/
+bindir = "${base_bindir}"
+
+SRC_URI = "${GNU_MIRROR}/ed/ed-${PV}.tar.lz"
+
+SRC_URI[md5sum] = "7f4a54fa7f366479f03654b8af645fd0"
+SRC_URI[sha256sum] = "ffb97eb8f2a2b5a71a9b97e3872adce953aa1b8958e04c5b7bf11d556f32552a"
+
+S = "${WORKDIR}/ed-${PV}"
+
+EXTRA_OEMAKE = "-e MAKEFLAGS="
+
+inherit texinfo
+
+do_configure() {
+	${S}/configure
+}
+
+do_install() {
+	oe_runmake 'DESTDIR=${D}' install
+	# Info dir listing isn't interesting at this point so remove it if it exists.
+	if [ -e "${D}${infodir}/dir" ]; then
+		rm -f ${D}${infodir}/dir
+	fi
+}
-- 
2.9.3



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

* [PATCH 3/4] lib/oeqa/selftest/oescripts: make test_cleanup_workdir use selftest-ed
  2017-03-08 17:24 [PATCH 1/4] chkconfig-alternatives-native: fix obey_variables Joshua Lock
  2017-03-08 17:24 ` [PATCH 2/4] meta-selftest: add selftest-ed recipes Joshua Lock
@ 2017-03-08 17:24 ` Joshua Lock
  2017-03-08 17:24 ` [PATCH 4/4] lib/oeqa/selftest/bbtests: update test_non_gplv3 to " Joshua Lock
  2 siblings, 0 replies; 7+ messages in thread
From: Joshua Lock @ 2017-03-08 17:24 UTC (permalink / raw)
  To: openembedded-core

Use a recipe which is bundled in the meta-selftest layer for this test,
rather than relying on OE-Core remaining static (or updating the tests
when OE-Core changes recipes).

Tested with oe-selftest -r oescripts.TestScripts.test_cleanup_workdir

Signed-off-by: Joshua Lock <joshua.g.lock@intel.com>
---
 meta/lib/oeqa/selftest/oescripts.py | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/meta/lib/oeqa/selftest/oescripts.py b/meta/lib/oeqa/selftest/oescripts.py
index 28345dc..baf3b6a 100644
--- a/meta/lib/oeqa/selftest/oescripts.py
+++ b/meta/lib/oeqa/selftest/oescripts.py
@@ -14,10 +14,10 @@ class TestScripts(oeSelfTest):
 
     @testcase(300)
     def test_cleanup_workdir(self):
-        path = os.path.dirname(get_bb_var('WORKDIR', 'gzip'))
-        old_version_recipe = os.path.join(get_bb_var('COREBASE'), 'meta/recipes-extended/gzip/gzip_1.3.12.bb')
-        old_version = '1.3.12'
-        bitbake("-c clean gzip")
+        path = os.path.dirname(get_bb_var('WORKDIR', 'selftest-ed'))
+        old_version_recipe = os.path.join(get_bb_var('COREBASE'), 'meta-selftest/recipes-test/selftest-ed/selftest-ed_0.5.bb')
+        old_version = '0.5'
+        bitbake("-c clean selftest-ed")
         bitbake("-c clean -b %s" % old_version_recipe)
 
         if os.path.exists(path):
@@ -25,7 +25,7 @@ class TestScripts(oeSelfTest):
         else:
             initial_contents = []
 
-        bitbake('gzip')
+        bitbake('selftest-ed')
         intermediary_contents = os.listdir(path)
         bitbake("-b %s" % old_version_recipe)
         runCmd('cleanup-workdir')
-- 
2.9.3



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

* [PATCH 4/4] lib/oeqa/selftest/bbtests: update test_non_gplv3 to use selftest-ed
  2017-03-08 17:24 [PATCH 1/4] chkconfig-alternatives-native: fix obey_variables Joshua Lock
  2017-03-08 17:24 ` [PATCH 2/4] meta-selftest: add selftest-ed recipes Joshua Lock
  2017-03-08 17:24 ` [PATCH 3/4] lib/oeqa/selftest/oescripts: make test_cleanup_workdir use selftest-ed Joshua Lock
@ 2017-03-08 17:24 ` Joshua Lock
  2 siblings, 0 replies; 7+ messages in thread
From: Joshua Lock @ 2017-03-08 17:24 UTC (permalink / raw)
  To: openembedded-core

GPLv2 recipes have been moved to a new layer (meta-gplv2), instead of
readline perform this test on the selftest-ed recipe in meta-selftest
which has gplv2 and gplv3 variants.

Tested with oe-selftest -r bbtests.BitbakeTests.test_non_gplv3

Signed-off-by: Joshua Lock <joshua.g.lock@intel.com>
---
 meta/lib/oeqa/selftest/bbtests.py | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/meta/lib/oeqa/selftest/bbtests.py b/meta/lib/oeqa/selftest/bbtests.py
index 4d9eec1..c2b79c6 100644
--- a/meta/lib/oeqa/selftest/bbtests.py
+++ b/meta/lib/oeqa/selftest/bbtests.py
@@ -231,11 +231,11 @@ INHERIT_remove = \"report-error\"
     @testcase(1119)
     def test_non_gplv3(self):
         self.write_config('INCOMPATIBLE_LICENSE = "GPLv3"')
-        result = bitbake('readline', ignore_status=True)
+        result = bitbake('selftest-ed', ignore_status=True)
         self.assertEqual(result.status, 0, "Bitbake failed, exit code %s, output %s" % (result.status, result.output))
         lic_dir = get_bb_var('LICENSE_DIRECTORY')
-        self.assertFalse(os.path.isfile(os.path.join(lic_dir, 'readline/generic_GPLv3')))
-        self.assertTrue(os.path.isfile(os.path.join(lic_dir, 'readline/generic_GPLv2')))
+        self.assertFalse(os.path.isfile(os.path.join(lic_dir, 'selftest-ed/generic_GPLv3')))
+        self.assertTrue(os.path.isfile(os.path.join(lic_dir, 'selftest-ed/generic_GPLv2')))
 
     @testcase(1422)
     def test_setscene_only(self):
-- 
2.9.3



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

* Re: [PATCH 2/4] meta-selftest: add selftest-ed recipes
  2017-03-08 17:24 ` [PATCH 2/4] meta-selftest: add selftest-ed recipes Joshua Lock
@ 2017-03-09 20:05   ` Patrick Ohly
  2017-03-10 13:27     ` Joshua Lock
  0 siblings, 1 reply; 7+ messages in thread
From: Patrick Ohly @ 2017-03-09 20:05 UTC (permalink / raw)
  To: Joshua Lock; +Cc: openembedded-core

On Wed, 2017-03-08 at 17:24 +0000, Joshua Lock wrote:
> The oe-selftest oescripts.TestScripts.test_cleanup_workdir was using
> gzip and the GPLv2 variant to test cleanup of the workdir. This broke
> with the removal of GPLv2 recipes from OE-Core.
> 
> Instead of relying on recipes in OE-Core remaining static we should
> ensure that meta-selftest provides recipes required for the tests to pass.
> To that end we take a copy of the current GPLv2 and GPLv3 variants of ed
> and include them in meta-selftest as new recipes.
> We chose ed over gzip as gzip has dependencies which would require
> additional GPLv2 recipes to be included in meta-selftest.

Wouldn't the test become faster when using artificial recipes, i.e.
something which doesn't really need sources? Such an artificial recipe
can use a local file as its "source", for example.

Or did I misunderstand something and the selftest doesn't really build
ed?

-- 
Best Regards, Patrick Ohly

The content of this message is my personal opinion only and although
I am an employee of Intel, the statements I make here in no way
represent Intel's position on the issue, nor am I authorized to speak
on behalf of Intel on this matter.





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

* Re: [PATCH 2/4] meta-selftest: add selftest-ed recipes
  2017-03-09 20:05   ` Patrick Ohly
@ 2017-03-10 13:27     ` Joshua Lock
  2017-03-10 13:38       ` Patrick Ohly
  0 siblings, 1 reply; 7+ messages in thread
From: Joshua Lock @ 2017-03-10 13:27 UTC (permalink / raw)
  To: Patrick Ohly; +Cc: openembedded-core

On Thu, 2017-03-09 at 21:05 +0100, Patrick Ohly wrote:
> On Wed, 2017-03-08 at 17:24 +0000, Joshua Lock wrote:
> > The oe-selftest oescripts.TestScripts.test_cleanup_workdir was
> > using
> > gzip and the GPLv2 variant to test cleanup of the workdir. This
> > broke
> > with the removal of GPLv2 recipes from OE-Core.
> > 
> > Instead of relying on recipes in OE-Core remaining static we should
> > ensure that meta-selftest provides recipes required for the tests
> > to pass.
> > To that end we take a copy of the current GPLv2 and GPLv3 variants
> > of ed
> > and include them in meta-selftest as new recipes.
> > We chose ed over gzip as gzip has dependencies which would require
> > additional GPLv2 recipes to be included in meta-selftest.
> 
> Wouldn't the test become faster when using artificial recipes, i.e.
> something which doesn't really need sources? Such an artificial
> recipe
> can use a local file as its "source", for example.

Indeed, that would make the test faster. I took a shorter route for
this series in an attempt to unblock M3, however I realise that the
bitbake targets used in oe-selftest could do with a consistent review.

I've filed an enhancement request to that effect:

https://bugzilla.yoctoproject.org/show_bug.cgi?id=11142

> Or did I misunderstand something and the selftest doesn't really
> build
> ed?

It does build ed, which is an improvement over building gzip but not as
fast as something artificial.

Thanks for the feedback,

Joshua


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

* Re: [PATCH 2/4] meta-selftest: add selftest-ed recipes
  2017-03-10 13:27     ` Joshua Lock
@ 2017-03-10 13:38       ` Patrick Ohly
  0 siblings, 0 replies; 7+ messages in thread
From: Patrick Ohly @ 2017-03-10 13:38 UTC (permalink / raw)
  To: Joshua Lock; +Cc: openembedded-core

On Fri, 2017-03-10 at 13:27 +0000, Joshua Lock wrote:
> On Thu, 2017-03-09 at 21:05 +0100, Patrick Ohly wrote:
> > On Wed, 2017-03-08 at 17:24 +0000, Joshua Lock wrote:
> > > The oe-selftest oescripts.TestScripts.test_cleanup_workdir was
> > > using
> > > gzip and the GPLv2 variant to test cleanup of the workdir. This
> > > broke
> > > with the removal of GPLv2 recipes from OE-Core.
> > > 
> > > Instead of relying on recipes in OE-Core remaining static we should
> > > ensure that meta-selftest provides recipes required for the tests
> > > to pass.
> > > To that end we take a copy of the current GPLv2 and GPLv3 variants
> > > of ed
> > > and include them in meta-selftest as new recipes.
> > > We chose ed over gzip as gzip has dependencies which would require
> > > additional GPLv2 recipes to be included in meta-selftest.
> > 
> > Wouldn't the test become faster when using artificial recipes, i.e.
> > something which doesn't really need sources? Such an artificial
> > recipe
> > can use a local file as its "source", for example.
> 
> Indeed, that would make the test faster. I took a shorter route for
> this series in an attempt to unblock M3, however I realise that the
> bitbake targets used in oe-selftest could do with a consistent review.

Makes sense.

-- 
Best Regards, Patrick Ohly

The content of this message is my personal opinion only and although
I am an employee of Intel, the statements I make here in no way
represent Intel's position on the issue, nor am I authorized to speak
on behalf of Intel on this matter.





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

end of thread, other threads:[~2017-03-10 13:38 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-03-08 17:24 [PATCH 1/4] chkconfig-alternatives-native: fix obey_variables Joshua Lock
2017-03-08 17:24 ` [PATCH 2/4] meta-selftest: add selftest-ed recipes Joshua Lock
2017-03-09 20:05   ` Patrick Ohly
2017-03-10 13:27     ` Joshua Lock
2017-03-10 13:38       ` Patrick Ohly
2017-03-08 17:24 ` [PATCH 3/4] lib/oeqa/selftest/oescripts: make test_cleanup_workdir use selftest-ed Joshua Lock
2017-03-08 17:24 ` [PATCH 4/4] lib/oeqa/selftest/bbtests: update test_non_gplv3 to " Joshua Lock

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.