build: Pass cargo_options to cargo test

This is needed when running the tests out-of-tree.
This commit is contained in:
Balló György 2024-10-14 23:05:57 +00:00
parent 72c1f5d23f
commit 80348eab3a

View file

@ -60,7 +60,7 @@ cargo_home = cargo_target_dir / 'cargo-home'
test ( test (
'Cargo tests', 'Cargo tests',
cargo, cargo,
args: ['test', '--bin', meson.project_name()], args: ['test', '--bin', meson.project_name(), cargo_options],
timeout: 600, # cargo might take a bit of time sometimes timeout: 600, # cargo might take a bit of time sometimes
env: ['CARGO_TARGET_DIR=@0@'.format(cargo_target_dir), 'CARGO_HOME=@0@'.format(cargo_home)] env: ['CARGO_TARGET_DIR=@0@'.format(cargo_target_dir), 'CARGO_HOME=@0@'.format(cargo_home)]
) )