[openssl-commits] [openssl] master update
Richard Levitte
levitte at openssl.org
Wed Apr 11 10:04:32 UTC 2018
The branch master has been updated
via 708a6a17592865590344eca541cbfccd472d7b45 (commit)
from 63a65d16acca53622a08861cdde8fe0e79beb522 (commit)
- Log -----------------------------------------------------------------
commit 708a6a17592865590344eca541cbfccd472d7b45
Author: Richard Levitte <levitte at openssl.org>
Date: Wed Apr 11 09:54:59 2018 +0200
OpenSSL::Test: add data_dir()
For test recipes that want to use the directory of the data directory
or a subdirectory thereof, rather than just individual files.
Reviewed-by: Andy Polyakov <appro at openssl.org>
(Merged from https://github.com/openssl/openssl/pull/5928)
-----------------------------------------------------------------------
Summary of changes:
util/perl/OpenSSL/Test.pm | 23 +++++++++++++++++++++++
1 file changed, 23 insertions(+)
diff --git a/util/perl/OpenSSL/Test.pm b/util/perl/OpenSSL/Test.pm
index f4b1b50..19141e9 100644
--- a/util/perl/OpenSSL/Test.pm
+++ b/util/perl/OpenSSL/Test.pm
@@ -607,6 +607,23 @@ sub srctop_file {
=over 4
+=item B<data_dir LIST>
+
+LIST is a list of directories that make up a path from the data directory
+associated with the test (see L</DESCRIPTION> above).
+C<data_dir> returns the resulting directory as a string, adapted to the local
+operating system.
+
+=back
+
+=cut
+
+sub data_dir {
+ return __data_dir(@_);
+}
+
+=over 4
+
=item B<data_file LIST, FILENAME>
LIST is a list of directories that make up a path from the data directory
@@ -967,6 +984,12 @@ sub __data_file {
return catfile($directories{SRCDATA}, at _,$f);
}
+sub __data_dir {
+ BAIL_OUT("Must run setup() first") if (! $test_name);
+
+ return catdir($directories{SRCDATA}, at _);
+}
+
sub __results_file {
BAIL_OUT("Must run setup() first") if (! $test_name);
More information about the openssl-commits
mailing list