File: runner.pl

package info (click to toggle)
lintian 2.128.1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 70,396 kB
  • sloc: perl: 46,006; javascript: 9,151; makefile: 4,054; sh: 3,044; ansic: 705; xml: 451; python: 91; java: 15; cpp: 9; tcl: 4; lisp: 3
file content (47 lines) | stat: -rwxr-xr-x 1,049 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
#!/usr/bin/perl

use strict;
use warnings;

use Const::Fast;
use Test::More;

use Test::Lintian;

const my $DOT => q{.};

if ($ENV{'LINTIAN_COVERAGE'}) {
    plan 'skip_all' => 'Not needed for coverage of Lintian';
}

eval 'use Test::Strict';
plan skip_all => 'Test::Strict required to run this test' if $@;

{
    no warnings 'once';
    $Test::Strict::TEST_WARNINGS = 1;
}

$ENV{'LINTIAN_BASE'} //= $DOT;
# Files in commands check for the presence of LINTIAN_INCLUDE_DIRS in
# BEGIN, so make sure it is present for them.
$ENV{'LINTIAN_INCLUDE_DIRS'} = $ENV{'LINTIAN_BASE'};

if ($0 =~ m{^(?:.*/)?reporting\.t$}) {
    # html_reports loads ./config, so we have do chdir before checking it.
    my $folder = "$ENV{LINTIAN_BASE}/reporting";
    chdir($folder)
      or die "Cannot change directory $folder";

    all_perl_files_ok($DOT);

} else {
    my @test_paths = program_name_to_perl_paths($0);
    all_perl_files_ok(@test_paths);
}

# Local Variables:
# indent-tabs-mode: nil
# cperl-indent-level: 4
# End:
# vim: syntax=perl sw=4 sts=4 sr et