rusefi/unit_tests
kifir 9f053cf4b7 enhance hysterisis detection: now we use isAfterLaunch indicator on launch_control_state panel instead of hidden class field #5610 2024-05-21 13:29:49 -04:00
..
chibios-mock unit_test: ThreadReference mock 2024-03-11 16:54:58 -04:00
googletest@c231e6f5b1 fresh googletest 2024-03-15 21:32:42 -06:00
test-framework start/stop button improvements #6483 2024-05-08 22:52:31 -04:00
test_basic_math Map3D should not be silently return 0 if not initialized #6461 2024-05-03 22:31:53 -04:00
tests enhance hysterisis detection: now we use isAfterLaunch indicator on launch_control_state panel instead of hidden class field #5610 2024-05-21 13:29:49 -04:00
.cproject dead warningEnabled global variable (#5636) 2023-10-24 18:55:29 -04:00
.gitignore add .idea folder to .gitignore 2024-04-25 13:10:34 -04:00
.project
Makefile move US_TO_NT_MULTIPLIER macro definition to Makefile (#6445) 2024-05-01 19:33:39 -04:00
adc_inputs.h adc: fix unit tests 2024-05-05 13:26:24 -04:00
boards.cpp
boards.h
ci_gcov.sh
clean_compile.bat
clean_compile.sh
efifeatures.h AlternatorController unit-tests 2023-11-10 17:13:50 -05:00
global.h move US_TO_NT_MULTIPLIER macro definition to Makefile (#6445) 2024-05-01 19:33:39 -04:00
global_mocks.cpp only: setTimeNowUs(): replace global fiddling with a function call 2024-04-27 11:00:55 -04:00
gmock-all.cpp only:spelling 2023-06-15 14:53:38 -04:00
gtest-all.cpp make unit tests compatible with latest googletest #2064 2023-06-15 16:29:28 -04:00
logicdata.cpp only:trying to help mac compiler 2024-03-23 08:48:02 -04:00
logicdata.h avoid UB in tests 2024-03-23 07:54:27 -04:00
main.cpp Usability: critical error in case of unneeded second channel #6419 2024-04-26 22:18:01 -04:00
mocks.cpp
mocks.h only: isEtbMode const 2024-05-04 12:42:43 -04:00
readme.md enhance instruction for running single test 2024-04-25 13:10:34 -04:00
rules.mk fix unit tests cleaning 2024-02-24 19:37:15 -05:00
run_clean_gcov.sh
run_gcov.bat
run_logicdata_sandbox.bat
run_sharded_tests.sh
svnversion.h
test.mk only: renaming .cpp 2024-04-30 16:15:13 -04:00
triggers.txt Trigger wheel definitions 2024-05-10 00:45:18 +00:00
unit_test_rules.mk move US_TO_NT_MULTIPLIER macro definition to Makefile (#6445) 2024-05-01 19:33:39 -04:00

readme.md

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

TL, DR: just follow tests folder as examples. 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.