aboutsummaryrefslogtreecommitdiffstats
path: root/meta/lib
diff options
context:
space:
mode:
authorAlexander Kanavin <alexander.kanavin@linux.intel.com>2017-08-11 12:45:19 +0300
committerRichard Purdie <richard.purdie@linuxfoundation.org>2017-08-16 00:01:40 +0100
commit89dfede4ca795ba085f1ee7290c6dede573c11db (patch)
treee3d5087a8e1487ace0472c2965ab45dd133e1640 /meta/lib
parent4f6059a6582d5fdd7260b816301e939d1e3f3ddb (diff)
downloadopenembedded-core-contrib-89dfede4ca795ba085f1ee7290c6dede573c11db.tar.gz
selftest: fix distrodata.py to use per-recipe UPSTREAM_VERSION_UNKNOWN setting
... instead of a global exception list which was problematic. [YOCTO #11896] Signed-off-by: Alexander Kanavin <alexander.kanavin@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/lib')
-rw-r--r--meta/lib/oeqa/selftest/cases/distrodata.py15
1 files changed, 6 insertions, 9 deletions
diff --git a/meta/lib/oeqa/selftest/cases/distrodata.py b/meta/lib/oeqa/selftest/cases/distrodata.py
index d5d286d5cc..ecb15d9aea 100644
--- a/meta/lib/oeqa/selftest/cases/distrodata.py
+++ b/meta/lib/oeqa/selftest/cases/distrodata.py
@@ -8,7 +8,6 @@ class Distrodata(OESelftestTestCase):
@classmethod
def setUpClass(cls):
super(Distrodata, cls).setUpClass()
- cls.exceptions_path = os.path.join(cls.testlayer_path, 'files', 'distrodata', "checkpkg_exceptions")
def test_checkpkg(self):
"""
@@ -23,21 +22,19 @@ class Distrodata(OESelftestTestCase):
self.write_config(feature)
bitbake('-c checkpkg world')
checkpkg_result = open(os.path.join(get_bb_var("LOG_DIR"), "checkpkg.csv")).readlines()[1:]
- exceptions = [exc.strip() for exc in open(self.exceptions_path).readlines()]
- failed_upstream_checks = [pkg_data[0] for pkg_data in [pkg_line.split('\t') for pkg_line in checkpkg_result] if pkg_data[11] == '']
- regressed_failures = set(failed_upstream_checks) - set(exceptions)
- regressed_successes = set(exceptions) - set(failed_upstream_checks)
+ 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']
msg = ""
if len(regressed_failures) > 0:
msg = msg + """
The following packages failed upstream version checks. Please fix them using UPSTREAM_CHECK_URI/UPSTREAM_CHECK_REGEX
(when using tarballs) or UPSTREAM_CHECK_GITTAGREGEX (when using git). If an upstream version check cannot be performed
-(for example, if upstream does not use git tags), you can add the package to list of exceptions in
-meta-selftest/files/distrodata/checkpkg_exceptions.
+(for example, if upstream does not use git tags), you can set UPSTREAM_VERSION_UNKNOWN to '1' in the recipe to acknowledge
+that the check cannot be performed.
""" + "\n".join(regressed_failures)
if len(regressed_successes) > 0:
msg = msg + """
-The following packages have been checked successfully for upstream versions (or they no longer exist in oe-core),
-but are in the exceptions list in meta-selftest/files/distrodata/checkpkg_exceptions. Please remove them from that list.
+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)