Use new functions
Signed-off-by: Elena Uziunaite <elena.uziunaite@arm.com>
diff --git a/scripts/lcov.sh b/scripts/lcov.sh
index 79c5c9f..2b650f1 100755
--- a/scripts/lcov.sh
+++ b/scripts/lcov.sh
@@ -30,16 +30,7 @@
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 () {
diff --git a/tests/scripts/check-generated-files.sh b/tests/scripts/check-generated-files.sh
index 35990d0..865e247 100755
--- a/tests/scripts/check-generated-files.sh
+++ b/tests/scripts/check-generated-files.sh
@@ -22,13 +22,7 @@
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
if [ -d tf-psa-crypto ]; then