2
0

90-test_shlibload.t 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940
  1. #! /usr/bin/env perl
  2. # Copyright 2016-2018 The OpenSSL Project Authors. All Rights Reserved.
  3. #
  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
  8. use OpenSSL::Test qw/:DEFAULT bldtop_dir/;
  9. use OpenSSL::Test::Utils;
  10. #Load configdata.pm
  11. BEGIN {
  12. setup("test_shlibload");
  13. }
  14. use lib bldtop_dir('.');
  15. use configdata;
  16. plan skip_all => "Test only supported in a shared build" if disabled("shared");
  17. plan tests => 4;
  18. my $libcrypto_idx = $unified_info{rename}->{libcrypto} // "libcrypto";
  19. my $libssl_idx = $unified_info{rename}->{libssl} // "libssl";
  20. my $libcrypto =
  21. $unified_info{sharednames}->{$libcrypto_idx}.$target{shared_extension_simple};
  22. my $libssl =
  23. $unified_info{sharednames}->{$libssl_idx}.$target{shared_extension_simple};
  24. ok(run(test(["shlibloadtest", "-crypto_first", $libcrypto, $libssl])),
  25. "running shlibloadtest -crypto_first");
  26. ok(run(test(["shlibloadtest", "-ssl_first", $libcrypto, $libssl])),
  27. "running shlibloadtest -ssl_first");
  28. ok(run(test(["shlibloadtest", "-just_crypto", $libcrypto, $libssl])),
  29. "running shlibloadtest -just_crypto");
  30. ok(run(test(["shlibloadtest", "-dso_ref", $libcrypto, $libssl])),
  31. "running shlibloadtest -dso_ref");