Skip to content

Commit

Permalink
Adapt check-doxy-blocks to run for TF-PSA-Crypto
Browse files Browse the repository at this point in the history
This commit adapts check-doxy-blocks to run for TF-PSA-Crypto.

Signed-off-by: Harry Ramsey <[email protected]>
  • Loading branch information
Harry-Ramsey committed Jan 10, 2025
1 parent fe852d3 commit 9f29294
Showing 1 changed file with 12 additions and 6 deletions.
18 changes: 12 additions & 6 deletions scripts/check-doxy-blocks.pl
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,8 @@
use File::Basename;

# 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 drivers core doxygen/input);

# very naive pattern to find directives:
# everything with a backslach except '\0' and backslash at EOL
Expand Down Expand Up @@ -53,13 +54,18 @@ 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>;
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.
for my $dir (@directories) {
if (! -d $dir) {
die "This script must be run from the Mbed TLS root directory";
} else {
check_dir($dir)
}
check_dir($dir)
}

exit $exit_code;
Expand Down

0 comments on commit 9f29294

Please sign in to comment.