mirror of
https://github.com/Mbed-TLS/mbedtls.git
synced 2025-02-22 09:40:09 +00:00
Improve test-ref-configs.pl
Signed-off-by: Ronald Cron <ronald.cron@arm.com>
This commit is contained in:
parent
ca6b1e9df3
commit
b30cd3bb8f
@ -142,16 +142,9 @@ sub perform_test {
|
|||||||
}
|
}
|
||||||
|
|
||||||
foreach my $conf ( @configs_to_test ) {
|
foreach my $conf ( @configs_to_test ) {
|
||||||
my $test_with_psa = 0;
|
system("grep '//#define MBEDTLS_USE_PSA_CRYPTO' configs/$conf > /dev/null");
|
||||||
|
die "grep ... configs/$conf: $!" if $? != 0 && $? != 0x100;
|
||||||
open(CONFIG_FILE, "<", "configs/$conf") or die "Opening config file '$conf': $!";
|
my $test_with_psa = $? == 0;
|
||||||
while (my $line = <CONFIG_FILE>) {
|
|
||||||
if ($line =~ /^\/\/#define MBEDTLS_USE_PSA_CRYPTO/) {
|
|
||||||
$test_with_psa = 1;
|
|
||||||
last;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
close(CONFIG_FILE);
|
|
||||||
|
|
||||||
if ( $test_with_psa )
|
if ( $test_with_psa )
|
||||||
{
|
{
|
||||||
|
Loading…
x
Reference in New Issue
Block a user