2 # Copyright (C) 2001-2008, The Perl Foundation.
11 use Parrot::Harness::DefaultTests;
12 use Parrot::Harness::Options qw(
17 use Parrot::Harness::Smoke qw(
18 generate_html_smoke_report
22 (my $longopts, @ARGV) = handle_long_options(@ARGV);
24 $ENV{RUNNING_MAKE_TEST} = $longopts->{running_make_test};
26 # Suck the short options into the TEST_PROG_ARGS
27 # environmental variable.
29 getopts('wgjPCSefbvdr?hO:D:', \%opts);
31 if ($opts{'?'} || $opts{h} || $longopts->{help}) {
36 # add -D40; merge it with any existing -D argument
37 $opts{D} = sprintf( '%x', hex(40) | (exists $opts{D} ? hex($opts{D}) : 0));
39 my $args = get_test_prog_args(
40 \%opts, $longopts->{gc_debug}, $longopts->{run_exec}
42 $ENV{TEST_PROG_ARGS} = $args;
44 # now build the list of tests to run, either from the command
45 # line or from @default tests
46 my @default_tests = get_default_tests(
47 $longopts->{core_tests_only},
48 $longopts->{runcore_tests_only}
51 my @tests = map { glob( $_ ) } (@ARGV ? @ARGV : @default_tests);
53 if ( ! $longopts->{html} ) {
54 Test::Harness::runtests(@tests);
57 generate_html_smoke_report ( {
66 t/harness - Parrot Test Harness
70 % perl t/harness [options] [testfiles]
74 The short command line options are:
84 Run the C<CGoto> core.
100 Run bounds checking enabled.
104 Run with debugging enabled.
112 compile to Parrot bytecode and then run the bytecode.
116 Run optimized to the specified level.
120 Pass the specified debug bits to the parrot interpreter. Note that
121 C<-D40> (fill I, N registers with garbage) is always enabled.
122 See 'parrot --help-debug' for available flags.
126 There are also long command line options:
130 =item C<--running-make-test>
132 Some test scripts run more quickly when this is set.
136 Invoke parrot with '--gc-debug'.
140 Emit a C<smoke.html> file instead of displaying results.
146 Mike Lambert stole F<t/harness> for F<languages/perl6/t/harness>.
148 Leo Toetsch stole F<languages/perl6/t/harness> for F<imcc/t/harness>.
150 Bernhard Schmalhofer merged F<imcc/t/harness> back into F<t/harness>.
157 # cperl-indent-level: 4
160 # vim: expandtab shiftwidth=4: