From bbb41f7afb5be7d674a5eb95c8ce59e2dabfe9e0 Mon Sep 17 00:00:00 2001 From: Thomas Daubney Date: Tue, 5 Dec 2023 11:42:51 +0000 Subject: [PATCH] Modify lcov.sh to use new project name file Signed-off-by: Thomas Daubney --- scripts/lcov.sh | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/scripts/lcov.sh b/scripts/lcov.sh index 9a0c58243f..faf14f34e8 100755 --- a/scripts/lcov.sh +++ b/scripts/lcov.sh @@ -30,10 +30,12 @@ EOF set -eu -# Repository detection -in_mbedtls_build_dir () { - test -d library -} +# Project detection +PROJECT_NAME_FILE='./scripts/project_name.txt' + +in_mbedtls_repo () { + grep -Fxq "Mbed TLS" "$PROJECT_NAME_FILE" + } # Collect stats and build a HTML report. lcov_library_report () { @@ -68,7 +70,7 @@ if [ $# -gt 0 ] && [ "$1" = "--help" ]; then exit fi -if in_mbedtls_build_dir; then +if in_mbedtls_repo; then library_dir='library' title='Mbed TLS' else