commaai / panda

code powering the comma.ai panda
MIT License
1.53k stars 770 forks source link

misra mutations test - git diff error fix #1964

Closed dzid26 closed 4 months ago

dzid26 commented 4 months ago

Mutations test fails due to git diff running in a temp folder. Only when running locally for some reason. Error:

MISRA coverage table doesn't match. Update and commit:
Before: /home/dzid_/openpilot/panda/tests/misra
--------------------------------- Captured stderr call ----------------------------------
HEAD is now at 7cb8f2bc6 Fix #12726: Update for CheckOrderEvaluation (#6448)
fatal: not a git repository: /tmp/tmpowwsj6_q/../.git/modules/panda

This PR patches this problem.


I am still a bit confused though:

But regardless, I think this fix is necessary.

Edit: figured out the problem with running in root was due to pytest automatic test collection and execution of test_*.sh https://github.com/commaai/panda/pull/1970#discussion_r1637379679