threads_pthread.c: change inline to ossl_inline
[openssl.git] / test / recipes / 30-test_evp_libctx.t
1 #! /usr/bin/env perl
2 # Copyright 2020 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
9 use strict;
10 use warnings;
11
12 use OpenSSL::Test qw(:DEFAULT bldtop_dir srctop_dir srctop_file bldtop_file);
13 use OpenSSL::Test::Utils;
14
15 BEGIN {
16     setup("test_evp_libctx");
17 }
18
19 my $no_fips = disabled('fips') || ($ENV{NO_FIPS} // 0);
20
21 use lib srctop_dir('Configurations');
22 use lib bldtop_dir('.');
23 use platform;
24
25 my $infile = bldtop_file('providers', platform->dso('fips'));
26 # If no fips then run the test with no extra arguments.
27 my @test_args = ( );
28
29 plan tests =>
30     ($no_fips ? 0 : 2)          # FIPS install test
31     + 1;
32
33 unless ($no_fips) {
34     @test_args = ("-config", srctop_file("test","fips-and-base.cnf"),
35                   "-provider", "fips");
36
37     ok(run(app(['openssl', 'fipsinstall',
38                '-out', bldtop_file('providers', 'fipsmodule.cnf'),
39                '-module', $infile])),
40        "fipsinstall");
41     ok(run(test(["evp_libctx_test", @test_args])), "running fips evp_libctx_test");
42 }
43
44 ok(run(test(["evp_libctx_test",
45              "-config", srctop_file("test","default.cnf"),])),
46    "running default-and-legacy evp_libctx_test");