]> code.ossystems Code Review - openembedded-core.git/commit
yocto-compat-layer.py: Add script to YP Compatible Layer validation
authorAníbal Limón <anibal.limon@linux.intel.com>
Mon, 20 Feb 2017 21:12:49 +0000 (15:12 -0600)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Sat, 4 Mar 2017 10:42:33 +0000 (10:42 +0000)
commite14596ac33329bc61fe38a6582fa91f76ff5b147
treecfa1b3a4376a012935002944783da4fb33ac7180
parent1aa909991c7c6cd484cae35fcc742fbe7af3f8e8
yocto-compat-layer.py: Add script to YP Compatible Layer validation

The yocto-compat-layer script serves as a tool to validate the alignament
of a layer with YP Compatible Layers Programme [1], is based on an RFC
sent to the ML to enable automatic testing of layers [2] that wants to
be YP Compatible.

The tool takes an layer (or set of layers) via command line option -l
and detects what kind of layer is distro, machine or software and then
executes a  set of tests against the layer in order to validate the
compatibility.

The tests currently implemented are:

common.test_readme: Test if a README file exists in the layer and isn't
    empty.
common.test_parse: Test for execute bitbake -p without errors.
common.test_show_environment: Test for execute bitbake -e without errors.
common.test_signatures: Test executed in BSP and DISTRO layers to review
    doesn't comes with recipes that changes the signatures.

bsp.test_bsp_defines_machines: Test if a BSP layers has machines
    configurations.
bsp.test_bsp_no_set_machine: Test the BSP layer to doesn't set
    machine at adding layer.

distro.test_distro_defines_distros: Test if a DISTRO layers has distro
    configurations.
distro.test_distro_no_set_distro: Test the DISTRO layer to doesn't set
    distro at adding layer.

Example of usage:

$ source oe-init-build-env
$ yocto-compat-layer.py LAYER_DIR

[YOCTO #10596]

[1] https://www.yoctoproject.org/webform/yocto-project-compatible-registration
[2] https://lists.yoctoproject.org/pipermail/yocto-ab/2016-October/001801.html

Signed-off-by: Aníbal Limón <anibal.limon@linux.intel.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
scripts/lib/compatlayer/__init__.py [new file with mode: 0644]
scripts/lib/compatlayer/case.py [new file with mode: 0644]
scripts/lib/compatlayer/cases/__init__.py [new file with mode: 0644]
scripts/lib/compatlayer/cases/bsp.py [new file with mode: 0644]
scripts/lib/compatlayer/cases/common.py [new file with mode: 0644]
scripts/lib/compatlayer/cases/distro.py [new file with mode: 0644]
scripts/lib/compatlayer/context.py [new file with mode: 0644]
scripts/yocto-compat-layer.py [new file with mode: 0755]