Skip to content

Commit 715c90e

Browse files
committed
Double the pytest timeout for test_large_number_of_violations_and_suppressions.
"build (tsan, -DANALYZE_THREAD=On, false, thread, false, --executor=thread --error-exitcode=0)" was failing due to timeout.
1 parent 51aecc6 commit 715c90e

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

test/cli/performance_test.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -416,13 +416,13 @@ class C {
416416

417417

418418
@pytest.mark.skipif(sys.platform == 'darwin', reason='GitHub macOS runners are too slow')
419-
@pytest.mark.timeout(5)
419+
@pytest.mark.timeout(10)
420420
def test_large_number_of_violations_and_suppressions(tmpdir):
421421
filename_main = os.path.join(tmpdir, 'main.c')
422422
# This name causes the PathMatch::match() to iterate ~70 times, which is not unrealistic for a header file placed in subdirs.
423423
# The number of iterations also depends on how the suppressions are written.
424424
header_name = 'long_filename_to_simulate_a_more_realistic_header_placed_in_subdirs.h'
425-
header_file = os.path.join(tmpdir, header_name)
425+
header_file = os.path.join(tmpdir, header_name)
426426
suppressions_file = os.path.join(tmpdir, 'suppressions.txt')
427427

428428
# Create a main file that includes a header and returns 0.
@@ -450,6 +450,6 @@ def test_large_number_of_violations_and_suppressions(tmpdir):
450450
# Create other suppressions that don't match the file name to test that iterating the suppressions are faster with cache
451451
for i in range(300):
452452
f.write(f'misra-c2012-2.5:**/{i}/{header_name}\n')
453-
f.write(f'misra-c2012-21.1:**/{i}/{header_name}\n')
454-
453+
f.write(f'misra-c2012-21.1:**/{i}/{header_name}\n')
454+
455455
cppcheck([filename_main] + ['--addon=misra.py', '--check-level=exhaustive', '--enable=all', f'--suppressions-list={suppressions_file}'])

0 commit comments

Comments
 (0)