Skip to content

Commit

Permalink
remove 'jobs' as CI tries that automatically
Browse files Browse the repository at this point in the history
  • Loading branch information
danmar committed Sep 27, 2024
1 parent a18d44e commit f46c5da
Showing 1 changed file with 6 additions and 10 deletions.
16 changes: 6 additions & 10 deletions test/cli/whole-program_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -212,11 +212,10 @@ def test_suppress_inline_project_builddir_j(tmpdir):
os.mkdir(build_dir)
__test_suppress_inline_project(tmpdir, ['-j2', '--cppcheck-build-dir={}'.format(build_dir)])

@pytest.mark.parametrize("jobs,builddir", ((1,False), (1,True), (2,False), (2,True)))
def test_addon_rerun(tmpdir, jobs, builddir):
"""Rerun analysis and ensure that misra CTU works; with and without build dir, with -j1 and -j2"""
@pytest.mark.parametrize("builddir", (False,True))
def test_addon_rerun(tmpdir, builddir):
"""Rerun analysis and ensure that misra CTU works; with and without build dir"""
args = [
'-j%i' % jobs,
'--addon=misra',
'--enable=style',
'--template={id}',
Expand All @@ -228,12 +227,10 @@ def test_addon_rerun(tmpdir, jobs, builddir):
_, _, stderr = cppcheck(args, cwd=__script_dir)
assert 'misra-c2012-5.8' in stderr

@pytest.mark.parametrize("jobs", (1,2))
def test_addon_builddir_use_ctuinfo(tmpdir, jobs):
def test_addon_builddir_use_ctuinfo(tmpdir):
"""Test that ctu-info files are used when builddir is used"""
args = [
'--cppcheck-build-dir=' + str(tmpdir),
'-j%i' % jobs,
'--addon=misra',
'--enable=style',
'--template={id}',
Expand All @@ -247,15 +244,14 @@ def test_addon_builddir_use_ctuinfo(tmpdir, jobs):
_, _, stderr = cppcheck(args, cwd=__script_dir)
assert 'misra-c2012-5.8' not in stderr

@pytest.mark.parametrize("jobs,builddir", ((1,False), (1,True), (2,False), (2,True)))
def test_addon_no_artifacts(tmpdir, jobs, builddir):
@pytest.mark.parametrize("builddir", (False,True))
def test_addon_rerun(tmpdir, builddir):
"""Test that there are no artifacts left after analysis"""
shutil.copyfile(os.path.join(__script_dir, 'whole-program', 'whole1.c'), os.path.join(tmpdir, 'whole1.c'))
shutil.copyfile(os.path.join(__script_dir, 'whole-program', 'whole2.c'), os.path.join(tmpdir, 'whole2.c'))
build_dir = os.path.join(tmpdir, 'b1')
os.mkdir(build_dir)
args = [
'-j%i' % jobs,
'--addon=misra',
'--enable=style',
'--template={id}',
Expand Down

0 comments on commit f46c5da

Please sign in to comment.