30-test_provider_status.t 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  1. #! /usr/bin/env perl
  2. # Copyright 2020-2021 The OpenSSL Project Authors. All Rights Reserved.
  3. #
  4. # Licensed under the Apache License 2.0 (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 strict;
  9. use warnings;
  10. use OpenSSL::Test qw(:DEFAULT data_file bldtop_dir srctop_file srctop_dir bldtop_file);
  11. use OpenSSL::Test::Utils;
  12. BEGIN {
  13. setup("test_provider_status");
  14. }
  15. use lib srctop_dir('Configurations');
  16. use lib bldtop_dir('.');
  17. my $no_fips = disabled('fips') || ($ENV{NO_FIPS} // 0);
  18. plan tests => 5;
  19. ok(run(test(["provider_status_test", "-provider_name", "null"])),
  20. "null provider test");
  21. ok(run(test(["provider_status_test", "-provider_name", "base"])),
  22. "base provider test");
  23. ok(run(test(["provider_status_test", "-provider_name", "default"])),
  24. "default provider test");
  25. SKIP: {
  26. skip "Skipping legacy test", 1
  27. if disabled("legacy");
  28. ok(run(test(["provider_status_test", "-provider_name", "legacy"])),
  29. "legacy provider test");
  30. }
  31. SKIP: {
  32. skip "Skipping fips test", 1
  33. if $no_fips;
  34. ok(run(test(["provider_status_test", "-config", srctop_file("test","fips.cnf"),
  35. "-provider_name", "fips"])),
  36. "fips provider test");
  37. }