mirror of
https://git.jabber.space/devs/cproof.git
synced 2026-07-31 23:06:21 +00:00
tests: Don't build functional test with analyzer and increase timeouts
This commit is contained in:
@@ -59,6 +59,7 @@ add_project_arguments([
|
|||||||
'-Wno-unused-parameter',
|
'-Wno-unused-parameter',
|
||||||
], language: 'c')
|
], language: 'c')
|
||||||
|
|
||||||
|
analyzer_args = []
|
||||||
if is_debug
|
if is_debug
|
||||||
add_project_arguments([
|
add_project_arguments([
|
||||||
'-ggdb3',
|
'-ggdb3',
|
||||||
@@ -71,7 +72,7 @@ if is_debug
|
|||||||
'-Wpointer-arith'
|
'-Wpointer-arith'
|
||||||
], language: 'c')
|
], language: 'c')
|
||||||
if cc.get_id() == 'gcc'
|
if cc.get_id() == 'gcc'
|
||||||
add_project_arguments('-fanalyzer', language: 'c')
|
analyzer_args += '-fanalyzer'
|
||||||
endif
|
endif
|
||||||
endif
|
endif
|
||||||
|
|
||||||
@@ -501,6 +502,7 @@ profanity_exe = executable(
|
|||||||
profanity_sources,
|
profanity_sources,
|
||||||
files('src/main.c'),
|
files('src/main.c'),
|
||||||
config_h,
|
config_h,
|
||||||
|
c_args: analyzer_args,
|
||||||
dependencies: profanity_deps,
|
dependencies: profanity_deps,
|
||||||
include_directories: inc,
|
include_directories: inc,
|
||||||
install: true,
|
install: true,
|
||||||
@@ -710,7 +712,7 @@ if get_option('tests')
|
|||||||
build_by_default: false,
|
build_by_default: false,
|
||||||
)
|
)
|
||||||
|
|
||||||
test('functional tests', functionaltests)
|
test('functional tests', functionaltests, timeout: 1800)
|
||||||
endif
|
endif
|
||||||
else
|
else
|
||||||
warning('cmocka not found, tests will not be built')
|
warning('cmocka not found, tests will not be built')
|
||||||
|
|||||||
@@ -298,9 +298,9 @@ init_prof_test(void** state)
|
|||||||
|
|
||||||
prof_start();
|
prof_start();
|
||||||
usleep(1000 * 500); // Wait for profanity to start
|
usleep(1000 * 500); // Wait for profanity to start
|
||||||
|
prof_expect_timeout = 30;
|
||||||
assert_true(prof_output_regex("Profanity"));
|
assert_true(prof_output_regex("Profanity"));
|
||||||
|
|
||||||
prof_expect_timeout = 30;
|
|
||||||
// set UI options to make expect assertions faster and more reliable
|
// set UI options to make expect assertions faster and more reliable
|
||||||
prof_input("/inpblock timeout 5");
|
prof_input("/inpblock timeout 5");
|
||||||
prof_output_regex("Input blocking set to 5 milliseconds");
|
prof_output_regex("Input blocking set to 5 milliseconds");
|
||||||
|
|||||||
Reference in New Issue
Block a user