2016-04-22 19:21:51 +08:00
|
|
|
#! /usr/bin/env perl
|
2021-01-28 20:54:57 +08:00
|
|
|
# Copyright 2015-2021 The OpenSSL Project Authors. All Rights Reserved.
|
2016-04-22 19:21:51 +08:00
|
|
|
#
|
2018-12-06 20:05:25 +08:00
|
|
|
# Licensed under the Apache License 2.0 (the "License"). You may not use
|
2016-04-22 19:21:51 +08:00
|
|
|
# this file except in compliance with the License. You can obtain a copy
|
|
|
|
# in the file LICENSE in the source distribution or at
|
|
|
|
# https://www.openssl.org/source/license.html
|
|
|
|
|
2015-10-26 00:43:55 +08:00
|
|
|
|
|
|
|
use OpenSSL::Test::Simple;
|
2021-01-26 21:30:06 +08:00
|
|
|
use OpenSSL::Test qw/:DEFAULT srctop_file srctop_dir bldtop_dir bldtop_file data_dir/;
|
2020-12-10 23:39:58 +08:00
|
|
|
use OpenSSL::Test::Utils;
|
|
|
|
use Cwd qw(abs_path);
|
2015-10-26 00:43:55 +08:00
|
|
|
|
2020-12-10 23:39:58 +08:00
|
|
|
BEGIN {
|
|
|
|
setup("test_threads");
|
|
|
|
}
|
|
|
|
|
|
|
|
use lib srctop_dir('Configurations');
|
|
|
|
use lib bldtop_dir('.');
|
|
|
|
|
|
|
|
my $no_fips = disabled('fips') || ($ENV{NO_FIPS} // 0);
|
|
|
|
|
2020-09-29 16:26:19 +08:00
|
|
|
plan tests => 1;
|
2020-12-10 23:39:58 +08:00
|
|
|
|
|
|
|
if ($no_fips) {
|
|
|
|
$ENV{OPENSSL_CONF} = abs_path(srctop_file("test", "default.cnf"));
|
2021-01-26 21:30:06 +08:00
|
|
|
ok(run(test(["threadstest", data_dir()])), "running test_threads");
|
2020-12-10 23:39:58 +08:00
|
|
|
} else {
|
|
|
|
$ENV{OPENSSL_CONF} = abs_path(srctop_file("test", "default-and-fips.cnf"));
|
2021-01-26 21:30:06 +08:00
|
|
|
ok(run(test(["threadstest", "-fips", data_dir()])), "running test_threads");
|
2020-12-10 23:39:58 +08:00
|
|
|
}
|