sub __cwd;
sub __apps_file;
sub __results_file;
-sub __test_log;
sub __fixup_cmd;
sub __build_cmd;
unless -f srctop_file("Configure");
__cwd($directories{RESULTS});
-
- # Loop in case we're on a platform with more than one file generation
- 1 while unlink(__test_log());
}
=over 4
=cut
sub run {
- my ($cmd, $display_cmd, %errlogs) = shift->(0);
+ my ($cmd, $display_cmd) = shift->(0);
my %opts = @_;
return () if !$cmd;
# non-zero.
$? = 0;
- open ERR, ">>", __test_log();
- { local $| = 1; print ERR "$display_cmd => $e\n"; }
- foreach (keys %errlogs) {
- copy($_,\*ERR);
- copy($_,$errlogs{$_}) if defined($errlogs{$_});
- unlink($_);
- }
- close ERR;
-
if ($opts{capture}) {
return @r;
} else {
=cut
sub cmdstr {
- my ($cmd, $display_cmd, %errlogs) = shift->(0);
+ my ($cmd, $display_cmd) = shift->(0);
return $display_cmd;
}
If defined, its value should be the directory where the test applications
are located. Defaults to C<$TOP/test> (adapted to the operating system).
-=item B<RESULT_D>
-
-If defined, its value should be the directory where the log files are
-located. Defaults to C<$TEST_D>.
-
=item B<STOPTEST>
If defined, it puts testing in a different mode, where a recipe with
return catfile($directories{RESULTS},@_,$f);
}
-sub __test_log {
- return __results_file("$test_name.log");
-}
-
sub __cwd {
my $dir = catdir(shift);
my %opts = @_;
print STDERR " \$directories{APPS} = \"$directories{APPS}\"\n";
print STDERR " \$directories{SRCTOP} = \"$directories{SRCTOP}\"\n";
print STDERR " \$directories{BLDTOP} = \"$directories{BLDTOP}\"\n";
- print STDERR " \$test_log = \"",__test_log(),"\"\n";
print STDERR "\n";
print STDERR " current directory is \"",curdir(),"\"\n";
print STDERR " the way back is \"$reverse\"\n";
$stdout= " > ".$fileornull->($opts{stdout}) if exists($opts{stdout});
$stderr=" 2> ".$fileornull->($opts{stderr}) if exists($opts{stderr});
- $saved_stderr = $opts{stderr} if defined($opts{stderr});
-
- my $errlog =
- __results_file($num ? "$test_name.$num.tmp_err" : "$test_name.tmp_err");
my $display_cmd = "$cmd$arg_str$stdin$stdout$stderr";
- $cmd .= "$arg_str$stdin$stdout 2> $errlog";
+
+ $stderr=" 2> ".$null
+ unless $stderr || !$ENV{HARNESS_ACTIVE} || $ENV{HARNESS_VERBOSE};
+
+ $cmd .= "$arg_str$stdin$stdout$stderr";
if ($debug) {
print STDERR "DEBUG[__build_cmd]: \$cmd = \"$cmd\"\n";
print STDERR "DEBUG[__build_cmd]: \$display_cmd = \"$display_cmd\"\n";
}
- return ($cmd, $display_cmd, $errlog => $saved_stderr);
+ return ($cmd, $display_cmd);
}
=head1 SEE ALSO