Skip to content

Commit

Permalink
refs #12274 - test/cli/more-projects_test.py: made `test_shared_items…
Browse files Browse the repository at this point in the history
…_project` location-independent / removed `-j1` (danmar#7002)
  • Loading branch information
firewave authored Nov 13, 2024
1 parent 550243a commit 648d1c8
Showing 1 changed file with 7 additions and 10 deletions.
17 changes: 7 additions & 10 deletions test/cli/more-projects_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
import sys
from testutils import cppcheck, assert_cppcheck

__script_dir = os.path.dirname(os.path.abspath(__file__))

def test_project_force_U(tmpdir):
# 10018
Expand Down Expand Up @@ -845,22 +846,18 @@ def test_compdb_D(tmpdir):
assert ret == 0, stdout


def test_shared_items_project(tmpdir = ""):
# tmpdir is unused
solutionDir = os.path.join(os.getcwd(), 'shared-items-project')
solutionFile = os.path.join(solutionDir, 'Solution.sln')
def test_shared_items_project():
solution_file = os.path.join('shared-items-project', 'Solution.sln')

args = [
'--platform=win64',
'--project={}'.format(solutionFile),
'--project-configuration=Release|x64',
'-j1'
'--project={}'.format(solution_file),
'--project-configuration=Release|x64'
]

exitcode, stdout, stderr = cppcheck(args)
exitcode, stdout, stderr = cppcheck(args, cwd=__script_dir)
assert exitcode == 0
lines = stdout.splitlines()

# Assume no errors, and that shared items code files have been checked as well
assert any('2/2 files checked 100% done' in x for x in lines)
assert '2/2 files checked ' in stdout # only perform partial check since -j2 does not report a percentage right now
assert stderr == ''

0 comments on commit 648d1c8

Please sign in to comment.