Skip to content

re-run analysis in Python tests with cached results when TEST_CPPCHECK_INJECT_BUILDDIR is specified#7079

Draft
firewave wants to merge 14 commits into
cppcheck-opensource:mainfrom
firewave:inject-builddir-verify
Draft

re-run analysis in Python tests with cached results when TEST_CPPCHECK_INJECT_BUILDDIR is specified#7079
firewave wants to merge 14 commits into
cppcheck-opensource:mainfrom
firewave:inject-builddir-verify

Conversation

@firewave

@firewave firewave commented Dec 7, 2024

Copy link
Copy Markdown
Collaborator

No description provided.

Comment thread test/cli/testutils.py
print(stderr_lines)
print('stderr - actual')
print(stderr_1_lines)
# TODO: filter out checkersReport because it different amount of active checkers for cached runs

@firewave firewave Dec 7, 2024

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@firewave

firewave commented Dec 7, 2024

Copy link
Copy Markdown
Collaborator Author

The difference in the output of test_invalid_addon_py_verbose is tracked in https://trac.cppcheck.net/ticket/13389.

Comment thread test/cli/testutils.py
# strip some common output only seen during analysis
stdout_lines = [entry for entry in stdout_lines if not entry.startswith('Processing rule: ')]
stdout_lines = [entry for entry in stdout_lines if not entry.startswith('progress: ')]
# TODO: no messages for checked configurations when using cached data

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@firewave

firewave commented Dec 7, 2024

Copy link
Copy Markdown
Collaborator Author

test/cli/helloworld_test.py::test_sarif (Windows only) - https://trac.cppcheck.net/ticket/13393
test/cli/helloworld_test.py::test_xml_checkers_report - https://trac.cppcheck.net/ticket/13388 / https://trac.cppcheck.net/ticket/13390 (not fixed but test passes)
test/cli/inline-suppress_test.py::test_misra_disabled_unmatched - https://trac.cppcheck.net/ticket/13087
test/cli/inline-suppress_test.py::test_premium_disabled_unmatched - https://trac.cppcheck.net/ticket/13087
test/cli/inline-suppress_test.py::test_unmatched_cfg - https://trac.cppcheck.net/ticket/13087
test/cli/inline-suppress_test.py::test_unmatched_suppression - https://trac.cppcheck.net/ticket/13087
test/cli/inline-suppress_test.py::test_unmatched_suppression_path_with_extra_stuff - https://trac.cppcheck.net/ticket/13087
test/cli/inline-suppress_test.py::test_unused_function_disabled_unmatched - https://trac.cppcheck.net/ticket/13087
test/cli/inline-suppress_test.py::test_unused_function_unmatched - https://trac.cppcheck.net/ticket/13087
test/cli/inline-suppress_test.py::test_xml - https://trac.cppcheck.net/ticket/13388
test/cli/inline-suppress-polyspace_test.py::test_block - https://trac.cppcheck.net/ticket/14585 (possibly a different underlying issue but same root cause)
test/cli/inline-suppress-polyspace_test.py::test_unmatched_polyspace_suppression
test/cli/metrics_test.py::test_dummy_metrics_stdout - https://trac.cppcheck.net/ticket/14470 (not fixed - excluded from tests)
test/cli/metrics_test.py::test_dummy_metrics_xml_report - https://trac.cppcheck.net/ticket/14470 (not fixed - excluded from tests)
test/cli/other_test.py::test_addon_result - https://trac.cppcheck.net/ticket/14585 (possibly a different underlying issue but same root cause)
test/cli/other_test.py::test_addon_threadsafety - https://trac.cppcheck.net/ticket/14585 (possibly a different underlying issue but same root cause / fixed by different ticket?)
test/cli/other_test.py::test_execute_addon_file0- https://trac.cppcheck.net/ticket/13391
test/cli/other_test.py::test_addon_namingng_config - https://trac.cppcheck.net/ticket/13389 (mitigated but not properly fixed)
test/cli/other_test.py::test_checkers_report_misra_json - https://trac.cppcheck.net/ticket/13388
test/cli/other_test.py::test_ignore_project_2_file_wildcard_front (Windows only)
test/cli/other_test.py::test_inline_suppr - https://trac.cppcheck.net/ticket/13087
test/cli/other_test.py::test_inline_suppr_j - https://trac.cppcheck.net/ticket/13087
test/cli/other_test.py::test_invalid_addon_py_verbose - https://trac.cppcheck.net/ticket/13389 (mitigated but not properly fixed)
test/cli/other_test.py::test_suppress_unmatched_wildcard - https://trac.cppcheck.net/ticket/14585
test/cli/other_test.py::test_unmatched_file - https://trac.cppcheck.net/ticket/13659
test/cli/premium_test.py::test_misra_c_builtin_style_check - https://trac.cppcheck.net/ticket/13388
test/cli/proj2_test.py::test_gui_project_loads_relative_vs_solution_2 - https://trac.cppcheck.net/ticket/13926
test/cli/proj2_test.py::test_gui_project_loads_relative_vs_solution_with_exclude - https://trac.cppcheck.net/ticket/13926
test/cli/proj2_test.py::test_gui_project_loads_absolute_vs_solution_2 - https://trac.cppcheck.net/ticket/13926
test/cli/suppress-syntaxError_test.py::test_safety_suppress_syntax_error_explicitly - https://trac.cppcheck.net/ticket/14585 (possibly a different underlying issue but same root cause)
test/cli/suppress-syntaxError_test.py::test_safety_suppress_syntax_error_implicitly - https://trac.cppcheck.net/ticket/14585 (possibly a different underlying issue but same root cause)
test/cli/whole-program_test.py::test_addon_suppress_inline - https://trac.cppcheck.net/ticket/14585 (possibly a different underlying issue but same root cause)
test/cli/whole-program_test.py::test_addon_suppress_inline_project - https://trac.cppcheck.net/ticket/14585 (possibly a different underlying issue but same root cause)
test/cli/whole-program_test.py::test_nullpointer_file0 (Windows only) - https://trac.cppcheck.net/ticket/13906 / https://trac.cppcheck.net/ticket/14591

@sonarqubecloud

This comment was marked as outdated.

@firewave firewave force-pushed the inject-builddir-verify branch 2 times, most recently from 8a3165a to 9dc6fc9 Compare January 4, 2026 03:57
@firewave firewave force-pushed the inject-builddir-verify branch 4 times, most recently from f0443f4 to 62d5b6b Compare January 30, 2026 17:37
@firewave firewave force-pushed the inject-builddir-verify branch from d0dffbe to 4c453f2 Compare March 31, 2026 10:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

1 participant