Fix basic-build-test.sh to work in different env

Also added possibility to run only unit tests
This commit is contained in:
Teppo Järvelin
2019-11-25 15:22:42 +02:00
parent a3877007e6
commit e06e039f7a
2 changed files with 41 additions and 10 deletions

View File

@@ -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";
}
}
}