develooper Front page | perl.cvs.parrot | Postings from December 2008

[svn:parrot] r34203 - in branches/smoke2smolder: . config/gen/makefiles docs languages languages/t lib/Parrot/Harness t tools/util

From:
jkeenan
Date:
December 21, 2008 08:05
Subject:
[svn:parrot] r34203 - in branches/smoke2smolder: . config/gen/makefiles docs languages languages/t lib/Parrot/Harness t tools/util
Message ID:
20081221160539.2E24ECBA12@x12.develooper.com
Author: jkeenan
Date: Sun Dec 21 08:05:37 2008
New Revision: 34203

Removed:
   branches/smoke2smolder/tools/util/smokeserv-client.pl
   branches/smoke2smolder/tools/util/smokeserv-server.pl
Modified:
   branches/smoke2smolder/   (props changed)
   branches/smoke2smolder/DEPRECATED.pod
   branches/smoke2smolder/MANIFEST
   branches/smoke2smolder/config/gen/makefiles/ext.in
   branches/smoke2smolder/config/gen/makefiles/languages.in
   branches/smoke2smolder/config/gen/makefiles/root.in
   branches/smoke2smolder/docs/tests.pod
   branches/smoke2smolder/languages/LANGUAGES_STATUS.pod
   branches/smoke2smolder/languages/t/harness
   branches/smoke2smolder/lib/Parrot/Harness/Smoke.pm
   branches/smoke2smolder/t/harness

Log:
Implement Coke's patch in branch.

Modified: branches/smoke2smolder/DEPRECATED.pod
==============================================================================
--- branches/smoke2smolder/DEPRECATED.pod	(original)
+++ branches/smoke2smolder/DEPRECATED.pod	Sun Dec 21 08:05:37 2008
@@ -165,17 +165,4 @@
 
 =back
 
-=head1 Misc.
-
-=over 4
-
-=item 'make smoke' [post 0.8.2]
-
-The functionality currently provided by "make smoke" will be changing to
-be an alias for "make smolder_test". We're moving towards smolder as our
-single point of online test reporting, and will keep the make target to
-simplify the switch for anyone currently smoking parrot.  See RT #49276.
-
-=back
-
 =cut

Modified: branches/smoke2smolder/MANIFEST
==============================================================================
--- branches/smoke2smolder/MANIFEST	(original)
+++ branches/smoke2smolder/MANIFEST	Sun Dec 21 08:05:37 2008
@@ -1,7 +1,7 @@
 # ex: set ro:
 # $Id$
 #
-# generated by tools/dev/mk_manifest_and_skip.pl Sun Dec 21 14:10:12 2008 UT
+# generated by tools/dev/mk_manifest_and_skip.pl Sun Dec 21 15:12:45 2008 UT
 #
 # See tools/dev/install_files.pl for documentation on the
 # format of this file.
@@ -3767,8 +3767,6 @@
 tools/util/pgegrep                                          []
 tools/util/release.json                                     []
 tools/util/smokeserv-README.pod                             []
-tools/util/smokeserv-client.pl                              []
-tools/util/smokeserv-server.pl                              []
 tools/util/templates.json                                   []
 tools/util/update_copyright.pl                              []
 xconf/samples/testfoobar                                    []

Modified: branches/smoke2smolder/config/gen/makefiles/ext.in
==============================================================================
--- branches/smoke2smolder/config/gen/makefiles/ext.in	(original)
+++ branches/smoke2smolder/config/gen/makefiles/ext.in	Sun Dec 21 08:05:37 2008
@@ -32,12 +32,6 @@
 	@echo ""
 	@echo "  help:         Print this help message."
 	@echo ""
-	@echo "  smoke:        Run the test suite and send smoke.html to "
-	@echo "                http:////smoke.parrotcode.org//"
-	@echo ""
-	@echo "  smoke-clean:  clean up smoke.html"
-	@echo ""
-	@echo ""
 	@echo "Following languages are available:"
 	@echo "  $(LANGUAGES)"
 	@echo "A particular language <lang> can be built, tested and cleand up"

Modified: branches/smoke2smolder/config/gen/makefiles/languages.in
==============================================================================
--- branches/smoke2smolder/config/gen/makefiles/languages.in	(original)
+++ branches/smoke2smolder/config/gen/makefiles/languages.in	Sun Dec 21 08:05:37 2008
@@ -50,12 +50,6 @@
 	@echo ""
 	@echo "  help:          Print this help message."
 	@echo ""
-	@echo "  smoke:         Run the unified test suite and send smoke.html to "
-	@echo "                 http:////smoke.parrotcode.org//"
-	@echo ""
-	@echo "  smoke-clean:   clean up smoke.html"
-	@echo ""
-	@echo ""
 	@echo "Following languages are available:"
 	@echo "  $(LANGUAGES)"
 	@echo ""
@@ -96,14 +90,6 @@
     WMLScript.test \
     Zcode.test
 
-
-smoke:  all
-	$(PERL) t/harness --html
-	$(PERL) ../tools/util/smokeserv-client.pl languages_smoke.html
-
-smoke-clean :
-	$(RM_F) languages_smoke.html
-
 clean: \
     abc.clean APL.clean \
     BASIC.clean befunge.clean bf.clean \
@@ -123,7 +109,6 @@
     urm.clean \
     WMLScript.clean \
     Zcode.clean \
-    smoke-clean
 
 realclean: \
     abc.realclean APL.realclean \

Modified: branches/smoke2smolder/config/gen/makefiles/root.in
==============================================================================
--- branches/smoke2smolder/config/gen/makefiles/root.in	(original)
+++ branches/smoke2smolder/config/gen/makefiles/root.in	Sun Dec 21 08:05:37 2008
@@ -690,13 +690,8 @@
 	@echo "  examples_tests:    Test the example scripts."
 	@echo ""
 	@echo "Smoke Testing:"
-	@echo "  smoke:             Run the test suite and send smoke.html to "
-	@echo "                     http:////smoke.parrotcode.org//"
-	@echo "  smokej:            Same as smoke, but with JIT runcore"
-	@echo "  smokeexec:         Same as smoke, but generate first executables"
-	@echo "                     with the exec runcore"
-	@echo "  smoke-clean:       clean up smoke.html"
 	@echo "  smolder_test:      Run the test suite and send report to the smolder server"
+	@echo "  smoke:             Alias for smolder_test"
 	@echo ""
 	@echo "Benchmarks:"
 	@echo "  mopsbench:         Million operations"
@@ -725,7 +720,6 @@
 	@echo "  languages-test:    Proxy for target 'test' of languages/Makefile"
 	@echo "  languages-test-unified:  Proxy for target 'test-unified' of languages/Makefile"
 	@echo "  languages-test-separate: Proxy for target 'test-separate' of languages/Makefile"
-	@echo "  languages-smoke:   Proxy for target 'smoke' of languages/Makefile"
 	@echo "  languages-clean:   Proxy for target 'clean' of languages/Makefile"
 	@echo ""
 	@echo "Fetch from source repository:"
@@ -1376,9 +1370,6 @@
 languages-test-separate :
 	$(MAKE) languages test-separate
 
-languages-smoke :
-	$(MAKE) languages smoke
-
 languages-clean :
 	$(MAKE) languages clean
 
@@ -1474,11 +1465,12 @@
 smolder_test : test_prep
 	$(PERL) t/harness $(EXTRA_TEST_ARGS) --archive --send-to-smolder
 
+smoke : smolder_test
+
 # "core tests" -- test basic functionality but not ancillaries
 coretest : test_prep
 	$(PERL) t/harness $(EXTRA_TEST_ARGS) --core-tests
 
-
 # automake compatibility
 check : test
 
@@ -1613,7 +1605,6 @@
     examples-clean \
     imcc-clean \
     compilers-clean \
-    smoke-clean \
 #INVERSE_CONDITIONED_LINE(win32):    cover-clean \
     editor-clean
 	@TEMP_cg_r@
@@ -2273,27 +2264,6 @@
 malloclist: $(SRC_DIR)/core_pmcs.c
 	$(PERL) $(BUILD_TOOLS_DIR)/headerizer.pl --macro=PARROT_MALLOC $(HEADERIZER_O_FILES)
 
-###############################################################################
-#
-# smoke:
-#
-###############################################################################
-
-smoke : all
-	$(PERL) t/harness --html $(EXTRA_TEST_ARGS)
-	$(PERL) tools/util/smokeserv-client.pl smoke.html
-
-smokej : all
-	$(PERL) t/harness --html $(EXTRA_TEST_ARGS) -j
-	$(PERL) tools/util/smokeserv-client.pl smoke.html
-
-smokeexec: all
-	$(PERL) t/harness --html $(EXTRA_TEST_ARGS) --run-exec $(RUNCORE_TEST_FILES)
-	$(PERL) tools/util/smokeserv-client.pl smoke.html
-
-smoke-clean :
-	$(RM_F) smoke.html
-
 #
 # Local variables:
 # mode: makefile

Modified: branches/smoke2smolder/docs/tests.pod
==============================================================================
--- branches/smoke2smolder/docs/tests.pod	(original)
+++ branches/smoke2smolder/docs/tests.pod	Sun Dec 21 08:05:37 2008
@@ -24,20 +24,14 @@
 C<make languages-test> runs the test suite for most language implementations
 in the languages directory.
 
-=head2 Submitting smoke test results
+=head2 Submitting smolder test results
 
-Parrot has a status page with smoke test results
-L<http://smoke.parrotcode.org/smoke/>. You can supply new tests
-results by just running C<make smoke>. It will run the same tests as
-C<make test> would, but will additionally create a HTML table with the test
-results. At the end, it will try to upload the test results to the
-smoke server.
+Parrot has a status page with smoke test results at
+L<http://smolder.plusthree.com/app/public_projects/details/8>.
 
-It is also possible to run a smoke test on JIT. For that, try running
-C<make smokej>.
-
-C<make languages-smoke> does smoke testing for most language implementations
-in the languages directory.
+You can supply new tests results by just running C<make smoke>. 
+It will run the same tests as C<make test> would, but will upload
+the test results to the website.
 
 =head1 Location of the test files
 

Modified: branches/smoke2smolder/languages/LANGUAGES_STATUS.pod
==============================================================================
--- branches/smoke2smolder/languages/LANGUAGES_STATUS.pod	(original)
+++ branches/smoke2smolder/languages/LANGUAGES_STATUS.pod	Sun Dec 21 08:05:37 2008
@@ -10,9 +10,6 @@
 should be tracked in the respective languages/*/MAINTAINER files, and we
 don't want to repeat ourselves.
 
-For current status of some languages see also
-L<http://smoke.parrotcode.org/smoke/>
-
 Languages that work with the unified languages test suite
 will have their test results listed under the smokes marked
 'languages'.

Modified: branches/smoke2smolder/languages/t/harness
==============================================================================
--- branches/smoke2smolder/languages/t/harness	(original)
+++ branches/smoke2smolder/languages/t/harness	Sun Dec 21 08:05:37 2008
@@ -26,14 +26,6 @@
 
     cd languages && make test
 
-=item Smoke testing
-
-    make languages-smoke
-
-or
-
-    cd languages && make smoke
-
 =item Selected languages
 
     cd languages && perl t/harness --languages=m4,punie
@@ -66,14 +58,12 @@
 
 
 # Step 0: handle command line args
-my $do_gen_html;       # smoke testing
 my $languages_list;    # select a subset of languages
-my $result = GetOptions( 'html'          => \$do_gen_html,
-                         'languages=s'   => \$languages_list );
+my $result = GetOptions( 'languages=s'   => \$languages_list );
 
 # Step 1: find harness files for testable languages
 
-# Various languages are not yet in smoke testing, some will never be.
+# Various languages are not yet in smoke testing; some will never be.
 #
 # BASIC                No t/harness, two implementations
 # ecmascript           No t/harness
@@ -124,74 +114,7 @@
 chomp(@tests);
 
 # Step 3: test.
-
-if ( ! $do_gen_html ) {
-    Test::Harness::runtests(@tests);
-}
-else {
-    my $html_fn = "languages_smoke.html";
-    my @smoke_config_vars = qw(
-      osname archname cc build_dir cpuarch revision VERSION optimize DEVEL
-    );
-
-    eval {
-        require Test::TAP::HTMLMatrix;
-        require Test::TAP::Model::Visual;
-    };
-    die "You must have Test::TAP::HTMLMatrix installed.\n\n$@"
-        if $@;
-
-    {
-        no warnings qw/redefine once/;
-        *Test::TAP::Model::run_tests = sub {
-            my $self = shift;
-
-            $self->_init;
-            $self->{meat}{start_time} = time();
-
-            my %stats;
-
-            foreach my $file (@_) {
-                my $data;
-                print STDERR "- $file\n";
-                $data = $self->run_test($file);
-                $stats{tests} += $data->{results}{max} || 0;
-                $stats{ok}    += $data->{results}{ok}  || 0;
-            }
-
-            printf STDERR "%s OK from %s tests (%.2f%% ok)\n\n",
-            $stats{ok},
-            $stats{tests},
-            $stats{ok} / $stats{tests} * 100;
-
-            $self->{meat}{end_time} = time();
-        };
-
-        my $start = time();
-        my $model = Test::TAP::Model::Visual->new_with_tests(@tests);
-        my $end   = time();
-
-        my $duration = $end - $start;
-        my $languages = join( q{ }, @unified_testable_languages );
-        my $v = Test::TAP::HTMLMatrix->new(
-            $model,
-            join("\n",
-                 "languages: $languages",
-                 "duration: $duration",
-                 "branch: unknown",
-                 "harness_args: languages",
-                 map { "$_: $PConfig{$_}" } sort @smoke_config_vars),
-        );
-
-        $v->has_inline_css(1); # no separate css file
-
-        open HTML, '>', $html_fn;
-        print HTML $v->html();
-        close HTML;
-
-        print "$html_fn has been generated.\n";
-    }
-}
+Test::Harness::runtests(@tests);
 
 # Local Variables:
 #   mode: cperl

Modified: branches/smoke2smolder/lib/Parrot/Harness/Smoke.pm
==============================================================================
--- branches/smoke2smolder/lib/Parrot/Harness/Smoke.pm	(original)
+++ branches/smoke2smolder/lib/Parrot/Harness/Smoke.pm	Sun Dec 21 08:05:37 2008
@@ -3,7 +3,7 @@
 
 =head1 NAME
 
-Parrot::Harness::Smoke - Subroutines used by harness-skripts to generate smoke reports
+Parrot::Harness::Smoke - Subroutines used by harness-scripts to generate smoke reports
 
 =head1 DESCRIPTION
 
@@ -12,12 +12,6 @@
 
 Following subroutines are supported:
 
-    generate_html_smoke_report (
-        tests       => \@tests,
-        args        => $args,
-        file        => 'smoke.html',
-    );
-
     my %env_data = collect_test_environment_data();
 
     send_archive_to_smolder( %env_data );
@@ -33,7 +27,6 @@
 use Parrot::Config qw/%PConfig/;
 use base qw( Exporter );
 our @EXPORT_OK = qw(
-    generate_html_smoke_report
     collect_test_environment_data
     send_archive_to_smolder
 );
@@ -119,73 +112,6 @@
     return $compiler;
 }
 
-sub generate_html_smoke_report {
-    my $argsref = shift;
-    my $html_fn = $argsref->{file};
-    my @smoke_config_vars = qw(
-        osname archname cc build_dir cpuarch revision VERSION optimize DEVEL
-    );
-
-    eval {
-        require Test::TAP::HTMLMatrix;
-        require Test::TAP::Model::Visual;
-    };
-    die "You must have Test::TAP::HTMLMatrix installed.\n\n$@"
-        if $@;
-
-    {
-      no warnings qw/redefine once/;
-      *Test::TAP::Model::run_tests = sub {
-        my $self = shift;
-
-        $self->_init;
-        $self->{meat}{start_time} = time();
-
-        my %stats;
-
-        foreach my $file (@_) {
-            my $data;
-            print STDERR "- $file\n";
-            $data = $self->run_test($file);
-            $stats{tests} += $data->{results}{max} || 0;
-            $stats{ok}    += $data->{results}{ok}  || 0;
-        }
-
-        printf STDERR "%s OK from %s tests (%.2f%% ok)\n\n",
-            $stats{ok},
-            $stats{tests},
-            $stats{ok} / $stats{tests} * 100;
-
-        $self->{meat}{end_time} = time();
-      };
-
-      my $start = time();
-      my $model = Test::TAP::Model::Visual->new();
-      $model->run_tests( @{ $argsref->{tests} } );
-
-      my $end = time();
-
-      my $duration = $end - $start;
-
-      my $v = Test::TAP::HTMLMatrix->new(
-        $model,
-        join("\n",
-             "duration: $duration",
-             "branch: unknown",
-             "harness_args: " . (($argsref->{args}) ? $argsref->{args} : "N/A"),
-             map { "$_: $PConfig{$_}" } sort @smoke_config_vars),
-      );
-
-      $v->has_inline_css(1); # no separate css file
-
-      open my $HTML, '>', $html_fn;
-      print {$HTML} $v->html();
-      close $HTML;
-
-      print "$html_fn has been generated.\n";
-    }
-}
-
 1;
 
 # Local Variables:

Modified: branches/smoke2smolder/t/harness
==============================================================================
--- branches/smoke2smolder/t/harness	(original)
+++ branches/smoke2smolder/t/harness	Sun Dec 21 08:05:37 2008
@@ -22,7 +22,6 @@
     Usage
 );
 use Parrot::Harness::Smoke qw(
-    generate_html_smoke_report
     send_archive_to_smolder
     collect_test_environment_data
 );
@@ -60,64 +59,57 @@
 my @tests;
 if ($longopts->{code}) {
     @tests = @developing_tests;
-} else {
+}
+else {
     @tests = map { glob($_) } (@ARGV ? @ARGV : @default_tests);
 }
 
-if ($longopts->{html}) {
-    generate_html_smoke_report(
+my $harness;
+if ($longopts->{archive}) {
+    eval { require TAP::Harness::Archive };
+    if ($@) {
+        die "\n" . ('-' x 55) . "\nCould not load TAP::Harness::Archive."
+            . "\nPlease install it if you want to create TAP archives.\n"
+            . ('-' x 55) . "\n\n$@\n";
+    }
+    # for extra_properties we need TAP::Harness::Archive >= .10
+    if ($TAP::Harness::Archive::VERSION < .10) {
+        die "\n" . ('-' x 55) . "\nWe need TAP::Harness::Archive >= .10."
+            . "\nPlease install it if you want to create TAP archives.\n"
+            . ('-' x 55) . "\n";
+    }
+
+    my %env_data = collect_test_environment_data();
+    $harness = TAP::Harness::Archive->new(
         {
-            tests => \@tests,
-            args  => $args,
-            file  => 'smoke.html',
+            verbosity        => $ENV{HARNESS_VERBOSE},
+            archive          => 'parrot_test_run.tar.gz',
+            merge            => 1,
+            extra_properties => \%env_data,
         }
     );
-} else {
-    my $harness;
-    if ($longopts->{archive}) {
-        eval { require TAP::Harness::Archive };
-        if ($@) {
-            die "\n" . ('-' x 55) . "\nCould not load TAP::Harness::Archive."
-                . "\nPlease install it if you want to create TAP archives.\n"
-                . ('-' x 55) . "\n\n$@\n";
-        }
-        # for extra_properties we need TAP::Harness::Archive >= .10
-        if ($TAP::Harness::Archive::VERSION < .10) {
-            die "\n" . ('-' x 55) . "\nWe need TAP::Harness::Archive >= .10."
-                . "\nPlease install it if you want to create TAP archives.\n"
-                . ('-' x 55) . "\n";
-        }
+    $harness->runtests(@tests);
+    send_archive_to_smolder(%env_data) if $longopts->{send_to_smolder};
 
-        my %env_data = collect_test_environment_data();
-        $harness = TAP::Harness::Archive->new(
-            {
-                verbosity        => $ENV{HARNESS_VERBOSE},
-                archive          => 'parrot_test_run.tar.gz',
-                merge            => 1,
-                extra_properties => \%env_data,
-            }
-        );
-        $harness->runtests(@tests);
-        send_archive_to_smolder(%env_data) if $longopts->{send_to_smolder};
-
-    } else {
-        eval { require TAP::Harness };
-        if ($@) {
-            Test::Harness::runtests(@tests);
-            exit;
-        } else {
-            $harness = TAP::Harness->new({
-                verbosity => $ENV{HARNESS_VERBOSE},
-                merge     => 0,
-                jobs      => $ENV{TEST_JOBS} || 1,
-                directives => 1,
-            });
-        }
-        my $results = $harness->runtests(@tests);
-
-        # a non-zero code stops make after test failures (RT #60116)
-        exit ( $results->all_passed() ? 0 : 1 );
+}
+else {
+    eval { require TAP::Harness };
+    if ($@) {
+        Test::Harness::runtests(@tests);
+        exit;
+    }
+    else {
+        $harness = TAP::Harness->new({
+            verbosity => $ENV{HARNESS_VERBOSE},
+            merge     => 0,
+            jobs      => $ENV{TEST_JOBS} || 1,
+            directives => 1,
+        });
     }
+    my $results = $harness->runtests(@tests);
+
+    # a non-zero code stops make after test failures (RT #60116)
+    exit ( $results->all_passed() ? 0 : 1 );
 }
 
 =head1 NAME
@@ -194,10 +186,6 @@
 
 Invoke parrot with '--gc-debug'.
 
-=item C<--html>
-
-Emit a C<smoke.html> file instead of displaying results.
-
 =item C<--code-tests>
 
 Run only the file metadata and basic coding standards tests.



nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About