summaryrefslogtreecommitdiffstats
path: root/bitbake/lib/layerindexlib/tests/testdata
diff options
context:
space:
mode:
authorMark Hatle <mark.hatle@windriver.com>2018-07-23 22:29:11 -0400
committerRichard Purdie <richard.purdie@linuxfoundation.org>2018-08-02 10:18:27 +0100
commit1ac19d1bf111a4836625f5cbb28a751d5c427395 (patch)
treeae9fa1448b425522952cbc8af90cf79912c746b1 /bitbake/lib/layerindexlib/tests/testdata
parent0dea95093115acc08f6ad19dc931d532a601cbec (diff)
downloadpoky-1ac19d1bf111a4836625f5cbb28a751d5c427395.tar.gz
bitbake: layerindexlib: Initial layer index processing module implementation
The layer index module is expected to be used by various parts of the system in order to access a layerindex-web (such as layers.openembedded.org) and perform basic processing on the information, such as dependency scanning. Along with the layerindex implementation are associated tests. The tests properly honor BB_SKIP_NETTESTS='yes' to prevent test failures. Tests Implemented: - Branch, LayerItem, LayerBranch, LayerDependency, Recipe, Machine and Distro objects - LayerIndex setup using the layers.openembedded.org restapi - LayerIndex storing and retrieving from a file - LayerIndex verify dependency resolution ordering - LayerIndex setup using simulated cooker data (Bitbake rev: fd0ee6c10dbb5592731e56f4c592fe687682a3e6) Signed-off-by: Mark Hatle <mark.hatle@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'bitbake/lib/layerindexlib/tests/testdata')
-rw-r--r--bitbake/lib/layerindexlib/tests/testdata/README11
-rw-r--r--bitbake/lib/layerindexlib/tests/testdata/build/conf/bblayers.conf15
-rw-r--r--bitbake/lib/layerindexlib/tests/testdata/layer1/conf/layer.conf17
-rw-r--r--bitbake/lib/layerindexlib/tests/testdata/layer2/conf/layer.conf20
-rw-r--r--bitbake/lib/layerindexlib/tests/testdata/layer3/conf/layer.conf19
-rw-r--r--bitbake/lib/layerindexlib/tests/testdata/layer4/conf/layer.conf22
6 files changed, 104 insertions, 0 deletions
diff --git a/bitbake/lib/layerindexlib/tests/testdata/README b/bitbake/lib/layerindexlib/tests/testdata/README
new file mode 100644
index 0000000000..36ab40bebe
--- /dev/null
+++ b/bitbake/lib/layerindexlib/tests/testdata/README
@@ -0,0 +1,11 @@
1This test data is used to verify the 'cooker' module of the layerindex.
2
3The module consists of a faux project bblayers.conf with four layers defined.
4
5layer1 - openembedded-core
6layer2 - networking-layer
7layer3 - meta-python
8layer4 - openembedded-layer (meta-oe)
9
10Since we do not have a fully populated cooker, we use this to test the
11basic index generation, and not any deep recipe based contents.
diff --git a/bitbake/lib/layerindexlib/tests/testdata/build/conf/bblayers.conf b/bitbake/lib/layerindexlib/tests/testdata/build/conf/bblayers.conf
new file mode 100644
index 0000000000..40429b2f66
--- /dev/null
+++ b/bitbake/lib/layerindexlib/tests/testdata/build/conf/bblayers.conf
@@ -0,0 +1,15 @@
1LAYERSERIES_CORENAMES = "sumo"
2
3# LAYER_CONF_VERSION is increased each time build/conf/bblayers.conf
4# changes incompatibly
5LCONF_VERSION = "7"
6
7BBPATH = "${TOPDIR}"
8BBFILES ?= ""
9
10BBLAYERS ?= " \
11 ${TOPDIR}/layer1 \
12 ${TOPDIR}/layer2 \
13 ${TOPDIR}/layer3 \
14 ${TOPDIR}/layer4 \
15 "
diff --git a/bitbake/lib/layerindexlib/tests/testdata/layer1/conf/layer.conf b/bitbake/lib/layerindexlib/tests/testdata/layer1/conf/layer.conf
new file mode 100644
index 0000000000..966d531959
--- /dev/null
+++ b/bitbake/lib/layerindexlib/tests/testdata/layer1/conf/layer.conf
@@ -0,0 +1,17 @@
1# We have a conf and classes directory, add to BBPATH
2BBPATH .= ":${LAYERDIR}"
3# We have recipes-* directories, add to BBFILES
4BBFILES += "${LAYERDIR}/recipes-*/*/*.bb"
5
6BBFILE_COLLECTIONS += "core"
7BBFILE_PATTERN_core = "^${LAYERDIR}/"
8BBFILE_PRIORITY_core = "5"
9
10LAYERSERIES_CORENAMES = "sumo"
11
12# This should only be incremented on significant changes that will
13# cause compatibility issues with other layers
14LAYERVERSION_core = "11"
15LAYERSERIES_COMPAT_core = "sumo"
16
17BBLAYERS_LAYERINDEX_NAME_core = "openembedded-core"
diff --git a/bitbake/lib/layerindexlib/tests/testdata/layer2/conf/layer.conf b/bitbake/lib/layerindexlib/tests/testdata/layer2/conf/layer.conf
new file mode 100644
index 0000000000..7569d1c217
--- /dev/null
+++ b/bitbake/lib/layerindexlib/tests/testdata/layer2/conf/layer.conf
@@ -0,0 +1,20 @@
1# We have a conf and classes directory, add to BBPATH
2BBPATH .= ":${LAYERDIR}"
3
4# We have a packages directory, add to BBFILES
5BBFILES += "${LAYERDIR}/recipes-*/*/*.bb \
6 ${LAYERDIR}/recipes-*/*/*.bbappend"
7
8BBFILE_COLLECTIONS += "networking-layer"
9BBFILE_PATTERN_networking-layer := "^${LAYERDIR}/"
10BBFILE_PRIORITY_networking-layer = "5"
11
12# This should only be incremented on significant changes that will
13# cause compatibility issues with other layers
14LAYERVERSION_networking-layer = "1"
15
16LAYERDEPENDS_networking-layer = "core"
17LAYERDEPENDS_networking-layer += "openembedded-layer"
18LAYERDEPENDS_networking-layer += "meta-python"
19
20LAYERSERIES_COMPAT_networking-layer = "sumo"
diff --git a/bitbake/lib/layerindexlib/tests/testdata/layer3/conf/layer.conf b/bitbake/lib/layerindexlib/tests/testdata/layer3/conf/layer.conf
new file mode 100644
index 0000000000..7089071faf
--- /dev/null
+++ b/bitbake/lib/layerindexlib/tests/testdata/layer3/conf/layer.conf
@@ -0,0 +1,19 @@
1# We might have a conf and classes directory, append to BBPATH
2BBPATH .= ":${LAYERDIR}"
3
4# We have recipes directories, add to BBFILES
5BBFILES += "${LAYERDIR}/recipes*/*/*.bb ${LAYERDIR}/recipes*/*/*.bbappend"
6
7BBFILE_COLLECTIONS += "meta-python"
8BBFILE_PATTERN_meta-python := "^${LAYERDIR}/"
9BBFILE_PRIORITY_meta-python = "7"
10
11# This should only be incremented on significant changes that will
12# cause compatibility issues with other layers
13LAYERVERSION_meta-python = "1"
14
15LAYERDEPENDS_meta-python = "core openembedded-layer"
16
17LAYERSERIES_COMPAT_meta-python = "sumo"
18
19LICENSE_PATH += "${LAYERDIR}/licenses"
diff --git a/bitbake/lib/layerindexlib/tests/testdata/layer4/conf/layer.conf b/bitbake/lib/layerindexlib/tests/testdata/layer4/conf/layer.conf
new file mode 100644
index 0000000000..6649ee0208
--- /dev/null
+++ b/bitbake/lib/layerindexlib/tests/testdata/layer4/conf/layer.conf
@@ -0,0 +1,22 @@
1# We have a conf and classes directory, append to BBPATH
2BBPATH .= ":${LAYERDIR}"
3
4# We have a recipes directory, add to BBFILES
5BBFILES += "${LAYERDIR}/recipes-*/*/*.bb ${LAYERDIR}/recipes-*/*/*.bbappend"
6
7BBFILE_COLLECTIONS += "openembedded-layer"
8BBFILE_PATTERN_openembedded-layer := "^${LAYERDIR}/"
9
10# Define the priority for recipes (.bb files) from this layer,
11# choosing carefully how this layer interacts with all of the
12# other layers.
13
14BBFILE_PRIORITY_openembedded-layer = "6"
15
16# This should only be incremented on significant changes that will
17# cause compatibility issues with other layers
18LAYERVERSION_openembedded-layer = "1"
19
20LAYERDEPENDS_openembedded-layer = "core"
21
22LAYERSERIES_COMPAT_openembedded-layer = "sumo"