Skip to content

Commit

Permalink
vars/kola: deprecate --basic-qemu-scenarios
Browse files Browse the repository at this point in the history
The argument for --basic-qemu-scenarios has been deprecated.
Depending on the version of cosa, the tests that would be skipped by these args are
now formal kola tests. And to skip them you can use --denylist-test commands.

skipSecureBoot now translates to  --denylist-test *.uefi-secure
  • Loading branch information
prestist committed Mar 11, 2024
1 parent 0e60cc4 commit ed73e05
Showing 1 changed file with 19 additions and 8 deletions.
27 changes: 19 additions & 8 deletions vars/kola.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
// arch: string -- the target architecture
// cosaDir: string -- cosa working directory
// parallel: integer -- number of tests to run in parallel (default: # CPUs)
// skipBasicScenarios boolean -- skip basic qemu scenarios
// 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`
// build: string -- cosa build ID to target
Expand Down Expand Up @@ -116,15 +116,26 @@ def call(params = [:]) {
ids += id
runKola(id, 'run', "--parallel=${parallel} ${args} ${extraArgs}")
} else {
// basic run
if (!params['skipBasicScenarios']) {
id = marker == "" ? "kola-basic" : "kola-basic-${marker}"
ids += id
def skipSecureBootArg = ""
// Check if the basic tests are registered kola tests or not.
def availableTests = shwrapCapture("kola list --json | jq -r '.[].Name'").split()
// This essentially checks if the running has cosa https://github.com/coreos/coreos-assembler/pull/3652
def basicScenariosBuiltIn = "basic.nvme" in availableTests

if (basicScenariosBuiltIn) {
if (params['skipSecureBoot']) {
skipSecureBootArg = "--skip-secure-boot"
// skip secureboot tests using kola's denylist
args += "--denylist-test *.uefi-secure"
}
} else {
if (!params['skipBasicScenarios']) {
id = marker == "" ? "kola-basic" : "kola-basic-${marker}"
ids += id
def skipSecureBootArg = ""
if (params['skipSecureBoot']) {
skipSecureBootArg = "--skip-secure-boot"
}
runKola(id, 'run', "--basic-qemu-scenarios ${skipSecureBootArg}")
}
runKola(id, 'run', "--basic-qemu-scenarios ${skipSecureBootArg}")
}
// normal run (without reprovision tests because those require a lot of memory)
id = marker == "" ? "kola" : "kola-${marker}"
Expand Down

0 comments on commit ed73e05

Please sign in to comment.