Commit 827b6cee authored by Manuel Pégourié-Gonnard's avatar Manuel Pégourié-Gonnard Committed by Paul Bakker
Browse files

Minor cleanups in test-ref-configs.pl

parent 0bc1f23d
......@@ -4,29 +4,34 @@
# - build
# - run test suite
# - run compat.sh
#
# Usage: tests/scripts/test-ref-configs.pl [config-name [...]]
use warnings;
use strict;
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'
=> '-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'",
=> '-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'",
);
# If no config-name is provided, use all known configs.
# Otherwise, use the provided names only.
if ($#ARGV >= 0) {
# filter configs
my @filtered_keys;
my %filtered_configs;
my %configs_ori = ( %configs );
%configs = ();
foreach my $filter (@ARGV) {
push (@filtered_keys, $filter);
foreach my $conf_name (@ARGV) {
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";
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment