Skip to content

Commit

Permalink
added generator test (commaai#207)
Browse files Browse the repository at this point in the history
* added generator test
  • Loading branch information
rbiasini authored Dec 16, 2019
1 parent cb27d6e commit 53fc448
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 0 deletions.
3 changes: 3 additions & 0 deletions azure-pipelines.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,3 +14,6 @@ steps:
docker run opendbc bash -c "cd opendbc/can/tests/linter_python; PYTHONPATH=/ ./flake8_opendbc.sh"
docker run opendbc bash -c "cd opendbc/can/tests/linter_python; PYTHONPATH=/ ./pylint_opendbc.sh"
displayName: 'Python linter'
- script: |
docker run opendbc bash -c "cd opendbc/can/tests/; PYTHONPATH=/ ./test_generator.sh"
displayName: 'Generator test'
13 changes: 13 additions & 0 deletions can/tests/test_generator.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
#!/bin/bash -e

cd ../../generator/

# run generator
./generator.py

if [ -n "$(git status --untracked-files=no --porcelain)" ]; then
echo "Unexpected changes after running generator.py";
exit 1
else
echo "Success";
fi

0 comments on commit 53fc448

Please sign in to comment.