Author: bernhard
Date: Wed May 4 12:45:04 2005
New Revision: 7978
Modified:
trunk/config/gen/makefiles/m4.in
trunk/languages/scheme/t/arith/basic.t
trunk/languages/scheme/t/arith/logic.t
trunk/languages/scheme/t/arith/nested.t
trunk/languages/scheme/t/io/basic.t
trunk/languages/scheme/t/logic/basic.t
trunk/languages/scheme/t/logic/defines.t
trunk/languages/scheme/t/logic/lists.t
trunk/languages/testall
Log:
Try to make 'make languages; make languages-test' more sane,
by testing only 'm4' and 'scheme'. 'Tcl' and 'parrot_compiler' should
follow soon.
Beware that not all tests in m4 and scheme are necessarily succeeding.
Tests 9-10 of scheme/t/logic/defines.t are failing consistently
on my Kubuntu 5.04 laptop.
The Perl5 Module FindBin is used for setting up @INC. This might be
problematic on exotic Perls or platforms.
Modified: trunk/config/gen/makefiles/m4.in
==============================================================================
--- trunk/config/gen/makefiles/m4.in (original)
+++ trunk/config/gen/makefiles/m4.in Wed May 4 12:45:04 2005
@@ -2,7 +2,7 @@
# Setup of some commands
LN_SF = ln -s -f
-PARROT = ..${slash}..${slash}parrot${exe}
+PARROT = ../../parrot${exe}
PERL = ${perl}
RM_RF = ${rm_rf}
Modified: trunk/languages/scheme/t/arith/basic.t
==============================================================================
--- trunk/languages/scheme/t/arith/basic.t (original)
+++ trunk/languages/scheme/t/arith/basic.t Wed May 4 12:45:04 2005
@@ -1,4 +1,8 @@
#! perl -w
+# $Id$
+
+use FindBin;
+use lib "$FindBin::Bin/../..";
use Scheme::Test tests => 22;
Modified: trunk/languages/scheme/t/arith/logic.t
==============================================================================
--- trunk/languages/scheme/t/arith/logic.t (original)
+++ trunk/languages/scheme/t/arith/logic.t Wed May 4 12:45:04 2005
@@ -1,4 +1,8 @@
#! perl -w
+# $Id$
+
+use FindBin;
+use lib "$FindBin::Bin/../..";
use Scheme::Test tests => 42;
Modified: trunk/languages/scheme/t/arith/nested.t
==============================================================================
--- trunk/languages/scheme/t/arith/nested.t (original)
+++ trunk/languages/scheme/t/arith/nested.t Wed May 4 12:45:04 2005
@@ -1,4 +1,8 @@
#! perl -w
+# $Id$
+
+use FindBin;
+use lib "$FindBin::Bin/../..";
use Scheme::Test tests => 8;
Modified: trunk/languages/scheme/t/io/basic.t
==============================================================================
--- trunk/languages/scheme/t/io/basic.t (original)
+++ trunk/languages/scheme/t/io/basic.t Wed May 4 12:45:04 2005
@@ -1,4 +1,8 @@
#! perl -w
+# $Id$
+
+use FindBin;
+use lib "$FindBin::Bin/../..";
use Scheme::Test tests => 2;
Modified: trunk/languages/scheme/t/logic/basic.t
==============================================================================
--- trunk/languages/scheme/t/logic/basic.t (original)
+++ trunk/languages/scheme/t/logic/basic.t Wed May 4 12:45:04 2005
@@ -1,4 +1,8 @@
#! perl -w
+# $Id$
+
+use FindBin;
+use lib "$FindBin::Bin/../..";
use Scheme::Test tests => 7;
Modified: trunk/languages/scheme/t/logic/defines.t
==============================================================================
--- trunk/languages/scheme/t/logic/defines.t (original)
+++ trunk/languages/scheme/t/logic/defines.t Wed May 4 12:45:04 2005
@@ -1,4 +1,8 @@
#! perl -w
+# $Id$
+
+use FindBin;
+use lib "$FindBin::Bin/../..";
use Scheme::Test tests => 12;
Modified: trunk/languages/scheme/t/logic/lists.t
==============================================================================
--- trunk/languages/scheme/t/logic/lists.t (original)
+++ trunk/languages/scheme/t/logic/lists.t Wed May 4 12:45:04 2005
@@ -1,4 +1,8 @@
#! perl -w
+# $Id$
+
+use FindBin;
+use lib "$FindBin::Bin/../..";
use Scheme::Test tests => 26;
Modified: trunk/languages/testall
==============================================================================
--- trunk/languages/testall (original)
+++ trunk/languages/testall Wed May 4 12:45:04 2005
@@ -1,15 +1,14 @@
#! perl -w
-
-# Author: Will "Coke" Coleda
-#
-# Thanks to jq for portability issues.
+# Copyright: 2004-2005 The Perl Foundation. All Rights Reserved.
+# $Id$
use strict;
+use Data::Dumper;
use File::Spec;
use Test::Harness;
-=head1 language harness
+=head1 languages harness
There are 3 ways to run a language test:
@@ -29,6 +28,13 @@
=back
+=head1 AUTHOR
+
+ Will "Coke" Coleda
+ Jerome Quelin
+
+=cut
+
=for comment
We are assuming that we are running out of parrot/languages; we are being
@@ -38,26 +44,48 @@
=cut
-# Step 1: find the harness files
+# Step 1: find harness files for testable languages
-opendir(CUR,File::Spec->curdir()) or die "can't search for harnesses.\n";
+# These could all be tested:
+#
+# BASIC No t/harness
+# befunge No t/harness
+# bf No t/harness
+# cola No t/harness
+# conversion No t/harness
+# forth No t/harness
+# jako No t/harness
+# lisp No t/harness
+# 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
+# python
+#my @unified_testable_languages = qw( python );
+# regex No t/harness
+# ruby No t/harness
+# tcl No t/harness
+#my @unified_testable_languages = qw( tcl );
+# urm No t/harness
+my @unified_testable_languages = qw( m4 scheme );
my @harnesses =
- grep {-f $_}
- map { File::Spec->join($_,"t","harness") }
- grep {$_ ne File::Spec->curdir() && $_ ne File::Spec->updir()}
- (readdir(CUR));
-
-closedir(CUR);
+ grep {-f $_}
+ map { File::Spec->join($_,"t","harness") }
+ @unified_testable_languages;
# Step 2: Get a listing of files from these harnesses.
my @testfiles;
foreach my $harness (@harnesses) {
- my $perl = "$^X -I" . File::Spec->join(File::Spec->updir,"lib");
- open (FILES, "$perl $harness -files|");
- chomp && push @testfiles, $_ while (<FILES>);
+ my $perl = "$^X -I" . File::Spec->join(File::Spec->updir,"lib");
+ open(FILES, "$perl $harness -files |");
+ push @testfiles, <FILES>;
+ close(FILES);
}
+chomp( @testfiles );
# Step 3: test.