summaryrefslogtreecommitdiffstats
path: root/meta-agl-test/recipes-tests/agl-test-framework/agl-test-framework.bb
diff options
context:
space:
mode:
authorYan <yanxk.fnst@fujitsu.com>2023-06-15 13:30:40 +0800
committerJan-Simon Moeller <jsmoeller@linuxfoundation.org>2023-08-02 11:34:25 +0000
commitfe8c4a516b3bff5f531caebd43c1f1ac137b9959 (patch)
treec61850d740f00c0d6b36078ddd50dcfec47b6a82 /meta-agl-test/recipes-tests/agl-test-framework/agl-test-framework.bb
parent482a6c532c6d997f83b224c47356b3bddfaa9bf9 (diff)
agl-test-framework: add three build modes
we now add 3 build time modes for users to select: mode 1: fast register AGL_TEST_MODE = "fast" into the local.conf, simply install tests runtime from 0-30 seconds. mode 2: standard ---> DEFAULT install tests that gets a runtime from 0 secs to 30 mins. mode 3: extreme install all tests. ---Notice---: we set default to "standard" mode. If you wish for other modes, put the below comment in your conf/local.conf: AGL_TEST_MODE = "fast" or AGL_TEST_MODE = "extreme" Bug-AGL: SPEC-4753 Signed-off-by: Yan <yanxk.fnst@fujitsu.com> Change-Id: If11db7ec50171aa69b98e1e656043722e2900182
Diffstat (limited to 'meta-agl-test/recipes-tests/agl-test-framework/agl-test-framework.bb')
-rw-r--r--meta-agl-test/recipes-tests/agl-test-framework/agl-test-framework.bb150
1 files changed, 142 insertions, 8 deletions
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
index 81cd4874..a9bc236f 100644
--- 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
@@ -7,15 +7,46 @@ PN = 'agl-test-framework'
PV = '1'
SRC_URI = "git://gerrit.automotivelinux.org/gerrit/src/agl-test-framework;protocol=https;branch=master"
-SRCREV = "eae50bd0b48073716ed5490ea74095fd52e4f2c0"
+SRCREV = "fbae7ac31fd2a895f74c4c57508662eec15f40c1"
S = "${WORKDIR}/git"
-FILES:${PN} += " \
- /usr/AGL/agl-test/ \
+# Notice:
+# This is the list of all installed tests
+# On the installing board, if you get dirpath like:
+# /usr/AGL/agl-test/tests/bc/
+# Then, the test name here you should write down: bc
+# If you are installing LTP related files:
+# /usr/AGL/agl-test/tests/LTP/syscalls/
+# Then, the test name here you should write down: LTP/syscalls
+#
+FRAMEWORK_INSTALL_LIST = " \
+ aio_stress \
+ bash \
+ bc \
+ busybox \
+ bzip2 \
+ crashme \
+ expat \
+ gdk_pixbuf \
+ glib2 \
+ json_glib \
+ libpam \
+ libxml2 \
+ linus_stress \
+ LTP/math \
+ LTP/cve \
+ LTP/posix_conformance_tests \
+ LTP/syscalls \
+ openssl \
+ python3 \
+ stress_ng \
+ zlib \
"
-do_install() {
+# Function of the structure installation
+install_framework () {
+ # basic essential pytest structure
install -d ${D}/usr/bin/
install -m 0755 ${WORKDIR}/git/agl-test ${D}/usr/bin/
install -d ${D}/usr/AGL/agl-test/plugins/
@@ -25,10 +56,113 @@ do_install() {
install -m 0644 ${WORKDIR}/git/template/* ${D}/usr/AGL/agl-test/template/
install -d ${D}/usr/AGL/agl-test/tests/
install -m 0644 ${WORKDIR}/git/tests/__init__.py ${D}/usr/AGL/agl-test/tests/
+ install -d ${D}/usr/AGL/agl-test/tests/LTP/
+ install -m 0644 ${WORKDIR}/git/tests/LTP/*py ${D}/usr/AGL/agl-test/tests/LTP/
+}
+
+# Function of the test file installation
+install_test_files () {
+ for test_name in ${FRAMEWORK_INSTALL_LIST}; do
+ # Step 1 : install basic python files (no check, this is common installation)
+ install -d ${D}/usr/AGL/agl-test/tests/${test_name}
+ install -m 0644 ${WORKDIR}/git/tests/${test_name}/*.py ${D}/usr/AGL/agl-test/tests/${test_name}/
+
+ # Step 2 : install spec.json (check first, not common)
+ if [ -f "${WORKDIR}/git/tests/${test_name}/spec.json" ];then
+ install -m 0644 ${WORKDIR}/git/tests/${test_name}/spec.json ${D}/usr/AGL/agl-test/tests/${test_name}
+ fi
+
+ # Step 3 : install the resource folder (check first, not common)
+ if [ -d "${WORKDIR}/git/tests/${test_name}/resource/" ];then
+ install -d ${D}/usr/AGL/agl-test/tests/${test_name}/resource
+ install -m 0644 ${WORKDIR}/git/tests/${test_name}/resource/* ${D}/usr/AGL/agl-test/tests/${test_name}/resource/
+ fi
+ done
+}
+
+# install agl-test-framework
+do_install() {
+ install_framework
+ install_test_files
}
-RDEPENDS:${PN} += " \
- python3-pytest \
- python3-jinja2 \
- python3-pytest-order \
+# Override PACKAGES
+# base: basic structure of the agl-test-framework along with pytest modules
+# fast: fast mode packages
+# standard: standard mode packages
+# extreme: extreme mode packages
+#
+PACKAGES = " \
+ ${PN}-base \
+ ${PN}-fast \
+ ${PN}-standard \
+ ${PN}-extreme \
+"
+
+# Filter for basic structure
+FILES:${PN}-base += " \
+ /usr/AGL/agl-test/plugins/* \
+ /usr/AGL/agl-test/pytest.ini \
+ /usr/AGL/agl-test/template/* \
+ /usr/AGL/agl-test/tests/LTP/agl_test_ltp_base.py \
+ /usr/AGL/agl-test/tests/LTP/__init__.py \
+ /usr/AGL/agl-test/tests/__init__.py \
+ /usr/bin/agl-test \
+"
+
+# Filter for fase mode
+FILES:${PN}-fast = " \
+ /usr/AGL/agl-test/tests/aio_stress/* \
+ /usr/AGL/agl-test/tests/bc/* \
+ /usr/AGL/agl-test/tests/expat/* \
+ /usr/AGL/agl-test/tests/gdk_pixbuf/* \
+ /usr/AGL/agl-test/tests/json_glib/* \
+ /usr/AGL/agl-test/tests/libpam/* \
+ /usr/AGL/agl-test/tests/LTP/math/* \
+ /usr/AGL/agl-test/tests/stress_ng/* \
+ /usr/AGL/agl-test/tests/zlib/* \
+"
+
+# Filter for standard mode
+FILES:${PN}-standard = " \
+ /usr/AGL/agl-test/tests/bash/* \
+ /usr/AGL/agl-test/tests/busybox/* \
+ /usr/AGL/agl-test/tests/bzip2/* \
+ /usr/AGL/agl-test/tests/crashme/* \
+ /usr/AGL/agl-test/tests/glib2/* \
+ /usr/AGL/agl-test/tests/libxml2/* \
+ /usr/AGL/agl-test/tests/linus_stress/* \
+ /usr/AGL/agl-test/tests/LTP/cve/* \
+ /usr/AGL/agl-test/tests/LTP/posix_conformance_tests/* \
+ /usr/AGL/agl-test/tests/openssl/* \
+"
+
+# Filter for extreme mode
+FILES:${PN}-extreme = " \
+ /usr/AGL/agl-test/tests/python3/* \
+ /usr/AGL/agl-test/tests/LTP/syscalls/* \
+"
+
+# Runtime dependency for basic structure
+RDEPENDS:${PN}-base += " \
+ python3-jinja2 \
+ python3-pytest \
+ python3-pytest-order \
+"
+
+# Runtime dependency for fast mode package
+RDEPENDS:${PN}-fast += " \
+ ltp \
+ aio-stress \
+ stress-ng \
+"
+
+# Runtime dependency for standard mode packages
+RDEPENDS:${PN}-standard += " \
+ linus-stress \
+"
+
+# Runtime dependency for extreme mode packages
+RDEPENDS:${PN}-extreme += " \
+ \
"