summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-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