Skip to content

Commit

Permalink
Use new functions
Browse files Browse the repository at this point in the history
Signed-off-by: Elena Uziunaite <elena.uziunaite@arm.com>
  • Loading branch information
eleuzi01 committed Nov 7, 2024
1 parent 57f227b commit b2decd6
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 32 deletions.
11 changes: 1 addition & 10 deletions scripts/lcov.sh
Original file line number Diff line number Diff line change
Expand Up @@ -30,16 +30,7 @@ EOF

set -eu

# Project detection
PROJECT_NAME_FILE='./scripts/project_name.txt'
if read -r PROJECT_NAME < "$PROJECT_NAME_FILE"; then :; else
echo "$PROJECT_NAME_FILE does not exist... Exiting..." >&2
exit 1
fi

in_mbedtls_repo () {
test "$PROJECT_NAME" = "Mbed TLS"
}
. ../framework/scripts/project_detection.sh

# Collect stats and build a HTML report.
lcov_library_report () {
Expand Down
18 changes: 3 additions & 15 deletions tests/scripts/all-core.sh
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -131,22 +131,8 @@ pre_set_shell_options () {
set -e -o pipefail -u
}

# For project detection
in_mbedtls_repo () {
test "$PROJECT_NAME" = "Mbed TLS"
}

in_tf_psa_crypto_repo () {
test "$PROJECT_NAME" = "TF-PSA-Crypto"
}

pre_check_environment () {
# For project detection
PROJECT_NAME_FILE='./scripts/project_name.txt'
if read -r PROJECT_NAME < "$PROJECT_NAME_FILE"; then :; else
echo "$PROJECT_NAME_FILE does not exist... Exiting..." >&2
exit 1
fi
. ../../framework/scripts/project_detection.sh

if in_mbedtls_repo || in_tf_psa_crypto_repo; then :; else
echo "Must be run from Mbed TLS / TF-PSA-Crypto root" >&2
Expand Down Expand Up @@ -1029,3 +1015,5 @@ main () {
# We're done.
post_report
}
main
8 changes: 1 addition & 7 deletions tests/scripts/check-generated-files.sh
Original file line number Diff line number Diff line change
Expand Up @@ -22,13 +22,7 @@ EOF
exit
fi

in_mbedtls_repo () {
test -d include -a -d library -a -d programs -a -d tests
}

in_tf_psa_crypto_repo () {
test -d include -a -d core -a -d drivers -a -d programs -a -d tests
}
. ../../framework/scripts/project_detection.sh

if in_mbedtls_repo; then
library_dir='library'
Expand Down

0 comments on commit b2decd6

Please sign in to comment.