mirror of
https://github.com/flatcar/scripts.git
synced 2025-08-09 14:06:58 +02:00
Merge pull request #332 from flatcar-linux/krnowak/fix-instance-tests
ci-automation: Do not rerun tests on unrelated instances
This commit is contained in:
commit
7051838a76
@ -155,6 +155,9 @@ function filter_prefixed_tests() {
|
|||||||
local -n results="${var_name}"
|
local -n results="${var_name}"
|
||||||
local name
|
local name
|
||||||
local stripped_name
|
local stripped_name
|
||||||
|
# clear the array, so it will contain results of current filtering
|
||||||
|
# only
|
||||||
|
results=()
|
||||||
for name; do
|
for name; do
|
||||||
stripped_name="${name#extra-test.\[${prefix}\].}"
|
stripped_name="${name#extra-test.\[${prefix}\].}"
|
||||||
if [[ "${stripped_name}" != "${name}" ]]; then
|
if [[ "${stripped_name}" != "${name}" ]]; then
|
||||||
@ -181,6 +184,9 @@ function filter_out_prefixed_tests() {
|
|||||||
local var_name="${1}"; shift
|
local var_name="${1}"; shift
|
||||||
local -n results="${var_name}"
|
local -n results="${var_name}"
|
||||||
local name
|
local name
|
||||||
|
# clear the array, so it will contain results of current filtering
|
||||||
|
# only
|
||||||
|
results=()
|
||||||
for name; do
|
for name; do
|
||||||
if [[ "${name#extra-test.}" = "${name}" ]]; then
|
if [[ "${name#extra-test.}" = "${name}" ]]; then
|
||||||
results+=( "${name}" )
|
results+=( "${name}" )
|
||||||
@ -363,7 +369,7 @@ function run_kola_tests_on_instances() {
|
|||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
|
|
||||||
local -a main_tests
|
local main_tests=()
|
||||||
|
|
||||||
filter_out_prefixed_tests main_tests "${@}"
|
filter_out_prefixed_tests main_tests "${@}"
|
||||||
if [[ "${#main_tests[@]}" -gt 0 ]]; then
|
if [[ "${#main_tests[@]}" -gt 0 ]]; then
|
||||||
|
Loading…
Reference in New Issue
Block a user