From 30a3062782eb4c9a28a230f8c6b7ccc67db64b2a Mon Sep 17 00:00:00 2001
From: Paul Bakker
Date: Thu, 19 Dec 2013 17:09:49 +0100
Subject: [PATCH] Added ability to filter configs in test-ref-configs.pl
---
tests/scripts/test-ref-configs.pl | 14 ++++++++++++++
1 file changed, 14 insertions(+)
diff --git a/tests/scripts/test-ref-configs.pl b/tests/scripts/test-ref-configs.pl
index 5b9f8fbc00..e7eb4ceb28 100755
--- a/tests/scripts/test-ref-configs.pl
+++ b/tests/scripts/test-ref-configs.pl
@@ -15,6 +15,20 @@ my %configs = (
'config-suite-b.h' => "-m tls1_2 -f 'ECDSA.*GCM'",
);
+if ($#ARGV >= 0) {
+ # filter configs
+ my @filtered_keys;
+ my %filtered_configs;
+
+ foreach my $filter (@ARGV) {
+ push (@filtered_keys, $filter);
+ }
+ @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";
my $test = system( "grep -i cmake Makefile >/dev/null" ) ? 'check' : 'test';