mirror of
https://github.com/Mbed-TLS/mbedtls.git
synced 2025-12-24 17:41:01 +03:00
Run test suites with a single call to run-test-suites.pl
Before this commit, `make test` stopped after running the TLS tests if there was a failure. Have `run-test-suites.pl` take care of looking in all the directories, so that the last line of output from `make test` is an accurate report of all the test suites, not just the test suites from the last run of `run-test-suites.pl`. Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com>
This commit is contained in:
@@ -270,7 +270,6 @@ endif
|
||||
# Test suites caught by SKIP_TEST_SUITES are built but not executed.
|
||||
check: $(BINARIES) $(CRYPTO_BINARIES)
|
||||
perl scripts/run-test-suites.pl $(TEST_FLAGS) --skip=$(SKIP_TEST_SUITES)
|
||||
cd ../tf-psa-crypto/tests && perl ../../tests/scripts/run-test-suites.pl $(TEST_FLAGS) --skip=$(SKIP_TEST_SUITES)
|
||||
|
||||
test: check
|
||||
|
||||
|
||||
@@ -40,7 +40,8 @@ GetOptions(
|
||||
|
||||
# All test suites = executable files with a .datax file.
|
||||
my @suites = ();
|
||||
for my $data_file (glob 'test_suite_*.datax') {
|
||||
my @test_dirs = qw(../tf-psa-crypto/tests .);
|
||||
for my $data_file (map {glob "$_/test_suite_*.datax"} @test_dirs) {
|
||||
(my $base = $data_file) =~ s/\.datax$//;
|
||||
push @suites, $base if -x $base;
|
||||
push @suites, "$base.exe" if -e "$base.exe";
|
||||
@@ -82,8 +83,10 @@ sub pad_print_center {
|
||||
print $padchar x( $padlen ), " $string ", $padchar x( $padlen ), "\n";
|
||||
}
|
||||
|
||||
for my $suite (@suites)
|
||||
for my $suite_path (@suites)
|
||||
{
|
||||
my $suite = $suite_path;
|
||||
$suite =~ s!.*/!!;
|
||||
print "$suite ", "." x ( 72 - length($suite) - 2 - 4 ), " ";
|
||||
if( $suite =~ /$skip_re/o ) {
|
||||
print "SKIP\n";
|
||||
@@ -91,7 +94,7 @@ for my $suite (@suites)
|
||||
next;
|
||||
}
|
||||
|
||||
my $command = "$prefix$suite";
|
||||
my $command = "$prefix$suite_path";
|
||||
if( $verbose ) {
|
||||
$command .= ' -v';
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user