X-Git-Url: https://git.openssl.org/gitweb/?p=openssl.git;a=blobdiff_plain;f=util%2Fperl%2FOpenSSL%2FTest.pm;h=d2f819043446e066f5a045430532eb943f74ff40;hp=f4b1b50d8b8a14a5d44ca7cfe51072cfd3e03b1b;hb=fa92c69aafc40a87c9b0dded9c365348a8ac4b33;hpb=efe749c84050b99a8470aa58a6c464cf886cfc00 diff --git a/util/perl/OpenSSL/Test.pm b/util/perl/OpenSSL/Test.pm index f4b1b50d8b..d2f8190434 100644 --- a/util/perl/OpenSSL/Test.pm +++ b/util/perl/OpenSSL/Test.pm @@ -20,7 +20,7 @@ $VERSION = "0.8"; perlapp perltest subtest)); @EXPORT_OK = (@Test::More::EXPORT_OK, qw(bldtop_dir bldtop_file srctop_dir srctop_file - data_file + data_file data_dir pipe with cmdstr quotify openssl_versions)); @@ -607,6 +607,23 @@ sub srctop_file { =over 4 +=item B + +LIST is a list of directories that make up a path from the data directory +associated with the test (see L above). +C 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 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},@_,$f); } +sub __data_dir { + BAIL_OUT("Must run setup() first") if (! $test_name); + + return catdir($directories{SRCDATA},@_); +} + sub __results_file { BAIL_OUT("Must run setup() first") if (! $test_name);