From 60c3a423033082f15e3658f587c2f5bef6e7db92 Mon Sep 17 00:00:00 2001 From: dzid26 Date: Wed, 5 Jun 2024 18:11:32 +0100 Subject: [PATCH] local mutation test speed up - clear cppcheck dumps --- tests/misra/test_mutation.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/tests/misra/test_mutation.py b/tests/misra/test_mutation.py index 0adfba67ef0..b24a0791599 100755 --- a/tests/misra/test_mutation.py +++ b/tests/misra/test_mutation.py @@ -65,6 +65,11 @@ files = [f for f in all_files if f.endswith(('.c', '.h')) and not f.startswith(IGNORED_PATHS)] assert len(files) > 70, all(d in files for d in ('board/main.c', 'board/stm32f4/llbxcan.h', 'board/stm32h7/llfdcan.h', 'board/safety/safety_toyota.h')) +# Remove cppcheck files from previous runs to speed tree copying +for f in glob.glob(f"{ROOT}/**/*", recursive=True): + if f.endswith(('.dump', '.ctu-info')): + os.remove(f) + for p in patterns: mutations.append((random.choice(files), p, True))