vagrant-libvirt/tests/parse_tests.awk
Darragh Bailey dbbfad2503
Generate test matrix dynamically from bats (#1303)
Extract the tests to be run and generate the matrix dynamically to avoid
needing to update the list within the workflow for each test added.
2021-06-01 17:21:15 +01:00

15 lines
225 B
Awk

BEGIN {
printf "["
previous=""
}
match($0, /@test "(.*)" \{/, arr) {
if ( previous != "" ) {
printf "%s, ",previous
}
previous = sprintf("\"%s\"", arr[1])
}
END {
printf "%s",previous
print "]"
}