summaryrefslogtreecommitdiff
path: root/51-run-unit-tests.sh
blob: 528d4a4aa4b54cd65343c5046e6df113b500a84e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
#!/bin/bash

# SPDX-License-Identifier: GPL-2.0-or-later
#

source ./common.sh

logfile=$(log_filename $ID)

LIBCAMERA=${1:-$(srcdir libcamera)}
BUILDDIR=${2:-$(builddir unit-tests)}

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 | tee $logfile
pass_fail $? "Unit Tests"

completed $ID