Openembedded Core Discussions
 help / color / mirror / Atom feed
From: Alexander Kanavin <alexander.kanavin@linux.intel.com>
To: openembedded-core@lists.openembedded.org
Subject: [PATCH 15/15] oe-selftest: add a test for recipes without maintainers
Date: Wed, 13 Dec 2017 17:33:07 +0200	[thread overview]
Message-ID: <20171213153307.26576-15-alexander.kanavin@linux.intel.com> (raw)
In-Reply-To: <20171213153307.26576-1-alexander.kanavin@linux.intel.com>

'bitbake -c checkpkg world' is moved to class initializer to avoid
it being run twice in a row.

Signed-off-by: Alexander Kanavin <alexander.kanavin@linux.intel.com>
---
 meta/lib/oeqa/selftest/cases/distrodata.py | 32 +++++++++++++++++++++++++-----
 1 file changed, 27 insertions(+), 5 deletions(-)

diff --git a/meta/lib/oeqa/selftest/cases/distrodata.py b/meta/lib/oeqa/selftest/cases/distrodata.py
index 12540adc7d8..cf8b4a21763 100644
--- a/meta/lib/oeqa/selftest/cases/distrodata.py
+++ b/meta/lib/oeqa/selftest/cases/distrodata.py
@@ -9,6 +9,12 @@ class Distrodata(OESelftestTestCase):
     @classmethod
     def setUpClass(cls):
         super(Distrodata, cls).setUpClass()
+        feature = 'INHERIT += "distrodata"\n'
+        feature += 'LICENSE_FLAGS_WHITELIST += " commercial"\n'
+
+        cls.write_config(cls, feature)
+        bitbake('-c checkpkg world')
+
 
     @OETestID(1902)
     def test_checkpkg(self):
@@ -18,11 +24,6 @@ class Distrodata(OESelftestTestCase):
         Product:     oe-core
         Author:      Alexander Kanavin <alexander.kanavin@intel.com>
         """
-        feature = 'INHERIT += "distrodata"\n'
-        feature += 'LICENSE_FLAGS_WHITELIST += " commercial"\n'
-
-        self.write_config(feature)
-        bitbake('-c checkpkg world')
         checkpkg_result = open(os.path.join(get_bb_var("LOG_DIR"), "checkpkg.csv")).readlines()[1:]
         regressed_failures = [pkg_data[0] for pkg_data in [pkg_line.split('\t') for pkg_line in checkpkg_result] if pkg_data[11] == 'UNKNOWN_BROKEN']
         regressed_successes = [pkg_data[0] for pkg_data in [pkg_line.split('\t') for pkg_line in checkpkg_result] if pkg_data[11] == 'KNOWN_BROKEN']
@@ -40,3 +41,24 @@ The following packages have been checked successfully for upstream versions,
 but their recipes claim otherwise by setting UPSTREAM_VERSION_UNKNOWN. Please remove that line from the recipes.
 """ + "\n".join(regressed_successes)
         self.assertTrue(len(regressed_failures) == 0 and len(regressed_successes) == 0, msg)
+
+    def test_maintainers(self):
+        """
+        Summary:     Test that recipes have a maintainer
+        Expected:    All recipes (except a few special static/testing ones) should have a maintainer listed in maintainers.inc file.
+        Product:     oe-core
+        Author:      Alexander Kanavin <alexander.kanavin@intel.com>
+        """
+        def is_exception(pkg):
+            exceptions = ["packagegroup-", "initramfs-", "systemd-machine-units", "container-image-testpkg", "postinst", "devtool-test-", "selftest-ed"]
+            for i in exceptions:
+                 if i in pkg:
+                     return True
+            return False
+
+        checkpkg_result = open(os.path.join(get_bb_var("LOG_DIR"), "checkpkg.csv")).readlines()[1:]
+        no_maintainer_list = [pkg_data[0] for pkg_data in [pkg_line.split('\t') for pkg_line in checkpkg_result] if pkg_data[14] == '' and not is_exception(pkg_data[0])]
+        msg = """
+The following packages do not have a maintainer assigned to them. Please add an entry to meta/conf/distro/include/maintainers.inc file.
+""" + "\n".join(no_maintainer_list)
+        self.assertTrue(len(no_maintainer_list) == 0, msg)
-- 
2.15.0



      parent reply	other threads:[~2017-12-13 15:32 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-12-13 15:32 [PATCH 01/15] package.bbclass: replace rpm/debugedit with dwarfsrcfiles Alexander Kanavin
2017-12-13 15:32 ` [PATCH 02/15] rpm: update to 4.14.0 Alexander Kanavin
2017-12-16  0:24   ` Burton, Ross
2017-12-18 13:50     ` Alexander Kanavin
2017-12-13 15:32 ` [PATCH 03/15] libdnf: update to 0.11.1 Alexander Kanavin
2017-12-13 15:32 ` [PATCH 04/15] librepo: update to 1.8.1 Alexander Kanavin
2017-12-13 15:32 ` [PATCH 05/15] dnf: update to 2.7.5 Alexander Kanavin
2017-12-13 15:32 ` [PATCH 06/15] gobject-introspection: update to 1.54.1 Alexander Kanavin
2017-12-13 15:32 ` [PATCH 07/15] webkitgtk: update to 2.18.3 Alexander Kanavin
2017-12-13 15:33 ` [PATCH 08/15] psmisc: update to 23.0 Alexander Kanavin
2017-12-13 15:33 ` [PATCH 09/15] ffmpeg: update to 3.4 Alexander Kanavin
2017-12-13 15:33 ` [PATCH 10/15] devtool: add a 'latest-version' command Alexander Kanavin
2017-12-13 15:33 ` [PATCH 11/15] devtool: provide useful defaults for version/commit when upgrading recipes Alexander Kanavin
2017-12-13 15:33 ` [PATCH 12/15] devtool: add license checksum change handling to 'devtool upgrade' Alexander Kanavin
2017-12-13 15:33 ` [PATCH 13/15] maintainers.inc: add an entry for dwarfsrcfiles Alexander Kanavin
2017-12-13 15:33 ` [PATCH 14/15] maintainers.inc: add an entry for pkgconf Alexander Kanavin
2017-12-13 15:33 ` Alexander Kanavin [this message]

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=20171213153307.26576-15-alexander.kanavin@linux.intel.com \
    --to=alexander.kanavin@linux.intel.com \
    --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