rusefi-1/unit_tests
Matthew Kennedy d5363b814a
better VSS configuration (#3542)
* vss uses real values

* some defaults

* test and correct math

* km, not miles!

* comment

* tooltip

* that macro went away

* 100hz and default settings gives 9kph

* changelog

* order of operations safety

* make the test like the pwm test

* housekeeping

* this is why we need sensor automation

Co-authored-by: Matthew Kennedy <makenne@microsoft.com>
2021-11-27 08:49:07 -05:00
..
chibios-mock
googletest@dcc92d0ab6
test_basic_math
tests better VSS configuration (#3542) 2021-11-27 08:49:07 -05:00
.cproject
.gitignore
.project
Makefile
adc_inputs.h
boards.cpp remove engine pointer passing (#3556) 2021-11-16 04:15:29 -05:00
boards.h
ci_gcov.sh
clean_compile.bat
clean_compile.sh
efifeatures.h main relay doesn't use fsio (#3580) 2021-11-24 07:47:51 -05:00
engine_test_helper.cpp On -fpermissive in Windows in unit tests #3581 2021-11-20 00:23:27 -05:00
engine_test_helper.h remove engine pointer passing (#3556) 2021-11-16 04:15:29 -05:00
global.h Remove a bunch of macros from engine_ptr.h (#3562) 2021-11-17 10:01:39 +03:00
global_execution_queue.cpp
global_execution_queue.h
global_mocks.cpp
globalaccess.h Final cleanup of ENGINE macros (#3567) 2021-11-17 13:45:10 -05:00
gmock-all.cpp
gtest-all.cpp
jenkins.sh
logicdata.cpp
logicdata.h
logicdata_csv_reader.cpp remove engine pointer passing (#3556) 2021-11-16 04:15:29 -05:00
logicdata_csv_reader.h
logicdata_sandbox.cpp
main.cpp
map_resize.cpp
map_resize.h
mocks.cpp
mocks.h live data for wastegate #3588 2021-11-23 15:52:43 -05:00
os_access.h
readme.md
rules.mk don't do things that don't work in clang (#3584) 2021-11-20 02:40:41 -05:00
run_clean_gcov.sh
run_gcov.bat
run_logicdata_sandbox.bat
run_sharded_tests.sh
svnversion.h
test.mk
triggers.txt Trigger wheel definitions 2021-11-26 02:09:34 +00:00
unit_test_framework.cpp
unit_test_framework.h
unit_test_rules.mk only c++ because lua does some things asan doesn't like, but don't actually cause overruns. 2021-11-20 03:04:52 -05:00

readme.md

TL, DR: just follow tests folder as examples

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.

  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.

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.