diff mbox series

[2/2] bbtests: Tweak to use no-gplv3 inc file

Message ID 20240204190305.2332461-2-richard.purdie@linuxfoundation.org
State Accepted, archived
Commit 803060fa4e8fe98ac8f987b80162110d06788946
Headers show
Series [1/2] conf: Move selftest config to dedicated inc file | expand

Commit Message

Richard Purdie Feb. 4, 2024, 7:03 p.m. UTC
With changes to gcc-runtime around improving debugging, python modules
are needed but this pulls in bash which breaks the tests.

Add an exclusion to the no-gplv3 include file to handle this.

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
---
 meta/conf/distro/include/no-gplv3.inc   | 4 ++++
 meta/lib/oeqa/selftest/cases/bbtests.py | 4 +++-
 2 files changed, 7 insertions(+), 1 deletion(-)
diff mbox series

Patch

diff --git a/meta/conf/distro/include/no-gplv3.inc b/meta/conf/distro/include/no-gplv3.inc
index 48cff29ad4a..bb2e836f982 100644
--- a/meta/conf/distro/include/no-gplv3.inc
+++ b/meta/conf/distro/include/no-gplv3.inc
@@ -22,3 +22,7 @@  CORE_IMAGE_EXTRA_INSTALL:pn-core-image-weston += "rpm"
 
 # matchbox-terminal depends on vte, which is gpl3
 CORE_IMAGE_BASE_INSTALL:remove:pn-core-image-weston = "matchbox-terminal"
+
+# Some python-tests use bash outside of ptest
+RDEPENDS:${PN}-tests:remove:class-target:pn-python3 = "${MLPREFIX}bash"
+INSANE_SKIP:${PN}-tests:pn-python3 = "file-rdeps"
diff --git a/meta/lib/oeqa/selftest/cases/bbtests.py b/meta/lib/oeqa/selftest/cases/bbtests.py
index 0da59e0f581..98e9f816610 100644
--- a/meta/lib/oeqa/selftest/cases/bbtests.py
+++ b/meta/lib/oeqa/selftest/cases/bbtests.py
@@ -232,7 +232,9 @@  INHERIT:remove = \"report-error\"
         self.assertLess(errorpos,continuepos, msg = "bitbake didn't pass do_fail_task. bitbake output: %s" % result.output)
 
     def test_non_gplv3(self):
-        self.write_config('INCOMPATIBLE_LICENSE = "GPL-3.0-or-later"')
+        self.write_config('''INCOMPATIBLE_LICENSE = "GPL-3.0-or-later"
+require conf/distro/include/no-gplv3.inc
+''')
         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')