mirror of
https://github.com/Mbed-TLS/mbedtls-framework.git
synced 2026-09-15 06:39:55 +00:00
Adapt check-doxy-blocks to run for TF-PSA-Crypto
This commit adapts check-doxy-blocks to run for TF-PSA-Crypto. Signed-off-by: Harry Ramsey <[email protected]>
This commit is contained in:
@@ -16,7 +16,10 @@ use strict;
|
|||||||
use File::Basename;
|
use File::Basename;
|
||||||
|
|
||||||
# C/header files in the following directories will be checked
|
# C/header files in the following directories will be checked
|
||||||
my @directories = qw(include/mbedtls library doxygen/input);
|
my @mbedtls_directories = qw(include/mbedtls library doxygen/input);
|
||||||
|
my @tf_psa_crypto_directories = qw(include/psa include/tf-psa-crypto
|
||||||
|
drivers/builtin/include/mbedtls
|
||||||
|
drivers/builtin/src core doxygen/input);
|
||||||
|
|
||||||
# very naive pattern to find directives:
|
# very naive pattern to find directives:
|
||||||
# everything with a backslach except '\0' and backslash at EOL
|
# everything with a backslach except '\0' and backslash at EOL
|
||||||
@@ -53,13 +56,19 @@ sub check_dir {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
open my $project_file, "scripts/project_name.txt" or die "This script must be run from Mbed TLS or TF-PSA-Crypto root directory";
|
||||||
|
my $project = <$project_file>;
|
||||||
|
chomp($project);
|
||||||
|
my @directories;
|
||||||
|
|
||||||
|
if ($project eq "TF-PSA-Crypto") {
|
||||||
|
@directories = @tf_psa_crypto_directories
|
||||||
|
} elsif ($project eq "Mbed TLS") {
|
||||||
|
@directories = @mbedtls_directories
|
||||||
|
}
|
||||||
# Check that the script is being run from the project's root directory.
|
# Check that the script is being run from the project's root directory.
|
||||||
for my $dir (@directories) {
|
for my $dir (@directories) {
|
||||||
if (! -d $dir) {
|
check_dir($dir)
|
||||||
die "This script must be run from the Mbed TLS root directory";
|
|
||||||
} else {
|
|
||||||
check_dir($dir)
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
exit $exit_code;
|
exit $exit_code;
|
||||||
|
|||||||
Reference in New Issue
Block a user