Added mock test runner function to menu.

This commit is contained in:
Jake Goodwin 2025-02-23 10:56:48 -08:00
parent 82c16a7ddc
commit 60b83865cd
1 changed files with 9 additions and 2 deletions

11
otto.sh
View File

@ -224,12 +224,19 @@ run_c_tests () {
make AllTests && ./tests/AllTests -c -v make AllTests && ./tests/AllTests -c -v
} }
run_mock_tests () {
format_source_code
clear_cmake_cache
cmake -DUNIT_TESTING=ON -DCMAKE_VERBOSE_MAKEFILE=${CMAKE_VERBOSE} ../
make Mock_Tests && ./tests/Mock_Tests -c -v
}
print_menu () { print_menu () {
echo "BUILD MENU:" echo "BUILD MENU:"
echo "0. Add Mock Module" echo "0. Add Mock Module"
echo "1. Run Tests" echo "1. Run Tests"
echo "2. Build Project(hex)" echo "2. Build Project(hex)"
echo "3. User Option" echo "3. Run MockTests"
echo "4. Flash to AVR" echo "4. Flash to AVR"
echo "5. Add new module to project" echo "5. Add new module to project"
echo "6. Delete module from project" echo "6. Delete module from project"
@ -264,7 +271,7 @@ main() {
3) 3)
echo "You selected Option 3" echo "You selected Option 3"
valid_choice=true valid_choice=true
build_hex_optimized run_mock_tests
;; ;;
4) 4)
echo "You selected Option 4" echo "You selected Option 4"