File: minimum-version.t

package info (click to toggle)
lintian 2.5.10.4
  • links: PTS, VCS
  • area: main
  • in suites: wheezy
  • size: 12,608 kB
  • sloc: perl: 12,430; sh: 5,787; makefile: 2,834; xml: 1,125; ansic: 347; python: 28; java: 9; tcl: 4; sed: 3
file content (32 lines) | stat: -rwxr-xr-x 737 bytes parent folder | download
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
#!/usr/bin/perl -w

use strict;
use warnings;

# Poor man's attempt to speed up this test:
# (needs to be loaded before anything else)
use threads;

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

# sarge was released with 5.8.4, etch with 5.8.8, lenny with 5.10.0
our $REQUIRED = 'v5.10.0';

our @PATHS = qw(checks collection frontend lib unpack);

# It creates as many threads as elements in @PATHS
for my $path (@PATHS) {
    threads->create(sub {
	my $p = shift;
	$p = $ENV{'LINTIAN_ROOT'} . '/' . $p;
	all_minimum_version_ok($REQUIRED, { paths => [$p] , no_plan => 1});
    }, $path);
}

for my $thr (threads->list()) {
    $thr->join();
}

done_testing();