Skip to content

Commit

Permalink
CI: fix misra mutation tests (#1934)
Browse files Browse the repository at this point in the history
* fix that

* skip build, install first

* Revert "skip build, install first"

This reverts commit 01efdb7.

* prune
  • Loading branch information
jnewb1 authored Apr 19, 2024
1 parent edcd0fe commit 4d60ae9
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 4 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ jobs:
run: ${{ env.RUN }} "cd tests/misra && ./test_misra.sh"
- name: MISRA mutation tests
timeout-minutes: 4
run: ${{ env.RUN }} "cd tests/misra && ./test_mutation.py"
run: ${{ env.RUN }} "cd tests/misra && pytest -n8 test_mutation.py"

python_linter:
name: python linter
Expand Down
3 changes: 3 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,8 @@ select = ["E", "F", "W", "PIE", "C4", "ISC", "RUF100", "A"]
ignore = ["W292", "E741", "E402", "C408", "ISC003"]
flake8-implicit-str-concat.allow-multiline=false

[tool.ruff.lint.flake8-tidy-imports.banned-api]
"pytest.main".msg = "pytest.main requires special handling that is easy to mess up!"

[tool.pytest.ini_options]
addopts = "-n auto"
1 change: 1 addition & 0 deletions tests/misra/install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ fi
cd $CPPCHECK_DIR

VERS="2.13.4"
git remote prune origin
git fetch --all --tags
git checkout $VERS
git cherry-pick -n f6b538e855f0bacea33c4074664628024ef39dc6 b11b42087ff29569bc3740f5aa07eb6616ea4f63
Expand Down
3 changes: 0 additions & 3 deletions tests/misra/test_mutation.py
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,3 @@ def test_misra_mutation(fn, patch, should_fail):
r = subprocess.run("tests/misra/test_misra.sh", cwd=tmp, shell=True)
failed = r.returncode != 0
assert failed == should_fail

if __name__ == "__main__":
pytest.main([__file__, "-n 8"])

0 comments on commit 4d60ae9

Please sign in to comment.