summaryrefslogtreecommitdiff
path: root/ext/DB_File
diff options
context:
space:
mode:
authorNicholas Clark <nick@ccl4.org>2009-08-28 00:44:15 +0100
committerNicholas Clark <nick@ccl4.org>2009-08-28 00:44:15 +0100
commit2adbc9b6919cad1240a834325b355e9b2d5efd67 (patch)
treea8ca75ac9ed7b8284a533b3f24c8407110d0c546 /ext/DB_File
parentd418880282b996e8cb066a570596b473fa7900da (diff)
downloadperl-2adbc9b6919cad1240a834325b355e9b2d5efd67.tar.gz
Make extensions in ext run their tests from the extension's own directory.
Inspired by, and in parts borrows from, Schwern's branch on github, but takes a slightly different approach in places. Not quite perfect yet - ext/File-Glob still runs from t, at least one FIXME needs fixing, and the changes to dual-life modules' tests need to be filtered back upstream, and possibly modified to suit their respective authors. But it works.
Diffstat (limited to 'ext/DB_File')
-rw-r--r--ext/DB_File/t/db-btree.t9
-rw-r--r--ext/DB_File/t/db-hash.t9
-rw-r--r--ext/DB_File/t/db-recno.t9
3 files changed, 3 insertions, 24 deletions
diff --git a/ext/DB_File/t/db-btree.t b/ext/DB_File/t/db-btree.t
index d6966da6a0..0df890436b 100644
--- a/ext/DB_File/t/db-btree.t
+++ b/ext/DB_File/t/db-btree.t
@@ -1,18 +1,11 @@
#!./perl -w
-
-BEGIN {
- unless(grep /blib/, @INC) {
- chdir 't' if -d 't';
- @INC = '../lib' if -d '../lib';
- }
-}
use warnings;
use strict;
use Config;
BEGIN {
- if(-d "lib" && -f "TEST") {
+ if($ENV{PERL_CORE}) {
if ($Config{'extensions'} !~ /\bDB_File\b/ ) {
print "1..0 # Skip: DB_File was not built\n";
exit 0;
diff --git a/ext/DB_File/t/db-hash.t b/ext/DB_File/t/db-hash.t
index 889bbe91ff..4168362531 100644
--- a/ext/DB_File/t/db-hash.t
+++ b/ext/DB_File/t/db-hash.t
@@ -1,18 +1,11 @@
#!./perl
-
-BEGIN {
- unless(grep /blib/, @INC) {
- chdir 't' if -d 't';
- @INC = '../lib' if -d '../lib';
- }
-}
use warnings;
use strict;
use Config;
BEGIN {
- if(-d "lib" && -f "TEST") {
+ if($ENV{PERL_CORE}) {
if ($Config{'extensions'} !~ /\bDB_File\b/ ) {
print "1..0 # Skip: DB_File was not built\n";
exit 0;
diff --git a/ext/DB_File/t/db-recno.t b/ext/DB_File/t/db-recno.t
index 3eb69688b7..365abfd520 100644
--- a/ext/DB_File/t/db-recno.t
+++ b/ext/DB_File/t/db-recno.t
@@ -1,18 +1,11 @@
#!./perl -w
-
-BEGIN {
- unless(grep /blib/, @INC) {
- chdir 't' if -d 't';
- @INC = '../lib' if -d '../lib';
- }
-}
use warnings;
use strict;
use Config;
BEGIN {
- if(-d "lib" && -f "TEST") {
+ if($ENV{PERL_CORE}) {
if ($Config{'extensions'} !~ /\bDB_File\b/ ) {
print "1..0 # Skip: DB_File was not built\n";
exit 0;