mirror of
https://github.com/Mbed-TLS/mbedtls.git
synced 2026-05-09 03:04:24 +02:00
Fix basic-build-test.sh to work in different env
Also added possibility to run only unit tests
This commit is contained in:
@@ -213,11 +213,15 @@ if ( not defined($action) ){ die $usage; }
|
||||
# Check the config file is present
|
||||
if (! -f $config_file) {
|
||||
|
||||
chdir '..' or die;
|
||||
|
||||
# Confirm this is the project root directory and try again
|
||||
if ( !(-d 'scripts' && -d 'include' && -d 'library' && -f $config_file) ) {
|
||||
die "If no file specified, must be run from the project root or scripts directory.\n";
|
||||
if ( -d 'importer' && -d 'inc' && -d 'src') {
|
||||
$config_file = "inc/mbedtls/config.h";
|
||||
}
|
||||
else {
|
||||
chdir '..' or die;
|
||||
# Confirm this is the project root directory and try again
|
||||
if ( !(-d 'scripts' && -d 'include' && -d 'library' && -f $config_file) ) {
|
||||
die "If no file specified, must be run from the project root or scripts directory.\n";
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user