meson: add cargo tests

this will make our tests run on the CI for free without extra setup
This commit is contained in:
Bilal Elmoussaoui 2021-01-22 21:53:31 +01:00
parent 5181f5c2d1
commit b79ede5f73
2 changed files with 7 additions and 3 deletions

View File

@ -10,7 +10,7 @@ dependency('gdk-pixbuf-2.0')
dependency('gtk4', version: '>= 4.0.0')
dependency('libadwaita-1', version: '>=1.0.0')
cargo = find_program('cargo', required: false)
cargo = find_program('cargo', required: true)
glib_compile_schemas = find_program('glib-compile-schemas', required: true)
glib_compile_resources = find_program('glib-compile-resources', required: true)

View File

@ -36,8 +36,6 @@ run_command(
check: true
)
sources = files(
'backup/andotp.rs',
'backup/bitwarden.rs',
@ -103,3 +101,9 @@ cargo_release = custom_target(
meson.project_name(),
]
)
test (
'Cargo tests',
cargo,
args: ['test']
)