From 2c40a5bc9ffe585e84516f252adba4a5565e0175 Mon Sep 17 00:00:00 2001 From: Moritz Lenz Date: Tue, 15 Sep 2009 21:26:32 +0200 Subject: [PATCH] support smolder reports in harness and Makefile. Patch courtesy by jdv79++ --- build/Makefile.in | 6 ++++++ t/harness | 16 ++++++++++++++-- 2 files changed, 20 insertions(+), 2 deletions(-) diff --git a/build/Makefile.in b/build/Makefile.in index a29186e0d67..c01bb00616e 100644 --- a/build/Makefile.in +++ b/build/Makefile.in @@ -298,6 +298,12 @@ t/spec : spectest_update : -cd t/spec && svn up +rakudo_test_run.tar.gz: testable t/spectest.data + - $(HARNESS_WITH_FUDGE_JOBS) --tests-from-file=t/spectest.data --archive rakudo_test_run.tar.gz --parrot_revision @revision@ + +spectest_smolder: rakudo_test_run.tar.gz + curl -F architecture=@cpuarch@ -F platform=@osname@ -F revision=`git log -1 --pretty=format:%H` -F report_file=@rakudo_test_run.tar.gz http://smolder.plusthree.com/app/public_projects/process_add_report/18 + testable : perl6$(EXE) Test.pir spectest_checkout spectest_update t/localtest.data: diff --git a/t/harness b/t/harness index 04f83ad753b..7b4d8eb5a62 100644 --- a/t/harness +++ b/t/harness @@ -23,6 +23,8 @@ GetOptions( 'verbosity=i' => \$Test::Harness::verbose, 'jobs:3' => \my $jobs, 'icu:1' => \my $do_icu, + 'archive=s' => \my $archive, + 'parrot_revision=s' => \my $parrot_revision, ); my @pass_through_options = grep m/^--?[^-]/, @ARGV; @@ -54,14 +56,24 @@ if ($do_fudge) { @tfiles = fudge(@tfiles); } -if (eval { require TAP::Harness; 1 }) { +my $tap_harness_class = 'TAP::Harness'; +$tap_harness_class .= '::Archive' if $archive; + +my $extra_properties; +$extra_properties->{'Parrot Revision'} = $parrot_revision + if $parrot_revision; + +if (eval "require $tap_harness_class;") { my %harness_options = ( exec => ['./perl6'], verbosity => 0+$Test::Harness::verbose, jobs => $ENV{TEST_JOBS} || $jobs || 1, ignore_exit => 1, + merge => 1, + $archive ? ( archive => $archive ) : (), + $extra_properties ? ( extra_properties => $extra_properties ) : (), ); - TAP::Harness->new( \%harness_options )->runtests(@tfiles); + $tap_harness_class->new( \%harness_options )->runtests(@tfiles); } else { runtests(@tfiles);