Fix the rehash test on Windows

The openssl rehash command is not available on some platforms including
Windows. This change skips the associated tests if rehash is not available.

Reviewed-by: Richard Levitte <levitte@openssl.org>
This commit is contained in:
Matt Caswell 2015-09-22 15:16:29 +01:00
parent e15a18de96
commit 1556d21850

View File

@ -10,6 +10,11 @@ use OpenSSL::Test qw/:DEFAULT top_file/;
setup("test_rehash");
#If "openssl rehash -help" fails it's most likely because we're on a platform
#that doesn't support the rehash command (e.g. Windows)
plan skip_all => "test_rehash is not available on this platform"
unless run(app(["openssl", "rehash", "-help"]));
plan tests => 5;
indir "rehash.$$" => sub {