Leonardo Sandoval | 9dfdd1b | 2020-08-06 17:08:11 -0500 | [diff] [blame] | 1 | #!/usr/bin/env bash |
Fathi Boudra | 422bf77 | 2019-12-02 11:10:16 +0200 | [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. |
Fathi Boudra | 422bf77 | 2019-12-02 11:10:16 +0200 | [diff] [blame] | 4 | # |
| 5 | # SPDX-License-Identifier: BSD-3-Clause |
| 6 | # |
| 7 | |
| 8 | # Decode test description and extract TF build configuration, run configuration, |
| 9 | # test group etc. |
| 10 | # |
| 11 | # See gen_test_desc.py |
| 12 | |
| 13 | set -e |
| 14 | |
| 15 | ci_root="$(readlink -f "$(dirname "$0")/..")" |
| 16 | source "$ci_root/utils.sh" |
| 17 | |
| 18 | test_desc="${test_desc:-$TEST_DESC}" |
| 19 | test_desc="${test_desc:?}" |
| 20 | |
| 21 | # Strip test suffix |
| 22 | test_desc="${test_desc%%.test}" |
| 23 | |
| 24 | lhs="$(echo "$test_desc" | awk -F: '{print $1}')" |
| 25 | rhs="$(echo "$test_desc" | awk -F: '{print $2}')" |
| 26 | |
| 27 | test_group="$(echo "$lhs" | awk -F% '{print $2}')" |
| 28 | build_config="$(echo "$lhs" | awk -F% '{print $3}')" |
| 29 | run_config="${rhs%.test}" |
| 30 | test_config="$(cat $workspace/TEST_DESC)" |
| 31 | |
| 32 | env_file="$workspace/env" |
| 33 | rm -f "$env_file" |
| 34 | |
| 35 | emit_env "BUILD_CONFIG" "$build_config" |
| 36 | emit_env "RUN_CONFIG" "$run_config" |
| 37 | emit_env "TEST_CONFIG" "$test_config" |
| 38 | emit_env "TEST_GROUP" "$test_group" |
Zelalem | 219df41 | 2020-05-17 19:21:20 -0500 | [diff] [blame] | 39 | emit_env "CC_ENABLE" "$cc_enable" |
Fathi Boudra | 422bf77 | 2019-12-02 11:10:16 +0200 | [diff] [blame] | 40 | |
| 41 | # Default binary mode. This would usually come from the build package for FVP |
| 42 | # runs, but is provided for LAVA jobs. |
| 43 | emit_env "BIN_MODE" "release" |