Skip to content

Commit

Permalink
Merge pull request #9764 from eleuzi01/issue-39-backport
Browse files Browse the repository at this point in the history
[Backport 3.6] Add project and branch detection in shell
  • Loading branch information
davidhorstmann-arm authored Nov 27, 2024
2 parents e60b395 + 695810a commit cbb5021
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 19 deletions.
2 changes: 1 addition & 1 deletion framework
13 changes: 3 additions & 10 deletions scripts/lcov.sh
Original file line number Diff line number Diff line change
Expand Up @@ -28,18 +28,11 @@ EOF
# Copyright The Mbed TLS Contributors
# SPDX-License-Identifier: Apache-2.0 OR GPL-2.0-or-later

set -eu
# This script must be invoked from the project's root.

# 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
set -eu

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
3 changes: 2 additions & 1 deletion tests/scripts/all.sh
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@

# This script must be invoked from the project's root.

source framework/scripts/all-core.sh
FRAMEWORK="$PWD/framework"
source $FRAMEWORK/scripts/all-core.sh

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 cbb5021

Please sign in to comment.