From: Alexander Lussier-Cullen <alexander.lussier-cul...@savoirfairelinux.com>

Add a toaster test builder that runs the tox test suite using a new
run-toaster-tests script.

Signed-off-by: Alexander Lussier-Cullen 
<alexander.lussier-cul...@savoirfairelinux.com>
CC: richard.pur...@linuxfoundation.org
---
 config.json               |  3 +++
 scripts/run-toaster-tests | 22 ++++++++++++++++++++++
 2 files changed, 25 insertions(+)
 create mode 100644 scripts/run-toaster-tests

diff --git a/config.json b/config.json
index d10a3a8..0c581d1 100644
--- a/config.json
+++ b/config.json
@@ -1675,6 +1675,9 @@
             "step1" : {
                 "BBTARGETS" : "core-image-patchtest"
             }
+        },
+        "toaster" : {
+            "EXTRACMDS" : ["${SCRIPTSDIR}/run-toaster-tests ${HELPERBUILDDIR} 
${HELPERBUILDDIR}/.."]
         }
     },
     "repo-defaults" : {
diff --git a/scripts/run-toaster-tests b/scripts/run-toaster-tests
new file mode 100644
index 0000000..a785c36
--- /dev/null
+++ b/scripts/run-toaster-tests
@@ -0,0 +1,22 @@
+#!/bin/bash
+#
+# SPDX-License-Identifier: GPL-2.0-only
+#
+# Called with $1 as the build directory
+#             $2 as the path to poky
+
+set -e
+set -u
+set -o pipefail
+set -x
+
+builddir=$(realpath "$1")
+pokydir=$(realpath "$2")
+
+cd $builddir
+mkdir -p toaster_logs
+python3 -m venv venv --without-pip --system-site-packages
+source venv/bin/activate
+python3 -m pip install tox
+
+tox -c $pokydir/bitbake/lib/toaster/tox.ini
-- 
2.34.1

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#61669): https://lists.yoctoproject.org/g/yocto/message/61669
Mute This Topic: https://lists.yoctoproject.org/mt/102567727/21656
Group Owner: yocto+ow...@lists.yoctoproject.org
Unsubscribe: https://lists.yoctoproject.org/g/yocto/unsub 
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-

Reply via email to