2023-01-06 17:10:33 -08:00
# Development Quality Control
2024-11-13 11:30:28 -08:00
rusEFI is striving to follow modern software development practices. Testing pyramid, TDD etc.
2020-08-26 07:27:11 -07:00
We love our engines and we want them to live a long & happy life. That's why we have a three-tier quality assurance process:
2023-02-26 06:33:25 -08:00
* Continuous Integration: Unit testing with Github Actions with [ASan ](https://github.com/google/sanitizers/wiki/AddressSanitizer )
2020-08-26 07:27:11 -07:00
* built-in trigger signal simulation
2020-08-28 06:02:28 -07:00
* [Simulator ](Virtual-simulator )
2020-08-26 07:27:11 -07:00
2022-01-24 15:40:21 -08:00
For current coverage report see [the coverage page ](https://rusefi.com/docs/unit_tests_coverage/ )
2020-12-06 15:37:34 -08:00
2021-01-12 13:11:15 -08:00
## Hardware Continuous Integration
2020-12-06 15:37:34 -08:00
2024-02-18 14:07:04 -08:00
### STM32F407G-DISC1
2020-12-06 15:37:34 -08:00
Since 2015 there is always a stm32f4 board listening for VCS updates running rusEFI hardware continues integration, "HW CI" for short.
Anyone can execute real hardware test suite by invoking. This command would detect rusEFI hardware automatically and invoke
2023-02-26 06:34:50 -08:00
HwCiF4Discovery.java
2020-12-06 15:37:34 -08:00
``java -jar rusefi_console.jar functional_test``
2023-01-02 11:22:23 -08:00
2020-12-06 15:37:34 -08:00
The following jumper wires are used to test some subsystems as realistically as possible:
2023-01-02 11:22:23 -08:00
* PD1 < => PC6
* PD2 < => PA5
2024-02-18 14:07:04 -08:00
### Proteus F4
2024-03-10 18:00:13 -07:00
See https://github.com/rusefi/rusefi/blob/c309174fdbb6b082113ac320294066c37922f2ce/java_console/autotest/src/main/java/com/rusefi/proteus/ProteusAnalogTest.java#L22
2024-02-18 21:04:25 -08:00
2024-10-30 17:00:20 -07:00
### HOWTO self-hosted runner build from scratch
GitHub Actions are Ubuntu, WSL is Ubuntu, Ubuntu is recommended
2024-10-30 18:24:03 -07:00
```shell
sudo apt install net-tools openssh-server curl git make gcc-multilib g++-multilib g++-mingw-w64 gcc-mingw-w64 sshpass mtools zip dosfstools openocd
2024-12-08 08:05:45 -08:00
sudo apt install gcc-12-arm-linux-gnueabi openjdk-21-jdk-headless stlink-tools
2024-10-30 17:00:44 -07:00
sudo systemctl enable ssh
2024-10-30 17:00:20 -07:00
```
2024-10-30 18:49:50 -07:00
https://github.com/rusefi/rusefi/settings/actions/runners use
2024-10-30 18:24:03 -07:00
``hw-ci-f4-discovery``
or
``hw-ci-nucleo-f7``
or
``hw-ci-proteus-f7``
additional label while adding runner.
2024-03-19 10:31:07 -07:00
2024-02-18 21:04:25 -08:00
https://docs.github.com/en/actions/hosting-your-own-runners/managing-self-hosted-runners/configuring-the-self-hosted-runner-application-as-a-service
2024-02-29 20:26:29 -08:00
2024-10-30 18:24:03 -07:00
https://elinux.org/Accessing_Devices_without_Sudo
2024-10-30 18:49:50 -07:00
2024-10-30 18:24:03 -07:00
```shell
useradd -G plugdev rusefi-ci
echo 'ATTRS{idProduct}=="374b", ATTRS{idVendor}=="0483", MODE="666", GROUP="plugdev"' > /etc/udev/rules.d/10-my-openocd.rules
2024-11-21 19:54:23 -08:00
echo 'ATTRS{idProduct}=="374e", ATTRS{idVendor}=="0483", MODE="666", GROUP="plugdev"' > /etc/udev/rules.d/11-my-openocd.rules
2024-10-30 18:24:03 -07:00
echo 'ATTRS{idProduct}=="5740", ATTRS{idVendor}=="0483", MODE="666", GROUP="plugdev"' > /etc/udev/rules.d/20-my-ecu-serial.rules
udevadm trigger
```
2024-10-29 16:45:44 -07:00
## Next Steps
Migrate to https://github.com/rusefi/rusefi-ci/ ?