Skip to content

Commit b326a34

Browse files
committed
s
1 parent 4a4541a commit b326a34

1 file changed

Lines changed: 8 additions & 2 deletions

File tree

test/cli/whole-program_test.py

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -212,13 +212,19 @@ def test_suppress_inline_project_builddir_j(tmpdir):
212212
os.mkdir(build_dir)
213213
__test_suppress_inline_project(tmpdir, ['-j2', '--cppcheck-build-dir={}'.format(build_dir)])
214214

215-
# TODO: fails with builddir
216-
def test_addon_rerun():
215+
@pytest.mark.parametrize("builddir", (False,True))
216+
def test_addon_rerun(tmp_path, builddir):
217+
"""Rerun analysis and ensure that misra CTU works; with and without build dir"""
217218
args = [
218219
'--addon=misra',
219220
'--enable=style',
220221
'--template={id}',
221222
'whole-program']
223+
# do not use the injection because the directory needs to survive runs
224+
if builddir:
225+
args.append('--cppcheck-build-dir=' + str(tmp_path))
226+
else:
227+
args.append('--no-cppcheck-build-dir')
222228
_, _, stderr = cppcheck(args, cwd=__script_dir)
223229
assert 'misra-c2012-5.8' in stderr
224230
_, _, stderr = cppcheck(args, cwd=__script_dir)

0 commit comments

Comments
 (0)