From 1cd34e5645fbcc7b8fc1fdda11d97b21feabe633 Mon Sep 17 00:00:00 2001 From: Riccardo Date: Mon, 8 Jul 2019 15:32:17 -0700 Subject: [PATCH] Explicitly set the define and undefine for unknown configs in misra checks --- tests/misra/test_misra.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/misra/test_misra.sh b/tests/misra/test_misra.sh index e12255803e4b9a..10501db386c23b 100755 --- a/tests/misra/test_misra.sh +++ b/tests/misra/test_misra.sh @@ -8,7 +8,7 @@ make -j4 cd ../../../ # panda code -tests/misra/cppcheck/cppcheck --suppressions-list=tests/misra/suppressions.txt --dump --enable=all --inline-suppr board/main.c 2>/tmp/misra/cppcheck_output.txt || true +tests/misra/cppcheck/cppcheck -DCAN3 -DUID_BASE --suppressions-list=tests/misra/suppressions.txt --dump --enable=all --inline-suppr --force board/main.c 2>/tmp/misra/cppcheck_output.txt || true python tests/misra/cppcheck/addons/misra.py board/main.c.dump 2>/tmp/misra/misra_output.txt || true # violations in safety files @@ -24,5 +24,5 @@ then fi # pedal code -tests/misra/cppcheck/cppcheck --suppressions-list=tests/misra/suppressions.txt -I board/ --dump --enable=all --inline-suppr board/pedal/main.c 2>/tmp/misra/cppcheck_pedal_output.txt || true +tests/misra/cppcheck/cppcheck -UCAN3 --suppressions-list=tests/misra/suppressions.txt -I board/ --dump --enable=all --inline-suppr --force board/pedal/main.c 2>/tmp/misra/cppcheck_pedal_output.txt || true python tests/misra/cppcheck/addons/misra.py board/pedal/main.c.dump 2>/tmp/misra/misra_pedal_output.txt || true