From f15c823c4a4912b32cee4fc9f0f2eeaceea63424 Mon Sep 17 00:00:00 2001 From: Colin Walters Date: Thu, 27 Feb 2020 14:05:43 +0000 Subject: [PATCH] kola: Fix syncOptions Regression from d4b252bb7c8b77e73ad6926de70921e95eeb95e5 We need to keep parsing the cosa build, just not actually use it to sync the target options in order to match how the upgrade test works. --- cmd/kola/options.go | 20 +++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-) diff --git a/cmd/kola/options.go b/cmd/kola/options.go index 9af7087b6e..e1fa516816 100644 --- a/cmd/kola/options.go +++ b/cmd/kola/options.go @@ -143,6 +143,8 @@ func init() { // Sync up the command line options if there is dependency func syncOptionsImpl(useCosa bool) error { + var err error + kola.PacketOptions.Board = kola.QEMUOptions.Board kola.PacketOptions.GSOptions = &kola.GCEOptions @@ -169,10 +171,16 @@ func syncOptionsImpl(useCosa bool) error { return err } - if useCosa && kola.Options.CosaBuild != "" { - if err := syncCosaOptions(); err != nil { + if kola.Options.CosaBuild != "" { + kola.CosaBuild, err = cosa.ParseBuild(kola.Options.CosaBuild) + if err != nil { return err } + if useCosa { + if err := syncCosaOptions(); err != nil { + return err + } + } } units, _ := root.PersistentFlags().GetStringSlice("debug-systemd-units") @@ -204,15 +212,9 @@ func syncOptions() error { return syncOptionsImpl(true) } -// syncCosaOptions parses the cosa build and sets unset platform-specific +// syncCosaOptions sets unset platform-specific // options that can be derived from the cosa build metadata func syncCosaOptions() error { - var err error - kola.CosaBuild, err = cosa.ParseBuild(kola.Options.CosaBuild) - if err != nil { - return err - } - switch kolaPlatform { case "qemu-unpriv", "qemu": if kola.QEMUOptions.DiskImage == "" {