summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJan-Simon Moeller <jsmoeller@linuxfoundation.org>2020-09-15 16:31:18 +0200
committerJan-Simon Moeller <jsmoeller@linuxfoundation.org>2020-09-15 16:33:01 +0200
commitcf0f37327a9e0f896850bdea1fce1e29350929dd (patch)
treeca2466a120a8b675fc7819824fd024bc319beb46
parent0627a3a6f73e4d84aca3400e91d94852a8a02677 (diff)
Add wrapper for pyaglsandbox/jsmoeller/pyagl
This adds two wrappers for simple invocation of the pyagl pytests. run-pyagl-test and run-pyagl-test-lava . The latter one is to be used in CI. Bug-AGL: SPEC-3572 Signed-off-by: Jan-Simon Moeller <jsmoeller@linuxfoundation.org> Change-Id: Ia7db7fbe4242510e6578cd1707594f039664d098
-rw-r--r--meta-agl-profile-core/recipes-test/pyagl/files/run-pyagl-test4
-rw-r--r--meta-agl-profile-core/recipes-test/pyagl/files/run-pyagl-test-lava4
-rw-r--r--meta-agl-profile-core/recipes-test/pyagl/pyagl_git.bb12
3 files changed, 19 insertions, 1 deletions
diff --git a/meta-agl-profile-core/recipes-test/pyagl/files/run-pyagl-test b/meta-agl-profile-core/recipes-test/pyagl/files/run-pyagl-test
new file mode 100644
index 0000000..e62941c
--- /dev/null
+++ b/meta-agl-profile-core/recipes-test/pyagl/files/run-pyagl-test
@@ -0,0 +1,4 @@
+#!/bin/bash
+
+export ${AGL_AVAILABLE_INTERFACES:=ethernet}
+pytest -k "not hwrequired" /usr/lib/python?.?/site-packages/pyagl/tests
diff --git a/meta-agl-profile-core/recipes-test/pyagl/files/run-pyagl-test-lava b/meta-agl-profile-core/recipes-test/pyagl/files/run-pyagl-test-lava
new file mode 100644
index 0000000..355eadf
--- /dev/null
+++ b/meta-agl-profile-core/recipes-test/pyagl/files/run-pyagl-test-lava
@@ -0,0 +1,4 @@
+#!/bin/bash
+
+export ${AGL_AVAILABLE_INTERFACES:=ethernet}
+pytest -L -k "not hwrequired" /usr/lib/python?.?/site-packages/pyagl/tests
diff --git a/meta-agl-profile-core/recipes-test/pyagl/pyagl_git.bb b/meta-agl-profile-core/recipes-test/pyagl/pyagl_git.bb
index db6f7de..744a320 100644
--- a/meta-agl-profile-core/recipes-test/pyagl/pyagl_git.bb
+++ b/meta-agl-profile-core/recipes-test/pyagl/pyagl_git.bb
@@ -3,7 +3,11 @@ HOMEPAGE = "https://gerrit.automotivelinux.org/gerrit/#/admin/projects/src/pyagl
LICENSE = "Apache-2.0"
LIC_FILES_CHKSUM = "file://LICENSE;md5=ae6497158920d9524cf208c09cc4c984"
-SRC_URI = "git://gerrit.automotivelinux.org/gerrit/src/pyagl;protocol=https;branch=${AGL_BRANCH}"
+SRC_URI = " \
+ git://gerrit.automotivelinux.org/gerrit/src/pyagl;protocol=https;branch=${AGL_BRANCH} \
+ file://run-pyagl-test \
+ file://run-pyagl-test-lava \
+ "
SRCREV = "bc241e850fa1d2ceeb76acd9bac8733868392baa"
PV = "${AGL_BRANCH}+git${SRCPV}"
@@ -11,6 +15,12 @@ S = "${WORKDIR}/git"
inherit setuptools3
+do_install_append() {
+ install -d ${D}/${bindir}
+ install -m 644 ${WORKDIR}/run-pyagl-test ${D}/${bindir}
+ install -m 644 ${WORKDIR}/run-pyagl-test-lava ${D}/${bindir}
+}
+
RDEPENDS_${PN} += " \
python3-asyncio \
python3-asyncssh \