Link internal tests with static OpenSSL libraries when needed
[openssl.git] / test / recipes / 03-test_internal.t
1 #! /usr/bin/env perl
2 # Copyright 2015-2016 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
9 use strict;
10 use OpenSSL::Test qw/:DEFAULT bldtop_file/;
11 use OpenSSL::Test::Utils;
12
13 setup("test_internal");
14
15 my $shared_windows = $^O eq 'MSWin32' && !disabled("shared");
16
17 my %known_internal_tests =
18   ( mdc2_internal_test => !disabled("mdc2"),
19     poly1305_internal_test => !disabled("poly1305") && !$shared_windows,
20     modes_internal_test => !$shared_windows,
21     asn1_internal_test => !$shared_windows,
22     x509_internal_test => !$shared_windows );
23
24 plan tests => scalar keys %known_internal_tests;
25
26 foreach (keys %known_internal_tests) {
27  SKIP:
28     {
29         skip "Skipping $_, it's disabled in this configuration", 1
30             unless $known_internal_tests{$_};
31         ok(run(test([$_])), "Running $_");
32     }
33 }