summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKieran Bingham <kieran.bingham@ideasonboard.com>2021-08-05 12:09:34 +0100
committerKieran Bingham <kieran.bingham@ideasonboard.com>2021-08-06 16:50:09 +0100
commitf35c3896944dbccd654a9e5719c491ae3b48e57e (patch)
treebff9c10bc354cf97f440b2b09c2288eab3cc7aa0
parent068d96700ad7badb6f78435a3821f1b60a0a6ce7 (diff)
ci: Unit-tests: Check modules
Make sure the right modules are loaded before running the tests, or fail otherwise. Signed-off-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
-rwxr-xr-x51-run-unit-tests.sh10
1 files changed, 8 insertions, 2 deletions
diff --git a/51-run-unit-tests.sh b/51-run-unit-tests.sh
index 3f9671e..ce294ef 100755
--- a/51-run-unit-tests.sh
+++ b/51-run-unit-tests.sh
@@ -11,10 +11,16 @@ logfile=$(log_filename $ID)
LIBCAMERA=${1:-$(srcdir libcamera)}
BUILDDIR=${2:-$(builddir unit-tests)}
-set -e
-
check_version "$LIBCAMERA" "$ID"
+# Check that our test modules are loaded.
+modules=$(lsmod | grep -E -c "^vim2m|^vimc|^vivid")
+
+[ $modules == 3 ]
+pass_fail $? "Module load check"
+
+
+# Run the unit-tests
ninja -C $BUILDDIR test
completed $ID