board unit tests

This commit is contained in:
Andrey 2024-08-02 01:59:58 -04:00
parent eb2d815863
commit 0ed9bcec56
3 changed files with 30 additions and 0 deletions

24
_compile_unit_tests.sh Executable file
View File

@ -0,0 +1,24 @@
#!/usr/bin/env bash
cd ext/rusefi/unit_tests/
# This full path of the firmware directory
FDIR=$(cd "$(dirname "$0")"; pwd -P)
MI="../../../meta-info.env"
if [ -f "$FDIR/$MI" ]; then
true
# If the file exists relative to our current directory, get the full path
elif [ -f "$MI" ]; then
MI=$(realpath "$MI")
else
echo "Could not find $MI"
exit 1
fi
source ../firmware/config/boards/common_script_read_meta_env.inc "$MI"
make -j$(nproc)
build/rusefi_test

1
board_unit_tests.mk Normal file
View File

@ -0,0 +1 @@
TESTS_SRC_CPP += $(BOARD_DIR)/tests/test_example.cpp

5
tests/test_example.cpp Normal file
View File

@ -0,0 +1,5 @@
#include "pch.h"
TEST(BoardTest, Example) {
}