Dpkg::Source::Package::V2: Mark single-debian-patch as not needing forwarding
[dpkg.git] / build-aux / test-runner
blob73c33fbbbddd0c38abd1e7505d65f2e0ffa4e271
1 #!/usr/bin/perl
3 use strict;
4 use warnings;
6 use TAP::Harness;
8 my $srcroot = $ENV{abs_top_srcdir};
9 my $binroot = $ENV{abs_top_builddir};
11 # Setup the environment
12 $ENV{LC_ALL} = 'C';
13 $ENV{DPKG_COLORS} = 'never';
14 $ENV{PATH} = "$binroot/src:$binroot/scripts:$binroot/utils:$ENV{PATH}";
16 my $harness = TAP::Harness->new({
17 exec => sub {
18 my (undef, $test) = @_;
19 return [ $test ] if $test !~ m/\.t$/ and -x $test;
20 return
22 lib => [
23 "$srcroot/scripts",
24 "$srcroot/dselect/methods"
26 color => 1,
27 verbosity => $ENV{TEST_VERBOSE},
28 jobs => $ENV{TEST_PARALLEL},
29 failures => 1,
30 });
32 my $aggregate = $harness->runtests(@ARGV);
33 die "FAIL: test suite has errors\n" if $aggregate->has_errors;