TEST: Remove the build of fipsmodule.cnf from test recipes
[openssl.git] / test / recipes / 90-test_threads.t
1 #! /usr/bin/env perl
2 # Copyright 2015-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
9
10 use OpenSSL::Test::Simple;
11 use OpenSSL::Test qw/:DEFAULT srctop_file srctop_dir bldtop_dir bldtop_file data_dir/;
12 use OpenSSL::Test::Utils;
13 use Cwd qw(abs_path);
14
15 BEGIN {
16 setup("test_threads");
17 }
18
19 use lib srctop_dir('Configurations');
20 use lib bldtop_dir('.');
21
22 my $no_fips = disabled('fips') || ($ENV{NO_FIPS} // 0);
23
24 plan tests => 1;
25
26 if ($no_fips) {
27     $ENV{OPENSSL_CONF} = abs_path(srctop_file("test", "default.cnf"));
28     ok(run(test(["threadstest", data_dir()])), "running test_threads");
29 } else {
30     $ENV{OPENSSL_CONF} = abs_path(srctop_file("test", "default-and-fips.cnf"));
31     ok(run(test(["threadstest", "-fips", data_dir()])), "running test_threads");
32 }