Author: bernhard
Date: Wed May  4 13:17:00 2005
New Revision: 7980

Modified:
   trunk/languages/m4/t/harness
   trunk/languages/parrot_compiler/t/harness
   trunk/languages/scheme/t/harness
   trunk/languages/testall
Log:
Added 'parrot_compiler' to unified languages testing.
Change 'perl <lang>t/harness -files' to 'perl <lang>/t/harness --files'


Modified: trunk/languages/m4/t/harness
==============================================================================
--- trunk/languages/m4/t/harness        (original)
+++ trunk/languages/m4/t/harness        Wed May  4 13:17:00 2005
@@ -6,7 +6,7 @@
 
 =head1 SYNOPSIS
 
-  cd languages && perl -I../lib m4/t/harness -files
+  cd languages && perl -I../lib m4/t/harness --files
 
   cd languages && perl -I../lib m4/t/harness 
 
@@ -17,7 +17,7 @@
 =head1 DESCRIPTION
 
 If I'm called with a single
-argument of "-files", I just return a list of files to process.
+argument of "--files", I just return a list of files to process.
 This list is one per line, and is relative to the languages dir.
 
 If I'm called with no args, I run the complete suite.
@@ -26,7 +26,6 @@
 
 =cut
 
-# pragmata
 use strict;
 use lib '..';
 
@@ -37,8 +36,8 @@
 
 my $language = 'm4';
 
-if ( grep { m/^-files$/ } @ARGV ) {
-    # Only the Makefile in 'parrot/languages' uses -file
+if ( grep { m/^--files$/ } @ARGV ) {
+    # Only the Makefile in 'parrot/languages' uses --files
     my $dir = File::Spec->catfile( $language, 't' );
     my @files = glob( File::Spec->catfile( $dir, '*/*.t' ) );
     print join( "\n", @files );
@@ -78,7 +77,7 @@
 
 =head1 SEE ALSO
 
-  L<languages/tcl/t/harness>, L<languages/python/t/harness>
+  F<languages/tcl/t/harness>, F<languages/scheme/t/harness>, 
F<languages/m4/t/harness>, F<languages/python/t/harness>
 
 =head1 AUTHOR
 

Modified: trunk/languages/parrot_compiler/t/harness
==============================================================================
--- trunk/languages/parrot_compiler/t/harness   (original)
+++ trunk/languages/parrot_compiler/t/harness   Wed May  4 13:17:00 2005
@@ -2,11 +2,11 @@
 
 =head1 NAME
 
-languages/parrot_compiler/t/harness - A harness for ParrotCompiler
+languages/parrot_compiler/t/harness - A harness for parrot_compiler
 
 =head1 SYNOPSIS
 
-  cd languages && perl -I../lib parrot_compiler/t/harness -files
+  cd languages && perl -I../lib parrot_compiler/t/harness ---files
 
   cd languages && perl -I../lib parrot_compiler/t/harness 
 
@@ -15,17 +15,16 @@
 
 =head1 DESCRIPTION
 
-Conformant to a recent post on p6i, if I'm called with a single
-argument of "-files", I just return a list of files to process.
+If I'm called with a single
+argument of "--files", I just return a list of files to process.
 This list is one per line, and is relative to the languages dir.
 
-If I'm called with no args, I run all tests.
+If I'm called with no args, I run the complete suite.
 
-Otherwise I try to run the list of passed tests.
+Otherwise I run the tests that were passed on the command line.
 
 =cut
 
-# pragmata
 use strict;
 
 use Cwd();
@@ -35,33 +34,27 @@
 
 my $language = 'parrot_compiler';
 
-if ( grep { m/^-files$/ } @ARGV ) 
-{
-  # Only the Makefile in 'parrot/languages' uses -file
-  my $dir = File::Spec->catfile( $language, 't' );
-  my @files = glob( File::Spec->catfile( $dir, '*/*.t' ) );
-  print join( "\n", @files );
-  print "\n" if scalar(@files);
-}
-else 
-{ 
-  my @files;
-  if ( scalar(@ARGV) ) 
-  {
-    # Someone specified tests for me to run.
-    @files = grep { -f $_ } @ARGV
+if ( grep { m/^--files$/ } @ARGV ) {
+    # Only the Makefile in 'parrot/languages' uses --files
+    my $dir = File::Spec->catfile( $language, 't' );
+    my @files = glob( File::Spec->catfile( $dir, '*/*.t' ) );
+    print join( "\n", @files );
+    print "\n" if scalar(@files);
+} else { 
+    my @files;
+    if ( scalar(@ARGV) ) {
+        # Someone specified tests for me to run.
+        @files = grep { -f $_ } @ARGV
   }
   else 
   {
-    ( undef, undef, my $current_dir ) = File::Spec->splitpath( Cwd::getcwd() );
-    if ( $current_dir eq 'languages' )
-    {
-      @files = glob( File::Spec->catfile( $language, 't', '*', '*.t' ) );
-    }
-    elsif ( $current_dir eq $language )
-    {
-      @files = glob( File::Spec->catfile( 't', '*', '*.t' ) );
-    }
+      ( undef, undef, my $current_dir ) = File::Spec->splitpath( Cwd::getcwd() 
);
+      if ( $current_dir eq 'languages' ) {
+          @files = glob( File::Spec->catfile( $language, 't', '*', '*.t' ) );
+      }
+      elsif ( $current_dir eq $language ) {
+          @files = glob( File::Spec->catfile( 't', '*', '*.t' ) );
+      }
   }
   Test::Harness::runtests( @files ) if scalar( @files );
 }
@@ -72,10 +65,10 @@
 
 =head1 SEE ALSO
 
-  L<languages/tcl/t/harness>, L<languages/python/t/harness>
+  F<languages/tcl/t/harness>, F<languages/scheme/t/harness>, 
F<languages/m4/t/harness>, F<languages/python/t/harness>
 
 =head1 AUTHOR
 
-  [EMAIL PROTECTED]
+Bernhard Schmalhofer - <[EMAIL PROTECTED]>
 
 =cut

Modified: trunk/languages/scheme/t/harness
==============================================================================
--- trunk/languages/scheme/t/harness    (original)
+++ trunk/languages/scheme/t/harness    Wed May  4 13:17:00 2005
@@ -1,13 +1,12 @@
-#! perl -w
 # $Id$
 
 =head1 NAME
 
-scheme/t/harness - a harness for scheme
+languages/scheme/t/harness - A harness for scheme
 
 =head1 SYNOPSIS
 
-  cd languages && perl -I../lib scheme/t/harness -files
+  cd languages && perl -I../lib scheme/t/harness --files
 
   cd languages && perl -I../lib scheme/t/harness 
 
@@ -18,7 +17,7 @@
 =head1 DESCRIPTION
 
 If I'm called with a single
-argument of "-files", I just return a list of files to process.
+argument of "--files", I just return a list of files to process.
 This list is one per line, and is relative to the languages dir.
 
 If I'm called with no args, I run the complete suite.
@@ -36,8 +35,8 @@
 
 my $language = 'scheme';
 
-if ( grep { m/^-files$/ } @ARGV ) {
-    # Only the Makefile in 'parrot/languages' uses -file
+if ( grep { m/^--files$/ } @ARGV ) {
+    # Only the Makefile in 'parrot/languages' uses --files
     my $dir = File::Spec->catfile( $language, 't' );
     my @files = glob( File::Spec->catfile( $dir, '*/*.t' ) );
     print join( "\n", @files );
@@ -61,6 +60,6 @@
 
 =head1 SEE ALSO
 
-  L<languages/m4/t/harness>
+  F<languages/tcl/t/harness>, F<languages/scheme/t/harness>, 
F<languages/m4/t/harness>, F<languages/python/t/harness>
 
 =cut

Modified: trunk/languages/testall
==============================================================================
--- trunk/languages/testall     (original)
+++ trunk/languages/testall     Wed May  4 13:17:00 2005
@@ -59,9 +59,7 @@
 # miniperl             No t/harness
 # ook                  No t/harness
 # parakeet             No t/harness
-# parrot_compiler
-#my @unified_testable_languages = qw( parrot_compiler );
-# perl6                t/harness has no -files
+# perl6                t/harness has no --files
 # python
 #my @unified_testable_languages = qw( python );
 # regex               No t/harness
@@ -70,7 +68,7 @@
 #my @unified_testable_languages = qw( tcl );
 # urm                 No t/harness
 
-my @unified_testable_languages = qw( m4 scheme );
+my @unified_testable_languages = qw( m4 parrot_compiler scheme );
 my @harnesses =
     grep {-f $_}
         map { File::Spec->join($_,"t","harness") }
@@ -81,7 +79,7 @@
 my @testfiles;
 foreach my $harness (@harnesses) {
     my $perl = "$^X -I" . File::Spec->join(File::Spec->updir,"lib");
-    open(FILES, "$perl $harness -files |");  
+    open(FILES, "$perl $harness --files |");  
     push @testfiles, <FILES>;
     close(FILES);
 }

Reply via email to