summaryrefslogtreecommitdiffstats
path: root/contrib/perl5/t/harness
blob: f6d94de90f2e59897602a40bec5b5c5a1187e35f (plain)
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
#!./perl

# We suppose that perl _mostly_ works at this moment, so may use
# sophisticated testing.

BEGIN {
    chdir 't' if -d 't';
    @INC = '../lib';
    $ENV{PERL5LIB} = '../lib';	# so children will see it too
}
use lib '../lib';

use Test::Harness;

$Test::Harness::switches = "";	# Too much noise otherwise
$Test::Harness::verbose = shift if @ARGV && $ARGV[0] eq '-v';

@tests = @ARGV;
@tests = <base/*.t comp/*.t cmd/*.t io/*.t op/*.t pragma/*.t lib/*.t> unless @tests;

Test::Harness::runtests @tests;

%infinite = ('comp/require.t', 1, 'op/bop.t', 1, 'lib/hostname.t', 1 );

@tests = grep (!$infinite{$_}, @tests);

if (-e "../testcompile") 
{ 
	print "The tests ", join(' ', keys(%infinite)), 
							" generate infinite loops! Skipping!\n";

	$ENV{'COMPILE_TEST'} = 1; Test::Harness::runtests @tests; 
}
OpenPOWER on IntegriCloud