tests: Allow legacy mode to have much longer tests.

This commit is contained in:
Dorota Czaplejewicz
2020-11-29 10:44:02 +00:00
parent 39a3c40d67
commit 1fe6d65525

View File

@ -76,12 +76,22 @@ foreach layout : [
extra += ['allow_missing_return'] extra += ['allow_missing_return']
endif endif
# Older Cargo seens to be sensitive to something
# about the RUST_FLAGS env var, and rebuilds all tests when it's set,
# increasing test time by 2 orders of magnitude.
# Let it have its way.
if get_option('legacy') == true
timeout = 300
else
timeout = 30
endif
test( test(
'test_layout_' + layout, 'test_layout_' + layout,
cargo_script, cargo_script,
args: ['run'] + cargo_build_flags args: ['run'] + cargo_build_flags
+ ['--example', 'test_layout', '--', layout] + ['--example', 'test_layout', '--', layout]
+ extra, + extra,
timeout: timeout,
workdir: meson.build_root(), workdir: meson.build_root(),
) )
endforeach endforeach