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:
I verified $DIR, $CPPCHECK_DIR, $PANDA_DIR point to temp folder.
However htop shows cppcheck process running in the root, not temp
and cppcheck dump files are created in the root (and not deleted):
:~/openpilot/panda/board$ ls -lt
total 391188
-rw-r--r-- 1 dzid_ dzid_ 34325973 May 31 14:41 main.c.14171.dump
-rw-r--r-- 1 dzid_ dzid_ 0 May 31 14:41 main.c.14171.ctu-info
-rw-r--r-- 1 dzid_ dzid_ 32331 May 31 14:41 main.c.13962.ctu-info
-rw-r--r-- 1 dzid_ dzid_ 34325982 May 31 14:41 main.c.13962.dump
-rw-r--r-- 1 dzid_ dzid_ 0 May 31 14:40 main.c.13794.ctu-info
Mutations test fails due to git diff running in a temp folder. Only when running locally for some reason. Error:
This PR patches this problem.
I am still a bit confused though:
$DIR
,$CPPCHECK_DIR
,$PANDA_DIR
point to temp folder.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