From 0457026fc28c1914d4e12a444c61f1a25ca257dd Mon Sep 17 00:00:00 2001 From: duerpei Date: Fri, 2 Sep 2022 14:20:45 +0800 Subject: meta-agl-test:add new feature 'agl-test' 'agl-test' is used to compile the test sets and test framework into the image, make it more convenient to test target. Now it's only support the target agl-demo-platform(ivi) Enable the `agl-test` AGL feature when setting up your build environment with aglsetup.sh. This will add the `packagegroup-agl-extend-test` packagegroup to the image, For specific packages to be added, please refer to the file: ./recipes-platform/packagegroup/packagegroup-agl-extend-test.bb For running test using 'agl-test', refer to: https://git.automotivelinux.org/src/agl-test-framework/tree/README Bug-AGL: SPEC-4345 Signed-off-by: duerpei Change-Id: Ic217bff672f3dae1ac3abc18c01ba802ebcb8fe1 --- meta-agl-test/README.md | 20 +++++++++++++ meta-agl-test/conf/include/agl-extend-test.inc | 2 ++ meta-agl-test/conf/layer.conf | 14 +++++++++ .../packagegroup/packagegroup-agl-extend-test.bb | 17 +++++++++++ .../agl-test-framework/agl-test-framework.bb | 29 +++++++++++++++++++ .../recipes-tests/glib2/agl-test-glib2.bb | 29 +++++++++++++++++++ .../recipes-tests/qa-test-misc/qa-test-misc.bb | 12 ++++++++ meta-agl-test/recipes-tests/rpm/agl-test-rpm.bb | 33 ++++++++++++++++++++++ templates/feature/agl-test/50_bblayers.conf.inc | 3 ++ templates/feature/agl-test/50_local.conf.inc | 2 ++ templates/feature/agl-test/included.dep | 1 + 11 files changed, 162 insertions(+) create mode 100644 meta-agl-test/README.md create mode 100644 meta-agl-test/conf/include/agl-extend-test.inc create mode 100644 meta-agl-test/conf/layer.conf create mode 100644 meta-agl-test/recipes-platform/packagegroup/packagegroup-agl-extend-test.bb create mode 100644 meta-agl-test/recipes-tests/agl-test-framework/agl-test-framework.bb create mode 100644 meta-agl-test/recipes-tests/glib2/agl-test-glib2.bb create mode 100644 meta-agl-test/recipes-tests/qa-test-misc/qa-test-misc.bb create mode 100644 meta-agl-test/recipes-tests/rpm/agl-test-rpm.bb create mode 100644 templates/feature/agl-test/50_bblayers.conf.inc create mode 100644 templates/feature/agl-test/50_local.conf.inc create mode 100644 templates/feature/agl-test/included.dep diff --git a/meta-agl-test/README.md b/meta-agl-test/README.md new file mode 100644 index 00000000..01d6f0ba --- /dev/null +++ b/meta-agl-test/README.md @@ -0,0 +1,20 @@ +# AGL test support layer + +This yocto layer adds the feature 'agl-test' + +'agl-test' is used to compile the test sets and test framework into the +image, make it more convenient to test target. + +For running test using 'agl-test', refer to: + https://git.automotivelinux.org/src/agl-test-framework/tree/README + +Now it's only support the target agl-demo-platform(ivi) + +## Setup + +Enable the `agl-test` AGL feature when setting up your build environment +with aglsetup.sh. + +This will add the `packagegroup-agl-extend-test` packagegroup to the image, +For specific packages to be added, please refer to the file: + ./recipes-platform/packagegroup/packagegroup-agl-extend-test.bb diff --git a/meta-agl-test/conf/include/agl-extend-test.inc b/meta-agl-test/conf/include/agl-extend-test.inc new file mode 100644 index 00000000..eabf2e5d --- /dev/null +++ b/meta-agl-test/conf/include/agl-extend-test.inc @@ -0,0 +1,2 @@ +FEATURE_PACKAGES_agl-test = "packagegroup-agl-extend-test" +IMAGE_FEATURES += "agl-test" diff --git a/meta-agl-test/conf/layer.conf b/meta-agl-test/conf/layer.conf new file mode 100644 index 00000000..f8dba7cb --- /dev/null +++ b/meta-agl-test/conf/layer.conf @@ -0,0 +1,14 @@ +#We have a conf and classes directory, add to BBPATH +BBPATH .= ":${LAYERDIR}" + +# We have recipes-* directories, add to BBFILES +BBFILES += "${LAYERDIR}/recipes-*/*/*.bb ${LAYERDIR}/recipes-*/*/*.bbappend" + +BBFILE_COLLECTIONS += "agl-test" +BBFILE_PATTERN_agl-test = "^${LAYERDIR}/" + +# This should only be incremented on significant changes that will +# cause compatibility issues with other layers +LAYERVERSION_agl-test = "1" + +LAYERSERIES_COMPAT_agl-test = "kirkstone" diff --git a/meta-agl-test/recipes-platform/packagegroup/packagegroup-agl-extend-test.bb b/meta-agl-test/recipes-platform/packagegroup/packagegroup-agl-extend-test.bb new file mode 100644 index 00000000..427eeb27 --- /dev/null +++ b/meta-agl-test/recipes-platform/packagegroup/packagegroup-agl-extend-test.bb @@ -0,0 +1,17 @@ +DESCRIPTION = "Agl Extend Test Group" +LICENSE = "Apache-2.0" + +inherit packagegroup + +PACKAGES = "\ + packagegroup-agl-extend-test \ +" + +ALLOW_EMPTY:${PN} = "1" + +RDEPENDS:${PN} += " \ + python3-pytest \ + agl-test-framework \ + agl-test-rpm \ + agl-test-glib2 \ +" diff --git a/meta-agl-test/recipes-tests/agl-test-framework/agl-test-framework.bb b/meta-agl-test/recipes-tests/agl-test-framework/agl-test-framework.bb new file mode 100644 index 00000000..7ef5d0e2 --- /dev/null +++ b/meta-agl-test/recipes-tests/agl-test-framework/agl-test-framework.bb @@ -0,0 +1,29 @@ +SUMMARY = "Agl Test Framework" +HOMEPAGE = "https://git.automotivelinux.org/src/agl-test-framework/" +LICENSE = "Apache-2.0" +LIC_FILES_CHKSUM = "file://LICENSE;md5=86d3f3a95c324c9479bd8986968f4327" + +PN = 'agl-test-framework' +PV = '1' + +SRC_URI = "git://gerrit.automotivelinux.org/gerrit/src/agl-test-framework;protocol=https;branch=master" +SRCREV = "aa5fab53993f29311f1aef83488eb0f759dabca8" + +S = "${WORKDIR}/git" + +FILES:${PN} += " \ + /usr/AGL/agl-test/ \ +" + +do_install:append() { + install -d ${D}/usr/bin/ + install -m 0755 ${WORKDIR}/git/agl-test ${D}/usr/bin/ + install -d ${D}/usr/AGL/agl-test/plugins/ + install -m 0644 ${WORKDIR}/git/pytest.ini ${D}/usr/AGL/agl-test/ + install -m 0644 ${WORKDIR}/git/conftest.py ${D}/usr/AGL/agl-test/ + install -m 0644 ${WORKDIR}/git/plugins/* ${D}/usr/AGL/agl-test/plugins/ +} + +RDEPENDS:${PN} += " \ + python3-pytest \ +" diff --git a/meta-agl-test/recipes-tests/glib2/agl-test-glib2.bb b/meta-agl-test/recipes-tests/glib2/agl-test-glib2.bb new file mode 100644 index 00000000..fe0da800 --- /dev/null +++ b/meta-agl-test/recipes-tests/glib2/agl-test-glib2.bb @@ -0,0 +1,29 @@ +SUMMARY = "Glib2 Test" +HOMEPAGE = "https://git.automotivelinux.org/src/qa-test-misc/" +LICENSE = "Apache-2.0" +LIC_FILES_CHKSUM = "file://LICENSE;md5=86d3f3a95c324c9479bd8986968f4327" + +PN = 'agl-test-glib2' +PV = '1' + +FILESEXTRAPATHS:append := "${TMPDIR}/work/aarch64-agl-linux/qa-test-misc/1-r0/git/:" +SRC_URI = "file://glib2/ \ + file://LICENSE " + +do_fetch[depends] = "qa-test-misc:do_unpack" + +S = "${WORKDIR}" + +FILES:${PN} += " \ + /usr/AGL/agl-test/tests/glib2 \ +" + +do_install:append() { + install -d ${D}/usr/AGL/agl-test/tests/glib2/ + install -m 0644 ${WORKDIR}/glib2/rootfs-scripts/*.py ${D}/usr/AGL/agl-test/tests/glib2/ +} + +RDEPENDS:${PN} += " \ + agl-test-framework \ + glib-2.0 \ +" diff --git a/meta-agl-test/recipes-tests/qa-test-misc/qa-test-misc.bb b/meta-agl-test/recipes-tests/qa-test-misc/qa-test-misc.bb new file mode 100644 index 00000000..65d2d32e --- /dev/null +++ b/meta-agl-test/recipes-tests/qa-test-misc/qa-test-misc.bb @@ -0,0 +1,12 @@ +SUMMARY = "Qa Test Misc" +HOMEPAGE = "https://git.automotivelinux.org/src/qa-test-misc/" +LICENSE = "Apache-2.0" +LIC_FILES_CHKSUM = "file://LICENSE;md5=86d3f3a95c324c9479bd8986968f4327" + +PN = 'qa-test-misc' +PV = '1' + +SRC_URI = "git://gerrit.automotivelinux.org/gerrit/src/qa-test-misc;protocol=https;branch=master" +SRCREV = "761c64f22b8a6c1202a2c9caafda36e154e81d41" + +S = "${WORKDIR}/git" diff --git a/meta-agl-test/recipes-tests/rpm/agl-test-rpm.bb b/meta-agl-test/recipes-tests/rpm/agl-test-rpm.bb new file mode 100644 index 00000000..94e9da95 --- /dev/null +++ b/meta-agl-test/recipes-tests/rpm/agl-test-rpm.bb @@ -0,0 +1,33 @@ +SUMMARY = "Rpm Test Set" +HOMEPAGE = "https://git.automotivelinux.org/src/qa-test-misc/" +LICENSE = "Apache-2.0" +LIC_FILES_CHKSUM = "file://LICENSE;md5=86d3f3a95c324c9479bd8986968f4327" + +PN = 'agl-test-rpm' +PV = '1' + +FILESEXTRAPATHS:append := "${TMPDIR}/work/aarch64-agl-linux/qa-test-misc/1-r0/git/:" + +SRC_URI = "file://rpm/ \ + file://LICENSE " + +do_fetch[depends] = "qa-test-misc:do_unpack" + +S = "${WORKDIR}" + +FILES:${PN} += " \ + /usr/AGL/agl-test/tests/rpm \ +" + +do_install:append() { + install -d ${D}/usr/AGL/agl-test/tests/rpm/resource/tests/ + install -m 0644 ${WORKDIR}/rpm/rootfs-scripts/*.py ${D}/usr/AGL/agl-test/tests/rpm/ + install -m 0644 ${WORKDIR}/rpm/rootfs-scripts/resource/rpm_test.sh ${D}/usr/AGL/agl-test/tests/rpm/resource/ + install -m 0644 ${WORKDIR}/rpm/rootfs-scripts/resource/test-manual-1.2.3.noarch.rpm ${D}/usr/AGL/agl-test/tests/rpm/resource/ + install -m 0644 ${WORKDIR}/rpm/rootfs-scripts/resource/tests/* ${D}/usr/AGL/agl-test/tests/rpm/resource/tests/ +} + +RDEPENDS:${PN} += " \ + agl-test-framework \ + rpm \ +" diff --git a/templates/feature/agl-test/50_bblayers.conf.inc b/templates/feature/agl-test/50_bblayers.conf.inc new file mode 100644 index 00000000..43d28c2a --- /dev/null +++ b/templates/feature/agl-test/50_bblayers.conf.inc @@ -0,0 +1,3 @@ +BBLAYERS =+ " \ + ${METADIR}/meta-agl-devel/meta-agl-test \ +" diff --git a/templates/feature/agl-test/50_local.conf.inc b/templates/feature/agl-test/50_local.conf.inc new file mode 100644 index 00000000..1c2cee8f --- /dev/null +++ b/templates/feature/agl-test/50_local.conf.inc @@ -0,0 +1,2 @@ +#see meta-agl-devel/meta-agl-test/conf/include/agl-extend-test.inc +require conf/include/agl-extend-test.inc diff --git a/templates/feature/agl-test/included.dep b/templates/feature/agl-test/included.dep new file mode 100644 index 00000000..0d586c2d --- /dev/null +++ b/templates/feature/agl-test/included.dep @@ -0,0 +1 @@ +agl-ptest agl-devel -- cgit 1.2.3-korg