From: Leopold Toetsch <[EMAIL PROTECTED]>
   Date: Mon, 28 Mar 2005 11:30:21 +0200

   Bob Rogers <[EMAIL PROTECTED]> wrote:

   > ...  If the prefix is disabled via
   > PARROT_TEST, this fixes the immediate problem:

   >     [EMAIL PROTECTED]> PARROT_TEST=1 perl -Ilib t/dynclass/foo.t
   >     1..1
   >     ok 1 - abs
   >     [EMAIL PROTECTED]>

   > But shouldn't "make test" do this by default?  Otherwise, you're not
   > actually testing the version you just built . . .

   Seems so, yes.

   leo

The following trivial patch fixes this.  It's written so that an
explicit

        PARROT_TEST=0 make test

would turn it off, but Parrot_get_runtime_prefix doesn't support this;
it just tests that PARROT_TEST is defined.  But I doubt this is worth
bothering about.

                                        -- Bob Rogers
                                           http://rgrjr.dyndns.org/

------------------------------------------------------------------------
Index: lib/Parrot/Test.pm
===================================================================
RCS file: /cvs/public/parrot/lib/Parrot/Test.pm,v
retrieving revision 1.66
diff -u -r1.66 Test.pm
--- lib/Parrot/Test.pm  7 Mar 2005 22:26:49 -0000       1.66
+++ lib/Parrot/Test.pm  31 Mar 2005 04:03:23 -0000
@@ -152,6 +152,11 @@
               skip );
 @ISA = qw(Exporter);
 
+# tell parrot it's being tested.  this disables searching of installed 
libraries
+# (see Parrot_get_runtime_prefix in src/library.c).
+$ENV{PARROT_TEST} = 1
+    unless defined($ENV{PARROT_TEST});
+
 my $builder = Test::Builder->new();
 
 sub import {

Reply via email to