t/dynclass failures due to using installed libs

0 views
Skip to first unread message

Bob Rogers

unread,
Mar 27, 2005, 4:21:09 PM3/27/05
to Perl 6 Internals
I just did a CVS update (the first in a while, with all necessary
options present, btw), and got some dynamic loading failures, e.g.:

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/

Leopold Toetsch

unread,
Mar 28, 2005, 4:30:21 AM3/28/05
to Bob Rogers, perl6-i...@perl.org
Bob Rogers <rogers...@rgrjr.dyndns.org> wrote:

> ... 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

unread,
Mar 30, 2005, 11:11:58 PM3/30/05
to l...@toetsch.at, perl6-i...@perl.org
From: Leopold Toetsch <l...@toetsch.at>
Date: Mon, 28 Mar 2005 11:30:21 +0200

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.

------------------------------------------------------------------------
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 {

Leopold Toetsch

unread,
Mar 31, 2005, 7:21:09 AM3/31/05
to Bob Rogers, perl6-i...@perl.org
Bob Rogers <rogers...@rgrjr.dyndns.org> wrote:

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

> PARROT_TEST=0 make test

Thanks, applied.
leo

Reply all
Reply to author
Forward
0 new messages