2 # Copyright 2016-2018 The OpenSSL Project Authors. All Rights Reserved.
4 # Licensed under the OpenSSL license (the "License"). You may not use
5 # this file except in compliance with the License. You can obtain a copy
6 # in the file LICENSE in the source distribution or at
7 # https://www.openssl.org/source/license.html
10 use OpenSSL::Test qw/:DEFAULT bldtop_dir/;
11 use OpenSSL::Test::Utils;
16 setup("test_shlibload");
18 use lib bldtop_dir('.');
21 plan skip_all => "Test only supported in a shared build" if disabled("shared");
25 my $libcrypto_idx = $unified_info{rename}->{libcrypto} // "libcrypto";
26 my $libssl_idx = $unified_info{rename}->{libssl} // "libssl";
28 $unified_info{sharednames}->{$libcrypto_idx}.$target{shared_extension_simple};
30 $unified_info{sharednames}->{$libssl_idx}.$target{shared_extension_simple};
32 ok(run(test(["shlibloadtest", "-crypto_first", $libcrypto, $libssl])),
33 "running shlibloadtest -crypto_first");
34 ok(run(test(["shlibloadtest", "-ssl_first", $libcrypto, $libssl])),
35 "running shlibloadtest -ssl_first");
36 ok(run(test(["shlibloadtest", "-just_crypto", $libcrypto, $libssl])),
37 "running shlibloadtest -just_crypto");
38 ok(run(test(["shlibloadtest", "-dso_ref", $libcrypto, $libssl])),
39 "running shlibloadtest -dso_ref");