mirror of
https://github.com/Mbed-TLS/mbedtls.git
synced 2025-04-17 11:43:37 +00:00
Fix test suites invoked in the wrong directory
Running test suites from another directory only works when the auto-chdir code in host_test.function is enabled, which is platform-dependent and configuration-dependent. Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com>
This commit is contained in:
parent
282abb507d
commit
71a53b5cc0
@ -85,8 +85,11 @@ sub pad_print_center {
|
|||||||
|
|
||||||
for my $suite_path (@suites)
|
for my $suite_path (@suites)
|
||||||
{
|
{
|
||||||
my $suite = $suite_path;
|
my ($dir, $suite) = ('.', $suite_path);
|
||||||
$suite =~ s!.*/!!;
|
if ($suite =~ m!(.*)/([^/]*)!) {
|
||||||
|
$dir = $1;
|
||||||
|
$suite = $2;
|
||||||
|
}
|
||||||
print "$suite ", "." x ( 72 - length($suite) - 2 - 4 ), " ";
|
print "$suite ", "." x ( 72 - length($suite) - 2 - 4 ), " ";
|
||||||
if( $suite =~ /$skip_re/o ) {
|
if( $suite =~ /$skip_re/o ) {
|
||||||
print "SKIP\n";
|
print "SKIP\n";
|
||||||
@ -94,7 +97,7 @@ for my $suite_path (@suites)
|
|||||||
next;
|
next;
|
||||||
}
|
}
|
||||||
|
|
||||||
my $command = "$prefix$suite_path";
|
my $command = "cd $dir && $prefix$suite";
|
||||||
if( $verbose ) {
|
if( $verbose ) {
|
||||||
$command .= ' -v';
|
$command .= ' -v';
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user