mirror of
https://github.com/yuzu-emu/mbedtls.git
synced 2024-11-26 11:55:41 +01:00
Minor cleanups in test-ref-configs.pl
This commit is contained in:
parent
0bc1f23dfd
commit
827b6cee7f
@ -4,29 +4,34 @@
|
|||||||
# - build
|
# - build
|
||||||
# - run test suite
|
# - run test suite
|
||||||
# - run compat.sh
|
# - run compat.sh
|
||||||
|
#
|
||||||
|
# Usage: tests/scripts/test-ref-configs.pl [config-name [...]]
|
||||||
|
|
||||||
use warnings;
|
use warnings;
|
||||||
use strict;
|
use strict;
|
||||||
|
|
||||||
my %configs = (
|
my %configs = (
|
||||||
'config-psk-rc4-tls1_0.h' => '-m tls1 -f \'^PSK.*RC4\|TLS-PSK.*RC4\'',
|
'config-psk-rc4-tls1_0.h'
|
||||||
|
=> '-m tls1 -f \'^PSK.*RC4\|TLS-PSK.*RC4\'',
|
||||||
'config-mini-tls1_1.h'
|
'config-mini-tls1_1.h'
|
||||||
=> '-m tls1_1 -f \'^DES-CBC3-SHA$\|^TLS-RSA-WITH-3DES-EDE-CBC-SHA$\'',
|
=> '-m tls1_1 -f \'^DES-CBC3-SHA$\|^TLS-RSA-WITH-3DES-EDE-CBC-SHA$\'',
|
||||||
'config-suite-b.h' => "-m tls1_2 -f 'ECDHE-ECDSA.*AES.*GCM'",
|
'config-suite-b.h'
|
||||||
|
=> "-m tls1_2 -f 'ECDHE-ECDSA.*AES.*GCM'",
|
||||||
);
|
);
|
||||||
|
|
||||||
|
# If no config-name is provided, use all known configs.
|
||||||
|
# Otherwise, use the provided names only.
|
||||||
if ($#ARGV >= 0) {
|
if ($#ARGV >= 0) {
|
||||||
# filter configs
|
my %configs_ori = ( %configs );
|
||||||
my @filtered_keys;
|
%configs = ();
|
||||||
my %filtered_configs;
|
|
||||||
|
|
||||||
foreach my $filter (@ARGV) {
|
foreach my $conf_name (@ARGV) {
|
||||||
push (@filtered_keys, $filter);
|
if( ! exists $configs_ori{$conf_name} ) {
|
||||||
|
die "Unknown configuration: $conf_name\n";
|
||||||
|
} else {
|
||||||
|
$configs{$conf_name} = $configs_ori{$conf_name};
|
||||||
|
}
|
||||||
}
|
}
|
||||||
@filtered_keys = grep { exists $configs{$ARGV[0]} } @filtered_keys;
|
|
||||||
@filtered_configs{@filtered_keys} = @configs{@filtered_keys};
|
|
||||||
|
|
||||||
%configs = %filtered_configs;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
-d 'library' && -d 'include' && -d 'tests' or die "Must be run from root\n";
|
-d 'library' && -d 'include' && -d 'tests' or die "Must be run from root\n";
|
||||||
|
Loading…
Reference in New Issue
Block a user