Skip to content

Commit

Permalink
Pytest: add cpp harness (commaai#30471)
Browse files Browse the repository at this point in the history
cpp harness
  • Loading branch information
jnewb1 authored Nov 22, 2023
1 parent f65e6bc commit 8d3bf1f
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 0 deletions.
1 change: 1 addition & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
minversion = "6.0"
addopts = "--ignore=openpilot/ --ignore=cereal/ --ignore=opendbc/ --ignore=panda/ --ignore=rednose_repo/ --ignore=tinygrad_repo/ -Werror --strict-config --strict-markers --durations=10 -n auto --dist=loadgroup"
cpp_files = "test_*"
cpp_harness = "selfdrive/test/cpp_harness.py"
python_files = "test_*.py"
#timeout = "30" # you get this long by default
markers = [
Expand Down
11 changes: 11 additions & 0 deletions selfdrive/test/cpp_harness.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
#!/usr/bin/env python3
import subprocess
import sys

from openpilot.common.prefix import OpenpilotPrefix


with OpenpilotPrefix():
ret = subprocess.call(sys.argv[1:])

exit(ret)

0 comments on commit 8d3bf1f

Please sign in to comment.