This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Make extensions in ext run their tests from the extension's own directory.
[perl5.git] / ext / Test-Harness / t / nofork.t
index 01375e0..1d8b340 100644 (file)
@@ -3,15 +3,7 @@
 # check nofork logic on systems which *can* fork()
 # NOTE maybe a good candidate for xt/author or something.
 
-BEGIN {
-    if ( $ENV{PERL_CORE} ) {
-        chdir 't';
-        @INC = ( '../lib', '../ext/Test-Harness/t/lib' );
-    }
-    else {
-        use lib 't/lib';
-    }
-}
+use lib 't/lib';
 
 use strict;
 
@@ -57,8 +49,7 @@ my $mod = 'TAP::Parser::Iterator::Process';
             stdout    => $capture,
         }
     );
-    $harness->runtests( ( $ENV{PERL_CORE} ? '../ext/Test-Harness/' : '' )
-        . 't/sample-tests/simple' );
+    $harness->runtests( 't/sample-tests/simple' );
     my @output = tied($$capture)->dump;
     is pop @output, "Result: PASS\n", 'status OK';
     pop @output;    # get rid of summary line