summaryrefslogtreecommitdiff
path: root/t/base/rs.t
diff options
context:
space:
mode:
authorFather Chrysostomos <sprout@cpan.org>2010-09-22 13:10:19 -0700
committerFather Chrysostomos <sprout@cpan.org>2010-09-22 13:10:19 -0700
commit20c002109cce68de85ddf6451b809a24ae6d650a (patch)
treebdce7d46c8f0c0fae23b9accd33f98ba8f28f052 /t/base/rs.t
parent6e256d6843282fdbfc400027b4dd7313ab63caf1 (diff)
downloadperl-20c002109cce68de85ddf6451b809a24ae6d650a.tar.gz
Add lib to @INC in t/base/rs.t
t/base/rs.t needs to @INClude the lib directory before requiring PerlIO::scalar, even if the require is in an eval, because it will otherwise pick up a previously-installed copy. Since 87b9e1600 (Eliminate PL_* accessor functions under ithreads), a binary-incompatible change, I’ve been getting these errors: t/base/rs......................................................dyld: lazy symbol binding failed: Symbol not found: _Perl_Istack_sp_ptr Referenced from: /usr/local/lib/perl5/5.13.5/darwin-thread-multi-2level/auto/PerlIO/scalar/scalar.bundle Expected in: dynamic lookup dyld: Symbol not found: _Perl_Istack_sp_ptr Referenced from: /usr/local/lib/perl5/5.13.5/darwin-thread-multi-2level/auto/PerlIO/scalar/scalar.bundle Expected in: dynamic lookup FAILED--no leader found Failed a basic test (base/rs.t) -- cannot continue. make: *** [test] Error 255
Diffstat (limited to 't/base/rs.t')
-rw-r--r--t/base/rs.t12
1 files changed, 9 insertions, 3 deletions
diff --git a/t/base/rs.t b/t/base/rs.t
index 51681e9ec5..ab416521aa 100644
--- a/t/base/rs.t
+++ b/t/base/rs.t
@@ -115,7 +115,12 @@ $/ = "\n";
}
-if (not eval q/use PerlIO::scalar; use PerlIO::via::scalar; 1/) {
+{
+ # If we do not include the lib directories, we may end up picking up a
+ # binary-incompatible previously-installed version. The eval won’t help in
+ # intercepting a SIGTRAP.
+ local @INC = ("../lib", "lib", @INC);
+ if (not eval q/use PerlIO::scalar; use PerlIO::via::scalar; 1/) {
# In-memory files necessitate PerlIO::via::scalar, thus a perl with
# perlio and dynaloading enabled. miniperl won't be able to run this
# test, so skip it
@@ -127,8 +132,8 @@ if (not eval q/use PerlIO::scalar; use PerlIO::via::scalar; 1/) {
print "ok $test # skipped - Can't test in memory file with miniperl/without PerlIO::Scalar\n";
$test_count++;
}
-}
-else {
+ }
+ else {
# Test if a file in memory behaves the same as a real file (= re-run the test with a file in memory)
open TESTFILE, "<", \$teststring;
test_string(*TESTFILE);
@@ -137,6 +142,7 @@ else {
open TESTFILE, "<", \$teststring2;
test_record(*TESTFILE);
close TESTFILE;
+ }
}
# Get rid of the temp file