rogers@rgrjr> perl -Ilib t/dynclass/foo.t
1..1
not ok 1 - abs
# Failed test (t/dynclass/foo.t at line 21)
# got: 'Couldn't load 'foo': foo: cannot open shared object file: No such file or directory
# Illegal PMC enum (0) in new
# '
# expected: '42
# '
# '(cd . && ./parrot "/shared/src/parrot/t/dynclass/foo_1.imc")' failed with exit code 1
# Looks like you failed 1 tests of 1.
rogers@rgrjr>
Poking into it, I found that Parrot_locate_runtime_file searches under
the prefix, /usr/local/parrot-0.1.2-devel in this case, which certainly
makes sense for installed code. If the prefix is disabled via
PARROT_TEST, this fixes the immediate problem:
rogers@rgrjr> PARROT_TEST=1 perl -Ilib t/dynclass/foo.t
1..1
ok 1 - abs
rogers@rgrjr>
But shouldn't "make test" do this by default? Otherwise, you're not
actually testing the version you just built . . .
-- Bob Rogers
http://rgrjr.dyndns.org/
> ... If the prefix is disabled via
> PARROT_TEST, this fixes the immediate problem:
> rogers@rgrjr> PARROT_TEST=1 perl -Ilib t/dynclass/foo.t
> 1..1
> ok 1 - abs
> rogers@rgrjr>
> But shouldn't "make test" do this by default? Otherwise, you're not
> actually testing the version you just built . . .
Seems so, yes.
> -- Bob Rogers
leo
Bob Rogers <rogers...@rgrjr.dyndns.org> wrote:
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 {
> The following trivial patch fixes this. It's written so that an
> explicit
> PARROT_TEST=0 make test
Thanks, applied.
leo