From b79ede5f73c0f2e86060a2945506158a8eb47fc2 Mon Sep 17 00:00:00 2001 From: Bilal Elmoussaoui Date: Fri, 22 Jan 2021 21:53:31 +0100 Subject: [PATCH] meson: add cargo tests this will make our tests run on the CI for free without extra setup --- meson.build | 2 +- src/meson.build | 8 ++++++-- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/meson.build b/meson.build index e8731ba..5db969e 100644 --- a/meson.build +++ b/meson.build @@ -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) diff --git a/src/meson.build b/src/meson.build index 96283b5..03f3d34 100644 --- a/src/meson.build +++ b/src/meson.build @@ -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'] +)