In each of the 7 affected test files, the initial mention of $topdir in the 
BEGIN block was replaced 
by 'our $topdir'.  These tests now pass when run via 'make buildtools_tests' or 
'prove t/tools/
pmc2cutils/*.t' after running 'Configure.pl' but before running 'make'.  I also 
ran 'make' 
successfully.  I ran 'make test' (which does not include the 
'buildtools_tests').  That ran with one 
error -- the well-known (at least to me!) error in t/shootout about which I 
have filed a separate 
bug ticket.

See the attached patch.  Since, when I apply this patch, it will be my first 
patch directly to trunk 
(thanks for the commit bit, particle!), I would like some other eyeballs to 
look at it first and 
provide feedback as needed.

Thank you very much.
kid51
Index: t/tools/pmc2cutils/00-qualify.t
===================================================================
--- t/tools/pmc2cutils/00-qualify.t     (revision 16773)
+++ t/tools/pmc2cutils/00-qualify.t     (working copy)
@@ -1,11 +1,11 @@
 #! perl
 # Copyright (C) 2006, The Perl Foundation.
-# $Id: pmc2c.t 14964 2006-10-18 18:20:48Z particle $
+# $Id$
 # 00-qualify.t
 
 use strict;
 use warnings;
-use Test::More tests =>  8;
+use Test::More tests =>  9;
 use FindBin;
 use lib (
     "$FindBin::Bin/../..",
@@ -31,6 +31,27 @@
 ok($sfx{'num'}, ".num suffix correctly located");
 ok($sfx{'pmc'}, ".pmc suffix correctly located");
 
+my $message = <<END_OF_MESSAGE;
+
+
+The files in this directory test the publicly callable methods of 
+Parrot::Pmc2c::Utils.  By doing so, they test the functionality 
+of the pmc2c.pl utility.
+
+Since pmc2c.pl is invoked many times during 'make', tests of its 
+functionality can give meaningful results only if you run them 
+when your file system under the top-level Parrot directory is in 
+a 'pre-make' state, i.e., you have run 'perl Configure.pl' but 
+have *not* yet run 'make'.  These tests should pass if run at 
+that point in the build process, but some will necessarily fail 
+if 'make' has already been executed.  Hence, they should not be 
+included in the set of tests run by 'make test'.
+
+In short, these are tests of Parrot::Pmc2c::Utils but are *not* 
+tests of Parrot itself.
+
+END_OF_MESSAGE
+pass($message);
 pass("Completed all tests in $0");
 
 ################### DOCUMENTATION ###################

Property changes on: t/tools/pmc2cutils/00-qualify.t
___________________________________________________________________
Name: svn:keywords
   + Id

Index: t/tools/pmc2cutils/01-pmc2cutils.t
===================================================================
--- t/tools/pmc2cutils/01-pmc2cutils.t  (revision 16773)
+++ t/tools/pmc2cutils/01-pmc2cutils.t  (working copy)
@@ -10,7 +10,7 @@
     use FindBin qw($Bin);
     use Cwd qw(cwd realpath);
     realpath($Bin) =~ m{^(.*\/parrot)\/[^/]*\/[^/]*\/[^/]*$};
-    $topdir = $1;
+    our $topdir = $1;
     if (defined $topdir) {
         print "\nOK:  Parrot top directory located\n";
     } else {

Property changes on: t/tools/pmc2cutils/01-pmc2cutils.t
___________________________________________________________________
Name: svn:keywords
   + Id

Index: t/tools/pmc2cutils/02-find_file.t
===================================================================
--- t/tools/pmc2cutils/02-find_file.t   (revision 16773)
+++ t/tools/pmc2cutils/02-find_file.t   (working copy)
@@ -1,6 +1,6 @@
 #! perl
 # Copyright (C) 2006, The Perl Foundation.
-# $Id: pmc2c.t 14964 2006-10-18 18:20:48Z particle $
+# $Id$
 # 02-find_file.t
 
 use strict;
@@ -10,7 +10,7 @@
     use FindBin qw($Bin);
     use Cwd qw(cwd realpath);
     realpath($Bin) =~ m{^(.*\/parrot)\/[^/]*\/[^/]*\/[^/]*$};
-    $topdir = $1;
+    our $topdir = $1;
     if (defined $topdir) {
         print "\nOK:  Parrot top directory located\n";
     } else {

Property changes on: t/tools/pmc2cutils/02-find_file.t
___________________________________________________________________
Name: svn:keywords
   + Id

Index: t/tools/pmc2cutils/03-dump_vtable.t
===================================================================
--- t/tools/pmc2cutils/03-dump_vtable.t (revision 16773)
+++ t/tools/pmc2cutils/03-dump_vtable.t (working copy)
@@ -1,6 +1,6 @@
 #! perl
 # Copyright (C) 2006, The Perl Foundation.
-# $Id: pmc2c.t 14964 2006-10-18 18:20:48Z particle $
+# $Id$
 # 03-dump_vtable.t
 
 use strict;
@@ -10,7 +10,7 @@
     use FindBin qw($Bin);
     use Cwd qw(cwd realpath);
     realpath($Bin) =~ m{^(.*\/parrot)\/[^/]*\/[^/]*\/[^/]*$};
-    $topdir = $1;
+    our $topdir = $1;
     if (defined $topdir) {
         print "\nOK:  Parrot top directory located\n";
     } else {
@@ -29,6 +29,7 @@
 my $dump_file;
 my $cwd;
 
+
 # basic test
 {
     $cwd = cwd();

Property changes on: t/tools/pmc2cutils/03-dump_vtable.t
___________________________________________________________________
Name: svn:keywords
   + Id

Index: t/tools/pmc2cutils/04-dump_pmc.t
===================================================================
--- t/tools/pmc2cutils/04-dump_pmc.t    (revision 16773)
+++ t/tools/pmc2cutils/04-dump_pmc.t    (working copy)
@@ -10,7 +10,7 @@
     use FindBin qw($Bin);
     use Cwd qw(cwd realpath);
     realpath($Bin) =~ m{^(.*\/parrot)\/[^/]*\/[^/]*\/[^/]*$};
-    $topdir = $1;
+    our $topdir = $1;
     if (defined $topdir) {
         print "\nOK:  Parrot top directory located\n";
     } else {

Property changes on: t/tools/pmc2cutils/04-dump_pmc.t
___________________________________________________________________
Name: svn:keywords
   + Id

Index: t/tools/pmc2cutils/05-gen_c.t
===================================================================
--- t/tools/pmc2cutils/05-gen_c.t       (revision 16773)
+++ t/tools/pmc2cutils/05-gen_c.t       (working copy)
@@ -1,6 +1,6 @@
 #! perl
 # Copyright (C) 2006, The Perl Foundation.
-# $Id: pmc2c.t 14964 2006-10-18 18:20:48Z particle $
+# $Id$
 # 05-gen_c.t
 
 use strict;
@@ -10,7 +10,7 @@
     use FindBin qw($Bin);
     use Cwd qw(cwd realpath);
     realpath($Bin) =~ m{^(.*\/parrot)\/[^/]*\/[^/]*\/[^/]*$};
-    $topdir = $1;
+    our $topdir = $1;
     if (defined $topdir) {
         print "\nOK:  Parrot top directory located\n";
     } else {

Property changes on: t/tools/pmc2cutils/05-gen_c.t
___________________________________________________________________
Name: svn:keywords
   + Id

Index: t/tools/pmc2cutils/06-print_tree.t
===================================================================
--- t/tools/pmc2cutils/06-print_tree.t  (revision 16773)
+++ t/tools/pmc2cutils/06-print_tree.t  (working copy)
@@ -1,6 +1,6 @@
 #! perl
 # Copyright (C) 2006, The Perl Foundation.
-# $Id: pmc2c.t 14964 2006-10-18 18:20:48Z particle $
+# $Id$
 # 06-print_tree.t
 
 use strict;
@@ -10,7 +10,7 @@
     use FindBin qw($Bin);
     use Cwd qw(cwd realpath);
     realpath($Bin) =~ m{^(.*\/parrot)\/[^/]*\/[^/]*\/[^/]*$};
-    $topdir = $1;
+    our $topdir = $1;
     if (defined $topdir) {
         print "\nOK:  Parrot top directory located\n";
     } else {

Property changes on: t/tools/pmc2cutils/06-print_tree.t
___________________________________________________________________
Name: svn:keywords
   + Id

Index: t/tools/pmc2cutils/07-open_file.t
===================================================================
--- t/tools/pmc2cutils/07-open_file.t   (revision 16773)
+++ t/tools/pmc2cutils/07-open_file.t   (working copy)
@@ -1,6 +1,6 @@
 #! perl
 # Copyright (C) 2006, The Perl Foundation.
-# $Id: pmc2c.t 14964 2006-10-18 18:20:48Z particle $
+# $Id$
 # 07-open_file.t
 
 use strict;
@@ -10,7 +10,7 @@
     use FindBin qw($Bin);
     use Cwd qw(cwd realpath);
     realpath($Bin) =~ m{^(.*\/parrot)\/[^/]*\/[^/]*\/[^/]*$};
-    $topdir = $1;
+    our $topdir = $1;
     if (defined $topdir) {
         print "\nOK:  Parrot top directory located\n";
     } else {

Property changes on: t/tools/pmc2cutils/07-open_file.t
___________________________________________________________________
Name: svn:keywords
   + Id

Reply via email to