summaryrefslogtreecommitdiff
path: root/lib/Debian
diff options
context:
space:
mode:
authorNiels Thykier <niels@thykier.net>2018-11-04 08:25:36 +0000
committerNiels Thykier <niels@thykier.net>2018-11-04 08:25:36 +0000
commit05d5284eec0a1f04732159e9fc6e83ecb0e0f505 (patch)
tree0857d63390848d624562865e4def16b0823f126c /lib/Debian
parent3f7a4ead0463f3c250a329021d49f8815baf3121 (diff)
downloaddebhelper-05d5284eec0a1f04732159e9fc6e83ecb0e0f505.tar.gz
meson: Run tests with meson [c13]
Signed-off-by: Niels Thykier <niels@thykier.net>
Diffstat (limited to 'lib/Debian')
-rw-r--r--lib/Debian/Debhelper/Buildsystem/meson.pm24
1 files changed, 24 insertions, 0 deletions
diff --git a/lib/Debian/Debhelper/Buildsystem/meson.pm b/lib/Debian/Debhelper/Buildsystem/meson.pm
index a90fb703..316fe34b 100644
--- a/lib/Debian/Debhelper/Buildsystem/meson.pm
+++ b/lib/Debian/Debhelper/Buildsystem/meson.pm
@@ -104,4 +104,28 @@ sub configure {
}
}
+sub test {
+ my $this = shift;
+ my $target = $this->get_targetbuildsystem;
+
+ if (compat(12) or $target->name ne 'ninja') {
+ $target->test(@_);
+ } else {
+ # In compat 13 with meson+ninja, we prefer using "meson test"
+ # over "ninja test"
+ my %options = (
+ update_env => {
+ 'LC_ALL' => 'C.UTF-8',
+ }
+ );
+ if ($this->get_parallel() > 0) {
+ $options{update_env}{MESON_TESTTHREADS} = $this->get_parallel();
+ }
+ $this->doit_in_builddir(\%options, $this->{buildcmd}, "test", @_);
+ }
+ return 1;
+}
+
+
+
1