Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

vars/kola: Add support for skipping a list of kola tags #159

Merged
merged 1 commit into from
Jun 21, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 9 additions & 2 deletions vars/kola.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
// skipBasicScenarios boolean -- skip basic qemu scenarios (ignored if cosa has https://github.com/coreos/coreos-assembler/pull/3652)
// skipSecureBoot boolean -- skip secureboot tests
// skipUpgrade: boolean -- skip running `cosa kola --upgrades`
// skipKolaTags: []string -- list of kola tags to skip
// build: string -- cosa build ID to target
// platformArgs: string -- platform-specific kola args (e.g. '-p aws --aws-ami ...`)
// extraArgs: string -- additional kola args for `kola run` (e.g. `ext.*`)
Expand Down Expand Up @@ -102,6 +103,12 @@ def call(params = [:]) {
args += " --exttest=${env.WORKSPACE}/${path}"
}

def skipKolaTags = params.get('skipKolaTags', [])

for (tag in skipKolaTags) {
args += " --tag=!${tag}"
}

if (platformArgs != "" || extraArgs != "") {
// There are two cases where we land here:
// 1. The user passed `platformArgs`, which implies we're
Expand All @@ -114,7 +121,7 @@ def call(params = [:]) {
// do a single run in that case.
id = marker == "" ? "kola" : "kola-${marker}"
ids += id
runKola(id, 'run', "--parallel=${parallel} ${args} ${extraArgs}")
runKola(id, 'run', "${args} ${extraArgs} --parallel=${parallel}")
} else {
// Check if the basic tests are registered kola tests or not.
def availableTests = shwrapCapture("kola list --json | jq -r '.[].Name'").split()
Expand All @@ -140,7 +147,7 @@ def call(params = [:]) {
// normal run (without reprovision tests because those require a lot of memory)
id = marker == "" ? "kola" : "kola-${marker}"
ids += id
runKola(id, 'run', "--tag='!reprovision' --parallel=${parallel} ${args}")
runKola(id, 'run', "--tag='!reprovision' ${args} --parallel=${parallel}")
jlebon marked this conversation as resolved.
Show resolved Hide resolved

// re-provision tests (not run with --parallel argument to kola)
id = marker == "" ? "kola-reprovision" : "kola-reprovision-${marker}"
Expand Down