diff options
author | Richard Levitte <levitte@openssl.org> | 2015-09-09 17:29:06 +0200 |
---|---|---|
committer | Richard Levitte <levitte@openssl.org> | 2015-09-09 19:12:09 +0200 |
commit | ceffb33db28d067fde07531c3fd36a0ed4b95ded (patch) | |
tree | 07375ae0774548a205b7ae07b7f43bfb548e8c3c /test/testlib | |
parent | 2dcac136a8c4e37646b717b68eeccc191d074bf0 (diff) |
Make sure the temporary error log resides in a well defined location
If a test recipe does something like this:
indir "foo.$$" => sub {
chmod 0500, File::Spec->curdir();
ok(run(app(["something"])));
}
we get a problem, because we were storing the temporary stderr file in
the current directory at all times (so while inside the 'indir', we
would attemp to store it in "foo.$$").
So, change our ways to always store that temporary file in the exact
same location, defined by the environment variable RESULT_D, or
failing that TEST_D, or failing that $TOP/test.
Reviewed-by: Rich Salz <rsalz@openssl.org>
Diffstat (limited to 'test/testlib')
-rw-r--r-- | test/testlib/OpenSSL/Test.pm | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/test/testlib/OpenSSL/Test.pm b/test/testlib/OpenSSL/Test.pm index f378351f65..c64d68de46 100644 --- a/test/testlib/OpenSSL/Test.pm +++ b/test/testlib/OpenSSL/Test.pm @@ -720,7 +720,8 @@ sub __build_cmd { $saved_stderr = $opts{stderr} if defined($opts{stderr}); - my $errlog = $num ? "$test_name.$num.tmp_err" : "$test_name.tmp_err"; + 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"; |