Skip to content


Subversion checkout URL

You can clone with
Download ZIP
Fetching contributors…
Cannot retrieve contributors at this time
160 lines (102 sloc) 2.77 KB
# Copyright (C) 2001-2007, The Perl Foundation.
# $Id$
use strict;
use warnings;
use Getopt::Std;
use Test::Harness();
use lib qw( lib );
use Parrot::Harness::DefaultTests;
use Parrot::Harness::Options qw(
use Parrot::Harness::Smoke qw(
local @ARGV = @ARGV;
my $longopts;
($longopts, @ARGV) = handle_long_options(@ARGV);
$ENV{RUNNING_MAKE_TEST} = $longopts->{running_make_test};
# Suck the short options into the TEST_PROG_ARGS
# environmental variable.
my %opts;
getopts('wgjPCSefbvdr?hO:D:', \%opts);
if ($opts{'?'} || $opts{h} || $longopts->{help}) {
# add -D40; merge it with any existing -D argument
$opts{D} = sprintf( '%x', hex(40) | (exists $opts{D} ? hex($opts{D}) : 0));
my $args = get_test_prog_args(
\%opts, $longopts->{gc_debug}, $longopts->{run_exec});
# now build the list of tests to run, either from the command
# line or from @default tests
my @default_tests = get_default_tests(
my @tests = map { glob( $_ ) } (@ARGV ? @ARGV : @default_tests);
if (!$longopts->{html}) {
} else {
generate_html_smoke_report ( {
tests => \@tests,
args => $args,
file => 'smoke.html',
} );
=head1 NAME
t/harness - Parrot Test Harness
% perl t/harness [options] [testfiles]
The short command line options are:
=over 4
=item C<-w>
Turn warnings on.
=item C<-g>
Run the C<CGoto> core.
=item C<-j>
Run with JIT enabled.
=item C<-C>
Run the C<CGP> core.
=item C<-S>
Run Switched.
=item C<-b>
Run bounds checking enabled.
=item C<-d>
Run with debugging enabled.
=item C<-f>
Run fast core.
=item C<-r>
compile to Parrot bytecode and then run the bytecode.
=item C<-O[012]>
Run optimized to the specified level.
=item C<-D[number]>
Pass the specified debug bits to the parrot interpreter. Note that
C<-D40> (fill I, N registers with garbage) is always enabled.
See 'parrot --help-debug' for available flags.
There are also long command line options:
=over 4
=item C<--running-make-test>
Some test scripts run more quickly when this is set.
=item C<--gc-debug>
Invoke parrot with '--gc-debug'.
=item C<--html>
Emit a C<smoke.html> file instead of displaying results.
=head1 HISTORY
Mike Lambert stole F<t/harness> for F<languages/perl6/t/harness>.
Leo Toetsch stole F<languages/perl6/t/harness> for F<imcc/t/harness>.
Bernhard Schmalhofer merged F<imcc/t/harness> back into F<t/harness>.
# Local Variables:
# mode: cperl
# cperl-indent-level: 4
# fill-column: 100
# End:
# vim: expandtab shiftwidth=4:
Jump to Line
Something went wrong with that request. Please try again.