Skip to content

Commit 8ba7348

Browse files
committed
ci: run a minimal unittest on real hardware
In contrast to the past we cannot check for correct value ranges anymore, as our set of test devices it to large to track all the serial numbers, boot counters, etc. So instead we use the new "lazy mode" of our unittest tool and only verify the correct return codes for our bbapi calls. Additionally, we use the smalles subset of BBAPI IndexGroups (C6015), which is a IPC without CX powersupply and display. Signed-off-by: Patrick Bruenn <[email protected]>
1 parent b733651 commit 8ba7348

File tree

2 files changed

+9
-0
lines changed

2 files changed

+9
-0
lines changed

.ci/test-on-device.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,7 @@ default_packages="\
4242
bhfinfo,\
4343
build-essential,\
4444
ca-certificates,\
45+
cmake,\
4546
curl,\
4647
linux-headers-rt-amd64,\
4748
linux-image-rt-amd64,\

.test-stage/tests/bbapi-module/run

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,4 +26,12 @@ ${ssh_cmd} /bin/sh -$- <<- EOF
2626
# Basic test if the driver was loaded.
2727
sudo dmesg | grep --ignore-case bbapi
2828
ls -lh /dev/bbapi
29+
30+
# With BBAPI available, we should now be able to run our example. At
31+
# least a minimal subset of the test cases.
32+
sed -i "s/define CONFIG_INTERACTIVE 1/define CONFIG_INTERACTIVE 0/" test_config.h
33+
sed -i "s/\/\*\* select test device \*\//#include \"config_c6015.h\"/" test_config.h
34+
sed -i "s/#define UNITTEST_DO_COMPARE true/#define UNITTEST_DO_COMPARE false/" unittest.cpp
35+
make binaries
36+
sudo ./build/unittest.bin
2937
EOF

0 commit comments

Comments
 (0)