public inbox for openembedded-core@lists.openembedded.org
 help / color / mirror / Atom feed
From: Richard Purdie <richard.purdie@linuxfoundation.org>
To: openembedded-core@lists.openembedded.org
Subject: [PATCH 6/6] oeqa/selftest/bbtests: Improve and update test_non_gplv3
Date: Wed, 20 Sep 2023 11:58:02 +0100	[thread overview]
Message-ID: <20230920105802.1008778-6-richard.purdie@linuxfoundation.org> (raw)
In-Reply-To: <20230920105802.1008778-1-richard.purdie@linuxfoundation.org>

This test no longer worked with fixes to avoid overlapping license files
in deploy. Fix the test but also improve the logging messages so we don't
get "False is not True" messages upon failure.

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
---
 meta/lib/oeqa/selftest/cases/bbtests.py | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

diff --git a/meta/lib/oeqa/selftest/cases/bbtests.py b/meta/lib/oeqa/selftest/cases/bbtests.py
index 31aa5680f01..d242352ea2d 100644
--- a/meta/lib/oeqa/selftest/cases/bbtests.py
+++ b/meta/lib/oeqa/selftest/cases/bbtests.py
@@ -236,8 +236,11 @@ INHERIT:remove = \"report-error\"
         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, 'selftest-ed/generic_GPL-3.0-or-later')))
-        self.assertTrue(os.path.isfile(os.path.join(lic_dir, 'selftest-ed/generic_GPL-2.0-or-later')))
+        arch = get_bb_var('SSTATE_PKGARCH')
+        filename = os.path.join(lic_dir, arch, 'selftest-ed', 'generic_GPL-3.0-or-later')
+        self.assertFalse(os.path.isfile(filename), msg="License file %s exists and shouldn't" % filename)
+        filename = os.path.join(lic_dir, arch, 'selftest-ed', 'generic_GPL-2.0-or-later')
+        self.assertTrue(os.path.isfile(filename), msg="License file %s doesn't exist" % filename)
 
     def test_setscene_only(self):
         """ Bitbake option to restore from sstate only within a build (i.e. execute no real tasks, only setscene)"""
-- 
2.39.2



  parent reply	other threads:[~2023-09-20 10:58 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-09-20 10:57 [PATCH 1/6 v2] license/license_image: Fix license file layout to avoid overlapping files Richard Purdie
2023-09-20 10:57 ` [PATCH 2/6 v2] create-spdx/sbom: Ensure files don't overlap between machines Richard Purdie
2023-09-20 10:57 ` [PATCH 3/6] sstate: Stop allowing overlapping symlinks from sstate Richard Purdie
2023-09-24  9:14   ` [OE-core] " Martin Jansa
2023-09-24 10:10     ` Richard Purdie
2023-09-25 14:59     ` Richard Purdie
2023-09-25 17:19       ` Martin Jansa
2023-09-20 10:58 ` [PATCH 4/6] sstate: Fix nativesdk entry in SSTATE_ARCHS Richard Purdie
2023-09-20 10:58 ` [PATCH 5/6 v2] multilib: fix SSTATE_ARCHS for multilib usage Richard Purdie
2023-09-20 10:58 ` Richard Purdie [this message]
2023-12-19  1:11 ` [OE-core] [PATCH 1/6 v2] license/license_image: Fix license file layout to avoid overlapping files Russ Dill
2024-07-17 20:29   ` Livius

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20230920105802.1008778-6-richard.purdie@linuxfoundation.org \
    --to=richard.purdie@linuxfoundation.org \
    --cc=openembedded-core@lists.openembedded.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox