Skip to content

Commit

Permalink
fix inconsistent misra mutation tests (#1935)
Browse files Browse the repository at this point in the history
* revert

* fix
  • Loading branch information
jnewb1 authored Apr 22, 2024
1 parent 4d60ae9 commit 698d17e
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 4 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ jobs:
timeout-minutes: 1
run: ${{ env.RUN }} "cd tests/misra && ./test_misra.sh"
- name: MISRA mutation tests
timeout-minutes: 4
timeout-minutes: 5
run: ${{ env.RUN }} "cd tests/misra && pytest -n8 test_mutation.py"

python_linter:
Expand Down
2 changes: 2 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,8 @@ RUN pyenv install 3.11.4 && \
ENV CPPCHECK_DIR=/tmp/cppcheck
COPY tests/misra/install.sh /tmp/
RUN /tmp/install.sh
# don't try to install again
ENV SKIP_CPPCHECK_INSTALL=1

RUN git config --global --add safe.directory /tmp/openpilot/panda
RUN cd /tmp && \
Expand Down
1 change: 0 additions & 1 deletion tests/misra/install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ fi
cd $CPPCHECK_DIR

VERS="2.13.4"
git remote prune origin
git fetch --all --tags
git checkout $VERS
git cherry-pick -n f6b538e855f0bacea33c4074664628024ef39dc6 b11b42087ff29569bc3740f5aa07eb6616ea4f63
Expand Down
2 changes: 1 addition & 1 deletion tests/misra/test_misra.sh
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ NC='\033[0m'
: "${CPPCHECK_DIR:=$DIR/cppcheck/}"

# install cppcheck if missing
if [ -z "${SKIP_BUILD}" ]; then
if [ -z "${SKIP_CPPCHECK_INSTALL}" ]; then
$DIR/install.sh
fi

Expand Down
3 changes: 2 additions & 1 deletion tests/misra/test_mutation.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,8 @@
'board/flasher.h',
'board/bootstub.c',
'board/bootstub_declarations.h',
'board/stm32f4/llflash.h'
'board/stm32h7/llflash.h',
'board/stm32f4/llflash.h',
)

mutations = [
Expand Down

0 comments on commit 698d17e

Please sign in to comment.