Leonardo Sandoval | 9dfdd1b | 2020-08-06 17:08:11 -0500 | [diff] [blame] | 1 | #!/usr/bin/env bash |
Zelalem | e9e8148 | 2020-07-10 15:18:46 -0500 | [diff] [blame] | 2 | # |
Leonardo Sandoval | 579c737 | 2020-10-23 15:23:32 -0500 | [diff] [blame] | 3 | # Copyright (c) 2019-2020 Arm Limited. All rights reserved. |
Zelalem | e9e8148 | 2020-07-10 15:18:46 -0500 | [diff] [blame] | 4 | # |
| 5 | # SPDX-License-Identifier: BSD-3-Clause |
| 6 | # |
| 7 | |
| 8 | test_setup() { |
| 9 | # Coverity scan only need to run on debug builds |
| 10 | echo "Building only in DEBUG mode." |
| 11 | set_hook_var "bin_mode" "debug" |
| 12 | } |
| 13 | |
| 14 | pre_tf_build() { |
| 15 | wrapper="scan_build" setup_tf_build_wrapper |
| 16 | } |
| 17 | |
| 18 | post_tf_archive() { |
| 19 | # Save scan-build reports to artefacts directory for offline analysis. |
| 20 | find $workspace -name scan-build-reports -exec cp -rf {} $archive \; &> /dev/null |
| 21 | } |