Brad Bishop | bec4ebc | 2022-08-03 09:55:16 -0400 | [diff] [blame^] | 1 | #! /bin/bash |
| 2 | |
| 3 | # This script is expecting an input of machine name, optionally followed by a |
| 4 | # colon and a list of one or more parameters separated by commas between |
| 5 | # brackets. For example, the following are acceptable: |
| 6 | # corstone500 |
| 7 | # fvp-base: [testimage] |
| 8 | # qemuarm64-secureboot: [clang, glibc, testimage] |
| 9 | # |
| 10 | # Turn this list into a series of yml files separated by colons to pass to kas |
| 11 | |
| 12 | set -e -u |
| 13 | |
| 14 | FILES="ci/$(echo $1 | cut -d ':' -f 1).yml" |
| 15 | |
| 16 | for i in $(echo $1 | cut -s -d ':' -f 2 | sed 's/[][,]//g'); do |
| 17 | # Given that there are no yml files for gcc or glibc, as those are the |
| 18 | # defaults, we can simply ignore those parameters. They are necessary |
| 19 | # to pass in so that matrix can correctly setup all of the permutations |
| 20 | # of each individual run. |
| 21 | if [[ $i == 'none' || $i == 'gcc' || $i == 'glibc' || $i == 'uboot' ]]; then |
| 22 | continue |
| 23 | fi |
| 24 | FILES+=":ci/$i.yml" |
| 25 | done |
| 26 | |
| 27 | echo $FILES |