OpenSSL::Test: Treat SRCDATA directory specially, as it might not exist
authorRichard Levitte <levitte@openssl.org>
Thu, 10 Jun 2021 11:00:54 +0000 (13:00 +0200)
committerTomas Mraz <tomas@openssl.org>
Thu, 10 Jun 2021 13:24:05 +0000 (15:24 +0200)
commitbedda72ff771a41c317daa7bdb7cbe14608fbc03
tree9e5d23482211597e59612c114691c551dc0be6d6
parent586820831afdd01954d82cb068e252cb1772081c
OpenSSL::Test: Treat SRCDATA directory specially, as it might not exist

Not all tests come with a SRCDATA directory.  if it doesn't exist, we
simply drop it from the internal table of directories.

OpenSSL::Test::srcdata_dir() and OpenSSL::Test::srcdata_file() may
return undef in that case.  However, recipes shouldn't try to refer to
a non-existing data directory, so if that happens, it's a programming
error and must be corrected.

Fixes #15679

Reviewed-by: Paul Dale <pauli@openssl.org>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/15700)
util/perl/OpenSSL/Test.pm