unit_tests: fix expected error count for some tests #1369
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Unit Tests | |
| on: | |
| push: | |
| pull_request: | |
| workflow_dispatch: | |
| jobs: | |
| build: | |
| runs-on: ${{ matrix.os }} | |
| strategy: | |
| matrix: | |
| os: [ubuntu-latest, macos-latest] | |
| steps: | |
| - uses: actions/checkout@v5 | |
| - name: Checkout Submodules Without ChibiOS | |
| run: | | |
| misc/git_scripts/common_submodule_init_without_chibios.sh | |
| - name: Discover cores | |
| if: ${{ matrix.os != 'macos-latest' }} | |
| run: lscpu | egrep 'Model name|Socket|Thread|NUMA|CPU\(s\)' | |
| - name: Install required software (ubuntu) | |
| if: ${{ matrix.os != 'macos-latest' }} | |
| run: | | |
| sudo bash misc/actions/add-ubuntu-latest-apt-mirrors.sh | |
| sudo bash misc/actions/ubuntu-install-tools.sh | |
| sudo apt-get install python3-pip valgrind | |
| pip install gcovr | |
| - name: Install required software (macos) | |
| if: ${{ matrix.os == 'macos-latest' }} | |
| run: | | |
| brew install mtools zip dosfstools flock coreutils | |
| - name: Print bash version | |
| run: bash --version | |
| - name: Test Java Compiler | |
| run: javac -version | |
| - name: Print Compiler version | |
| # NOTE: on mac, this is actually symlink'd to clang, not gcc, but that's ok - we want to build on both | |
| run: gcc -v | |
| - name: Handle docs-enums separately just to make github logs more readable | |
| working-directory: ./unit_tests/ | |
| run: make -j4 docs-enums | |
| - name: Handle configs separately just to make github logs more readable | |
| working-directory: ./unit_tests/ | |
| run: make -j4 config | |
| - name: Build Tests | |
| working-directory: ./unit_tests/ | |
| run: | | |
| TIMEFORMAT=%R | |
| time make -j4 COVERAGE=yes | |
| - name: Build Tests again to assert incremental | |
| working-directory: ./unit_tests/ | |
| run: | | |
| TIMEFORMAT=%R | |
| timeout 30s make -j4 COVERAGE=yes | |
| - name: Run Tests | |
| working-directory: ./unit_tests/ | |
| run: ASAN_OPTIONS=detect_stack_use_after_return=1 build/rusefi_test | |
| - name: Set FTP variables | |
| env: | |
| ACTIONS_ALLOW_UNSECURE_COMMANDS: 'true' | |
| run: | | |
| if [ "${{github.ref}}" = "refs/heads/master" ]; then | |
| echo "RUSEFI_SSH_SERVER=${{secrets.RUSEFI_SSH_SERVER}}" >> $GITHUB_ENV | |
| echo "RUSEFI_SSH_USER=${{secrets.RUSEFI_SSH_USER}}" >> $GITHUB_ENV | |
| echo "RUSEFI_SSH_PASS=${{secrets.RUSEFI_SSH_PASS}}" >> $GITHUB_ENV | |
| fi | |
| - name: Generate Code Coverage | |
| if: ${{ matrix.os != 'macos-latest' }} | |
| working-directory: ./unit_tests/ | |
| run: ./ci_gcov.sh | |
| - name: Upload code coverage artifacts | |
| if: ${{ matrix.os != 'macos-latest' }} | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: rusefi_code_coverage.txt | |
| path: ./unit_tests/gcov_working_area/gcov | |
| - name: upload test coverage to remote server | |
| if: ${{ matrix.os != 'macos-latest' && github.event_name == 'push' && github.ref == 'refs/heads/master' }} | |
| working-directory: ./unit_tests | |
| run: ./upload_coverage.sh | |
| # - name: Run Tests (sharded) | |
| # working-directory: ./unit_tests/ | |
| # run: bash ./run_sharded_tests.sh | |
| - name: Rebuild Tests For Valgrind | |
| # Valgrind isn't compatible with address sanitizer, so we have to rebuild the code | |
| if: ${{ matrix.os != 'macos-latest' }} | |
| working-directory: ./unit_tests/ | |
| run: | | |
| make clean | |
| ./make_for_valgrind.sh | |
| - name: Run Tests (Valgrind) | |
| if: ${{ matrix.os != 'macos-latest' }} | |
| working-directory: ./unit_tests/ | |
| run: ./run_with_valgrind.sh |