blob: ac2eb7d3f1a268c3e1fdecee249243a3ecf416b3 [file] [log] [blame]
Leonardo Sandoval9dfdd1b2020-08-06 17:08:11 -05001#!/usr/bin/env bash
Fathi Boudra422bf772019-12-02 11:10:16 +02002#
Leonardo Sandoval579c7372020-10-23 15:23:32 -05003# Copyright (c) 2019-2020 Arm Limited. All rights reserved.
Fathi Boudra422bf772019-12-02 11:10:16 +02004#
5# SPDX-License-Identifier: BSD-3-Clause
6#
7
8set -e
9
10# Generate test report
11if [ "$CI_ROOT" ]; then
12 # Gather Coverity scan summary if it was performed as part of this job
13 if [ "$(find -maxdepth 1 -name '*coverity*.test' -type f | wc -l)" != 0 ]; then
14 if ! "$CI_ROOT/script/coverity_summary.py" "$BUILD_URL" > coverity.data; then
15 rm -f coverity.data
16 fi
17 fi
18
Leonardo Sandoval55d5c8c2021-01-20 10:51:18 -060019 # set proper jobs names for test generation report script
20 if echo "$JENKINS_URL" | grep -q "arm.com"; then
21 worker_job="${worker_job:-tf-worker}"
22 lava_job="${lava_job:-tf-build-for-lava}"
23 else
24 worker_job="${worker_job:-tf-a-builder}"
25 lava_job="${lava_job:-tf-a-builder}"
26 fi
27
Fathi Boudra422bf772019-12-02 11:10:16 +020028 "$CI_ROOT/script/gen_test_report.py" \
Leonardo Sandoval55d5c8c2021-01-20 10:51:18 -060029 --job "${worker_job}" \
30 --build-job "${lava_job}" \
Fathi Boudra422bf772019-12-02 11:10:16 +020031 --meta-data clone.data \
32 --meta-data override.data \
33 --meta-data inject.data \
34 --meta-data html:coverity.data \
35 || true
Leonardo Sandoval5d9d2762021-02-02 10:06:33 -060036
37 # TODO: Open CI does not (yet) support the merge of code coverage report into main
38 # report, so for the moment condition this task under the Jenkins Arm
39 # environment.
40 if echo "$JENKINS_URL" | grep -q "arm.com"; then
41 source $CI_ROOT/script/gen_merge_report.sh "${WORKSPACE}/report.json" \
42 "${WORKSPACE}/report.html"
43 fi
Fathi Boudra422bf772019-12-02 11:10:16 +020044fi