tests: Don't build functional test with analyzer and increase timeouts

This commit is contained in:
Michael Vetter
2026-03-06 11:01:18 +01:00
parent 285a5086ca
commit 778a9b3d3d
2 changed files with 5 additions and 3 deletions

View File

@@ -59,6 +59,7 @@ add_project_arguments([
'-Wno-unused-parameter',
], language: 'c')
analyzer_args = []
if is_debug
add_project_arguments([
'-ggdb3',
@@ -71,7 +72,7 @@ if is_debug
'-Wpointer-arith'
], language: 'c')
if cc.get_id() == 'gcc'
add_project_arguments('-fanalyzer', language: 'c')
analyzer_args += '-fanalyzer'
endif
endif
@@ -501,6 +502,7 @@ profanity_exe = executable(
profanity_sources,
files('src/main.c'),
config_h,
c_args: analyzer_args,
dependencies: profanity_deps,
include_directories: inc,
install: true,
@@ -710,7 +712,7 @@ if get_option('tests')
build_by_default: false,
)
test('functional tests', functionaltests)
test('functional tests', functionaltests, timeout: 1800)
endif
else
warning('cmocka not found, tests will not be built')

View File

@@ -298,9 +298,9 @@ init_prof_test(void** state)
prof_start();
usleep(1000 * 500); // Wait for profanity to start
prof_expect_timeout = 30;
assert_true(prof_output_regex("Profanity"));
prof_expect_timeout = 30;
// set UI options to make expect assertions faster and more reliable
prof_input("/inpblock timeout 5");
prof_output_regex("Input blocking set to 5 milliseconds");