summaryrefslogtreecommitdiffstats
path: root/meta/lib/oeqa/selftest/cases/distrodata.py
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:03:13 +0100
commit5813f1f764f0c18ee2d00af9491f897bcc4089ab (patch)
treed3ca6163754f18f33a944125674031bbbc57052b /meta/lib/oeqa/selftest/cases/distrodata.py
parent2d21e4302de2d910c47209b115bd90cab48fc5a0 (diff)
downloadpoky-5813f1f764f0c18ee2d00af9491f897bcc4089ab.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] (From OE-Core rev: 89dfede4ca795ba085f1ee7290c6dede573c11db) Signed-off-by: Alexander Kanavin <alexander.kanavin@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/lib/oeqa/selftest/cases/distrodata.py')
-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):
8 @classmethod 8 @classmethod
9 def setUpClass(cls): 9 def setUpClass(cls):
10 super(Distrodata, cls).setUpClass() 10 super(Distrodata, cls).setUpClass()
11 cls.exceptions_path = os.path.join(cls.testlayer_path, 'files', 'distrodata', "checkpkg_exceptions")
12 11
13 def test_checkpkg(self): 12 def test_checkpkg(self):
14 """ 13 """
@@ -23,21 +22,19 @@ class Distrodata(OESelftestTestCase):
23 self.write_config(feature) 22 self.write_config(feature)
24 bitbake('-c checkpkg world') 23 bitbake('-c checkpkg world')
25 checkpkg_result = open(os.path.join(get_bb_var("LOG_DIR"), "checkpkg.csv")).readlines()[1:] 24 checkpkg_result = open(os.path.join(get_bb_var("LOG_DIR"), "checkpkg.csv")).readlines()[1:]
26 exceptions = [exc.strip() for exc in open(self.exceptions_path).readlines()] 25 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']
27 failed_upstream_checks = [pkg_data[0] for pkg_data in [pkg_line.split('\t') for pkg_line in checkpkg_result] if pkg_data[11] == ''] 26 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']
28 regressed_failures = set(failed_upstream_checks) - set(exceptions)
29 regressed_successes = set(exceptions) - set(failed_upstream_checks)
30 msg = "" 27 msg = ""
31 if len(regressed_failures) > 0: 28 if len(regressed_failures) > 0:
32 msg = msg + """ 29 msg = msg + """
33The following packages failed upstream version checks. Please fix them using UPSTREAM_CHECK_URI/UPSTREAM_CHECK_REGEX 30The following packages failed upstream version checks. Please fix them using UPSTREAM_CHECK_URI/UPSTREAM_CHECK_REGEX
34(when using tarballs) or UPSTREAM_CHECK_GITTAGREGEX (when using git). If an upstream version check cannot be performed 31(when using tarballs) or UPSTREAM_CHECK_GITTAGREGEX (when using git). If an upstream version check cannot be performed
35(for example, if upstream does not use git tags), you can add the package to list of exceptions in 32(for example, if upstream does not use git tags), you can set UPSTREAM_VERSION_UNKNOWN to '1' in the recipe to acknowledge
36meta-selftest/files/distrodata/checkpkg_exceptions. 33that the check cannot be performed.
37""" + "\n".join(regressed_failures) 34""" + "\n".join(regressed_failures)
38 if len(regressed_successes) > 0: 35 if len(regressed_successes) > 0:
39 msg = msg + """ 36 msg = msg + """
40The following packages have been checked successfully for upstream versions (or they no longer exist in oe-core), 37The following packages have been checked successfully for upstream versions,
41but are in the exceptions list in meta-selftest/files/distrodata/checkpkg_exceptions. Please remove them from that list. 38but their recipes claim otherwise by setting UPSTREAM_VERSION_UNKNOWN. Please remove that line from the recipes.
42""" + "\n".join(regressed_successes) 39""" + "\n".join(regressed_successes)
43 self.assertTrue(len(regressed_failures) == 0 and len(regressed_successes) == 0, msg) 40 self.assertTrue(len(regressed_failures) == 0 and len(regressed_successes) == 0, msg)