~ubuntu-branches/ubuntu/quantal/enigmail/quantal-security

« back to all changes in this revision

Viewing changes to build/unix/test/runtest

  • Committer: Package Import Robot
  • Author(s): Chris Coulson
  • Date: 2013-09-13 16:02:15 UTC
  • mfrom: (0.12.16)
  • Revision ID: package-import@ubuntu.com-20130913160215-u3g8nmwa0pdwagwc
Tags: 2:1.5.2-0ubuntu0.12.10.1
* New upstream release v1.5.2 for Thunderbird 24

* Build enigmail using a stripped down Thunderbird 17 build system, as it's
  now quite difficult to build the way we were doing previously, with the
  latest Firefox build system
* Add debian/patches/no_libxpcom.patch - Don't link against libxpcom, as it
  doesn't exist anymore (but exists in the build system)
* Add debian/patches/use_sdk.patch - Use the SDK version of xpt.py and
  friends
* Drop debian/patches/ipc-pipe_rename.diff (not needed anymore)
* Drop debian/patches/makefile_depth.diff (not needed anymore)

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
#!/usr/bin/env perl
2
 
###########################################################################
3
 
## Intent:
4
 
##   Test::Harness is a testing wrapper that will process output
5
 
##   from Test.pm module tests.  Sumarize results, report stats
6
 
##   and exit with overall status for the testing suites.
7
 
##
8
 
## Run testing suite:
9
 
##   % make clean test
10
 
##   % perl runtest
11
 
##
12
 
## Run Individual tests
13
 
##   % perl tUtils0
14
 
###########################################################################
15
 
 
16
 
##----------------------------##
17
 
##---] CORE/CPAN INCLUDES [---##
18
 
##----------------------------##
19
 
use strict;
20
 
use warnings;
21
 
use Getopt::Long;
22
 
 
23
 
use Test::Harness;
24
 
 
25
 
##-------------------##
26
 
##---]  EXPORTS  [---##
27
 
##-------------------##
28
 
our $VERSION = qw(1.0);
29
 
use FindBin;
30
 
 
31
 
##-------------------##
32
 
##---]  GLOBALS  [---##
33
 
##-------------------##
34
 
my %argv;
35
 
 
36
 
##----------------##
37
 
##---]  MAIN  [---##
38
 
##----------------##
39
 
unless(GetOptions(\%argv,
40
 
                  qw(debug|d)
41
 
                 ))
42
 
{
43
 
    print "Usage: $0\n";
44
 
    print "  --debug  Enable debug mode\n";
45
 
    exit 1;
46
 
}
47
 
 
48
 
if (2 > $Test::Harness::VERSION)
49
 
{
50
 
    print "Unit tests will not be run, Test::Harness is too old\n"
51
 
        if ($argv{debug});
52
 
    exit 0;
53
 
}
54
 
 
55
 
 
56
 
my @tests;
57
 
 
58
 
########################################
59
 
## Gather a list of tests if none passed
60
 
########################################
61
 
unless (@tests = @ARGV)
62
 
{
63
 
  local *D;
64
 
    opendir(D, '.');
65
 
    while($_ = readdir(D)) {
66
 
        next unless /.t\S+$/;
67
 
        next if (/\.ts$/);
68
 
        push(@tests, $_);
69
 
    }
70
 
    closedir(D);
71
 
}
72
 
 
73
 
###############################################
74
 
## Glob a list of tests when directories passed
75
 
###############################################
76
 
my @tmp;
77
 
foreach (@tests)
78
 
{
79
 
  local *D;
80
 
    if (-d $_ && (my $dir = $_))
81
 
    {
82
 
        opendir(D, $_) || die "opendir(D) failed: $!";
83
 
        my @tests = grep(/\.t[^\.\s]+/o, readdir(D));
84
 
        closedir(D);
85
 
        push(@tmp, map{ join('/', $dir, $_); } @tests);
86
 
    } else {
87
 
        push(@tmp, $_);
88
 
    }
89
 
}
90
 
@tests = @tmp;
91
 
 
92
 
print "$0: @ARGV\n" if ($argv{debug});
93
 
runtests(@tests);
94
 
 
95
 
# EOF