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>
This commit is contained in:
Alexander Kanavin 2017-08-11 12:45:19 +03:00 committed by Richard Purdie
parent 2d21e4302d
commit 5813f1f764
30 changed files with 35 additions and 38 deletions

View File

@ -1,28 +0,0 @@
build-compare
calibrateproto
dbus-wait
distcc
fstests
gnu-config
gst-player
kmscube
libxcalibrate
linux-firmware
llvm
lsb
mmc-utils
ovmf
piglit
psplash
puzzles
rpm
squashfs-tools
tcf-agent
unzip
update-rc.d
vulkan-demos
x264
xcursor-transparent-theme
xinetd
xvideo-tests
zip

View File

@ -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)

View File

@ -11,6 +11,7 @@ PV = "0.1+git${SRCPV}"
PR = "r2"
SRC_URI = "git://git.yoctoproject.org/${BPN}"
UPSTREAM_VERSION_UNKNOWN = "1"
S = "${WORKDIR}/git"

View File

@ -17,6 +17,7 @@ SRC_URI = "git://github.com/tianocore/edk2.git;branch=master \
file://0001-ia32-Dont-use-pie.patch \
file://no-stack-protector-all-archs.patch \
"
UPSTREAM_VERSION_UNKNOWN = "1"
OPENSSL_RELEASE = "openssl-1.1.0e"

View File

@ -12,6 +12,7 @@ PR = "r15"
SRC_URI = "git://git.yoctoproject.org/${BPN} \
file://psplash-init \
${SPLASH_IMAGES}"
UPSTREAM_VERSION_UNKNOWN = "1"
SPLASH_IMAGES = "file://psplash-poky-img.h;outsuffix=default"

View File

@ -15,6 +15,7 @@ SRC_URI = "git://github.com/philb/update-rc.d.git \
file://check-if-symlinks-are-valid.patch \
file://fix-to-handle-priority-numbers-correctly.patch \
"
UPSTREAM_VERSION_UNKNOWN = "1"
S = "${WORKDIR}/git"

View File

@ -22,6 +22,7 @@ SRC_URI = "git://github.com/openSUSE/build-compare.git \
SRCREV = "c5352c054c6ef15735da31b76d6d88620f4aff0a"
PE = "1"
PV = "2015.02.10+git${SRCPV}"
UPSTREAM_VERSION_UNKNOWN = "1"
S = "${WORKDIR}/git"

View File

@ -23,6 +23,7 @@ SRC_URI = "git://github.com/distcc/distcc.git;branch=${PV} \
file://distcc.service"
SRCREV = "d8b18df3e9dcbe4f092bed565835d3975e99432c"
S = "${WORKDIR}/git"
UPSTREAM_VERSION_UNKNOWN = "1"
inherit autotools pkgconfig update-rc.d useradd systemd

View File

@ -13,8 +13,8 @@ PV = "20150728+git${SRCPV}"
SRC_URI = "git://git.savannah.gnu.org/config.git \
file://gnu-configize.in"
S = "${WORKDIR}/git"
UPSTREAM_VERSION_UNKNOWN = "1"
CLEANBROKEN = "1"

View File

@ -26,6 +26,7 @@ SRC_URI = "git://github.com/llvm-mirror/llvm.git;branch=release_50;protocol=http
file://0001-llvm-TargetLibraryInfo-Undefine-libc-functions-if-th.patch \
file://0002-llvm-allow-env-override-of-exe-path.patch \
"
UPSTREAM_VERSION_UNKNOWN = "1"
S = "${WORKDIR}/git"
LLVM_INSTALL_DIR = "${WORKDIR}/llvm-install"

View File

@ -9,6 +9,7 @@ SRCREV = "37c86e60c0442fef570b75cd81aeb1db4d0cbafd"
PV = "0.1"
SRC_URI = "git://git.kernel.org/pub/scm/linux/kernel/git/cjb/mmc-utils.git;branch=${SRCBRANCH}"
UPSTREAM_VERSION_UNKNOWN = "1"
S = "${WORKDIR}/git"

View File

@ -43,6 +43,7 @@ SRC_URI = "git://github.com/rpm-software-management/rpm \
file://0003-rpmstrpool.c-make-operations-over-string-pools-threa.patch \
file://0004-build-pack.c-remove-static-local-variables-from-buil.patch \
"
UPSTREAM_VERSION_UNKNOWN = "1"
PV = "4.13.90+git${SRCPV}"
PE = "1"

View File

@ -15,6 +15,7 @@ SRC_URI = "git://github.com/plougher/squashfs-tools.git;protocol=https \
file://0001-mksquashfs.c-get-inline-functions-work-with-C99.patch;striplevel=2 \
file://fix-compat.patch \
"
UPSTREAM_VERSION_UNKNOWN = "1"
SRC_URI[lzma.md5sum] = "29d5ffd03a5a3e51aef6a74e9eafb759"
SRC_URI[lzma.sha256sum] = "c935fd04dd8e0e8c688a3078f3675d699679a90be81c12686837e0880aa0fa1e"

View File

@ -16,6 +16,7 @@ SRC_URI = "git://git.eclipse.org/gitroot/tcf/org.eclipse.tcf.agent;branch=1.4_ne
file://tcf-agent.init \
file://tcf-agent.service \
"
UPSTREAM_VERSION_UNKNOWN = "1"
DEPENDS = "util-linux openssl"
RDEPENDS_${PN} = "bash"

View File

@ -22,6 +22,7 @@ SRC_URI = "${SOURCEFORGE_MIRROR}/project/lsb/lsb_release/1.4/lsb-release-1.4.tar
file://lsb_pidofproc \
file://lsb_start_daemon \
"
UPSTREAM_VERSION_UNKNOWN = "1"
SRC_URI[md5sum] = "30537ef5a01e0ca94b7b8eb6a36bb1e4"
SRC_URI[sha256sum] = "99321288f8d62e7a1d485b7c6bdccf06766fb8ca603c6195806e4457fdf17172"

View File

@ -20,6 +20,7 @@ SRC_URI = "${SOURCEFORGE_MIRROR}/infozip/UnZip%206.x%20%28latest%29/UnZip%206.0/
file://18-cve-2014-9913-unzip-buffer-overflow.patch \
file://19-cve-2016-9844-zipinfo-buffer-overflow.patch \
"
UPSTREAM_VERSION_UNKNOWN = "1"
SRC_URI[md5sum] = "62b490407489521db863b523a7f86375"
SRC_URI[sha256sum] = "036d96991646d0449ed0aa952e4fbe21b476ce994abc276e49d30e686708bd37"

View File

@ -24,6 +24,7 @@ SRC_URI = "git://github.com/xinetd-org/xinetd.git;protocol=https \
file://0001-configure-Use-HAVE_SYS_RESOURCE_H-to-guard-sys-resou.patch \
file://xinetd.service \
"
UPSTREAM_VERSION_UNKNOWN = "1"
SRCREV = "68bb9ab9e9f214ad8a2322f28ac1d6733e70bc24"

View File

@ -11,6 +11,7 @@ S = "${WORKDIR}/zip30"
SRC_URI = "${SOURCEFORGE_MIRROR}/infozip/Zip%203.x%20%28latest%29/3.0/zip30.tar.gz \
file://fix-security-format.patch"
UPSTREAM_VERSION_UNKNOWN = "1"
SRC_URI[md5sum] = "7b74551e63f8ee6aab6fbc86676c0d37"
SRC_URI[sha256sum] = "f0e8bb1f9b7eb0b01285495a2699df3a4b766784c1765a8f1aeedf63c0806369"

View File

@ -8,6 +8,7 @@ SRCREV = "e5939ff608b95cdd4d0ab0e1935781ab9a276ac0"
PV = "0.1+git${SRCPV}"
SRC_URI = "git://git.yoctoproject.org/${BPN}"
UPSTREAM_VERSION_UNKNOWN = "1"
LIC_FILES_CHKSUM = "file://test-pango-gdk.c;endline=24;md5=1ee74ec851ecda57eb7ac6cc180f7655"

View File

@ -8,6 +8,7 @@ LIC_FILES_CHKSUM = "file://kmscube.c;beginline=1;endline=23;md5=8b309d4ee67b7315
SRCREV = "0d8de4ce3a03f36af1817f9b0586d132ad2c5d2e"
SRC_URI = "git://anongit.freedesktop.org/mesa/kmscube;branch=master;protocol=git"
UPSTREAM_VERSION_UNKNOWN = "1"
S = "${WORKDIR}/git"

View File

@ -6,6 +6,7 @@ SRC_URI = "git://anongit.freedesktop.org/piglit \
file://0001-cmake-install-bash-completions-in-the-right-place.patch \
file://0001-tests-Use-FE_UPWARD-only-if-its-defined-in-fenv.h.patch \
"
UPSTREAM_VERSION_UNKNOWN = "1"
# From 2017-07-03
SRCREV = "c8f4fd9eeb298a2ef0855927f22634f794ef3eff"

View File

@ -10,6 +10,7 @@ SRC_URI = "git://github.com/SaschaWillems/Vulkan.git \
file://0001-Don-t-build-demos-with-questionably-licensed-data.patch \
file://0001-Fix-build-on-x86.patch \
"
UPSTREAM_VERSION_UNKNOWN = "1"
SRCREV = "18df00c7b4677b0889486e16977857aa987947e2"
UPSTREAM_CHECK_GITTAGREGEX = "These are not the releases you're looking for"
S = "${WORKDIR}/git"

View File

@ -11,6 +11,7 @@ SRCREV = "23c8af5ba4a1b7efbaf0bbca59a65ff7e10a1a06"
PV = "0.1.1+git${SRCPV}"
SRC_URI = "git://git.yoctoproject.org/${BPN};branch=master"
UPSTREAM_VERSION_UNKNOWN = "1"
S = "${WORKDIR}/git"

View File

@ -16,6 +16,7 @@ PV = "0.0+git${SRCPV}"
SRC_URI = "git://anongit.freedesktop.org/git/xorg/lib/libXCalibrate \
file://fix-xcb.patch"
UPSTREAM_VERSION_UNKNOWN = "1"
S = "${WORKDIR}/git"

View File

@ -17,3 +17,5 @@ PR = "r2"
SRC_URI = "git://anongit.freedesktop.org/git/xorg/proto/calibrateproto \
file://fix.patch;apply=yes"
S = "${WORKDIR}/git"
UPSTREAM_VERSION_UNKNOWN = "1"

View File

@ -8,6 +8,7 @@ SRCREV = "7d38b881e99eb74169d292b40f7164e461a65092"
PV = "0.1+git${SRCPV}"
SRC_URI = "git://git.yoctoproject.org/test-xvideo"
UPSTREAM_VERSION_UNKNOWN = "1"
S = "${WORKDIR}/git"

View File

@ -186,6 +186,7 @@ SRC_URI += "https://git.kernel.org/cgit/linux/kernel/git/iwlwifi/linux-firmware.
SRC_URI[iwlwifi-19.md5sum] = "132fbaee36beec5e98714f0bd66f7a1d"
SRC_URI[iwlwifi-19.sha256sum] = "2034470df64d323b827c4f2d4d0d55be2846b7360179b5574aa28ff77b6c9471"
UPSTREAM_VERSION_UNKNOWN = "1"
S = "${WORKDIR}/git"

View File

@ -13,6 +13,7 @@ SRC_URI = "git://github.com/sdroege/gst-player.git \
SRCREV = "ee3c226c82767a089743e4e06058743e67f73cdb"
PV = "0.0.1+git${SRCPV}"
UPSTREAM_VERSION_UNKNOWN = "1"
S = "${WORKDIR}/git"

View File

@ -12,6 +12,7 @@ SRC_URI = "git://github.com/mirror/x264;branch=stable \
file://don-t-default-to-cortex-a9-with-neon.patch \
file://Fix-X32-build-by-disabling-asm.patch \
"
UPSTREAM_VERSION_UNKNOWN = "1"
SRCREV = "2b741f81e51f92d053d87a49f59ff1026553a0f6"

View File

@ -16,6 +16,7 @@ SRC_URI = "git://git.tartarus.org/simon/puzzles.git \
file://0001-Clarify-conditions-to-avoid-compiler-errors.patch \
file://0001-Use-Wno-error-format-overflow-if-the-compiler-suppor.patch \
"
UPSTREAM_VERSION_UNKNOWN = "1"
SRCREV = "8dfe5cec31e784e4ece2955ecc8cc35ee7e8fbb3"
PE = "1"
PV = "0.0+git${SRCPV}"