diff options
author | Karl Zhang <karl.zhang@arm.com> | 2020-07-10 16:24:45 +0800 |
---|---|---|
committer | Karl Zhang <karl.zhang@arm.com> | 2020-07-10 16:31:38 +0800 |
commit | f6f467e959ade17f77809ad859c1db38c9c3be20 (patch) | |
tree | cea3f8b2a12704da7d2cc1f5f1658aa762b51dcb | |
parent | 6e7d9028c85e3a294f542ff2d13c65c6f9cf19b8 (diff) | |
download | tf-m-ci-scripts-infra-health.tar.gz |
CodeCoverage: Add CODE_COVERAGE_EN flag in buildinfra-health
Add CODE_COVERAGE_EN for Cmake command to TF-M when build with code
coverage feature required.
Signed-off-by: Karl Zhang <karl.zhang@arm.com>
Change-Id: I5715440a364dae239d3442006566c4036944629b
-rw-r--r-- | jenkins/ci.jpl | 1 | ||||
-rwxr-xr-x | run-build.sh | 6 |
2 files changed, 7 insertions, 0 deletions
diff --git a/jenkins/ci.jpl b/jenkins/ci.jpl index 28671a1c..282d7784 100644 --- a/jenkins/ci.jpl +++ b/jenkins/ci.jpl @@ -48,6 +48,7 @@ python3 ./configs.py -g ${filter_group.replace(" ", " -g ")} ${config} params += string(name: 'CMSIS_VERSION', value: env.CMSIS_VERSION) params += string(name: 'MBEDCRYPTO_VERSION', value: env.MBEDCRYPTO_VERSION) params += string(name: 'CODE_REPO', value: env.CODE_REPO) + params += string(name: 'CODE_COVERAGE_EN', value: env.CODE_COVERAGE_EN) return { -> results def build_res = build(job: 'tf-m-build-config', parameters: params, propagate: false) def build_info = [build_res, config, params_collection] diff --git a/run-build.sh b/run-build.sh index a7f84f2a..219df37d 100755 --- a/run-build.sh +++ b/run-build.sh @@ -34,6 +34,12 @@ make --version set -ex build_commands=$(python3 tf-m-ci-scripts/configs.py -b -g all $CONFIG_NAME) +if [ $CODE_COVERAGE_EN = "TRUE" ] && [[ $CONFIG_NAME =~ "GNUARM" ]] ; then + build_commands=${build_commands/-DCOMPILER=GNUARM/-DCOMPILER=GNUARM -DCODE_COVERAGE_EN=TRUE} + echo "Flag: Add compiler flag for build with code coverage supported." + echo $build_commands +fi + if [ -z "$build_commands" ] ; then echo "No build commands found." exit 1 |