rusefi/unit_tests
Andrey Gusakov 8a68fcbdbd etb: fix unit tests 2025-02-27 11:07:20 -05:00
..
chibios-mock
googletest@c231e6f5b1
test-framework fix test & update tests utils 2025-02-26 15:58:44 -05:00
test_basic_math
test_results Create readme.md 2024-12-29 21:06:34 -05:00
tests injector deadtime as table #7511 #7520 2025-02-26 19:57:47 -05:00
.cproject
.gitignore unit_tests "logic analyzer" moved to dedicated folder 2024-12-27 15:32:17 -04:00
.project
Makefile unit tests to write MS logs #7222 2024-12-27 22:38:52 -05:00
_time_tests.sh Break out unit tests - linking - also compilation time stats #2627 2025-02-26 20:31:56 -05:00
adc_inputs.h
boards.cpp adc: try to clean naming mess: getVoltageDivided() rename to adcGetScaledVoltage() 2024-12-09 07:43:43 -05:00
boards.h adc: try to clean naming mess: getAdcValue() rename to adcGetRawValue() 2024-12-09 07:43:43 -05:00
ci_gcov.sh
clean_compile.bat
clean_compile.sh
efifeatures.h EFI_HIP_9011_LOGIC 2025-01-19 15:34:57 -05:00
global.h
global_mocks.cpp
gmock-all.cpp
gtest-all.cpp
logicdata.cpp unit_tests "logic analyzer" style output #6403 2024-12-24 22:39:46 -05:00
logicdata.h unit_tests "logic analyzer" style output #6403 2024-12-24 22:39:46 -05:00
main.cpp
mocks.cpp only:testability 2024-09-18 00:33:15 -04:00
mocks.h etb: fix unit tests 2025-02-27 11:07:20 -05:00
readme.md only:readme 2025-02-25 21:57:42 -05:00
rules.mk
run_clean_gcov.sh
run_logicdata_sandbox.bat
run_sharded_tests.sh
test.mk
triggers.txt Trigger wheel definitions 2025-02-02 18:10:52 +00:00
unit_test_rules.mk compile coverage 2025-01-08 19:34:07 -05:00

readme.md

See https://github.com/rusefi/rusefi/wiki/Dev-Quality-Control

TL, DR: just follow tests folder as examples. tests/nitrous_control is a great starting point!

gcc/makefile/gtest

  1. Run 'make' to build desktop binary.
  2. Execute rusefi_test binary on your PC/Mac, it's expected to say SUCCESS and not fail :) Googletest will also print results summary.
  3. To run only one test use command line like build/rusefi_test --gtest_filter=*TEST_NAME* uncomment and modify main.cpp line ::testing::GTEST_FLAG(filter)

In this folder we have rusEFI unit tests using https://github.com/google/googletest

Unit tests are not aware of ChibiOS or ARM or else, they are just plain C/C++ which you build for your desktop, not your MCU.

Code Coverage Report

See also https://github.com/rusefi/rusefi/wiki/Build-Server-and-Automation

Triggers Images

Trigger images generation is still a two-step manual process:

Step 1: Invoke unit_tests. One of the unit_tests artifacts is triggers.txt

Step 2: Once we have triggers.txt updated by unit_tests we can invoke firmware/gen_trigger_images.bat in order to generate actual trigger images.