This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Test::Harness setting $ENV{HARNESS_ACTIVE}
authorJan Dubois <jand@activestate.com>
Wed, 24 Feb 1999 22:34:56 +0000 (23:34 +0100)
committerGurusamy Sarathy <gsar@cpan.org>
Sun, 28 Feb 1999 18:35:09 +0000 (18:35 +0000)
Message-ID: <36d86f1e.11495549@smtp1.ibm.net>

p4raw-id: //depot/perl@3030

lib/Test/Harness.pm

index 219ffb9..738f36d 100644 (file)
@@ -13,6 +13,8 @@ $have_devel_corestack = 0;
 
 $VERSION = "1.1602";
 
+$ENV{HARNESS_ACTIVE} = 1;
+
 # Some experimental versions of OS/2 build have broken $?
 my $ignore_exitcode = $ENV{HARNESS_IGNORE_EXITCODE};
 
@@ -458,6 +460,10 @@ If relative, directory name is with respect to the current directory at
 the moment runtests() was called.  Putting absolute path into 
 C<HARNESS_FILELEAK_IN_DIR> may give more predicatable results.
 
+Harness sets C<HARNESS_ACTIVE> before executing the individual tests.
+This allows the tests to determine if they are being executed through the
+harness or by any other means.
+
 =head1 SEE ALSO
 
 L<Test> for writing test scripts and also L<Benchmark> for the