Groovy web console

subscribe to the feed Subscribe
to this
site

t

Published 2 months ago by Anonymous
Actions  ➤ Edit in console Back to console Show/hide line numbers View recent scripts
def get_status_config(fe, mode) {
  if (mode == 'default')
    return "test_status_gg.cfg"
    
  if (mode == 'flc')
    return "test_status_flc.cfg"
    
  if (mode as Set == ['multicore', 'flc'] as Set)
    return "test_status_flc_multicore.cfg"
    
  if (mode == 'multicore')
    return "test_status_multicore.cfg"
    
  return "UNKNOWN CONFIGURATION"
}


def get_compile_args(opt, mode) {
    def args = "--" + "$opt"
    if ("flc" in mode)
        args += " --flc"
    if ("multicore" in mode)
       args += " --multicore"
        
    return args
}


def compile_test(fe, opt, mode) {
  println("Compile " + "$opt" + ": " + "FE:" + "$fe" + ", mode:" +  "$mode")
  println("\t cfg: " + get_status_config(fe, mode))
  println("\t arg: " + get_compile_args(opt, mode))
  println()
}

all_fe = ['gg']
all_optimizations = ['O1', 'O2']




// modes_we_want_to_test = params.arguments

// Uncomment any line
modes_we_want_to_test = ['default', 'flc', 'multicore', ['flc', 'multicore']]
// modes_we_want_to_test = ['default']
// modes_we_want_to_test = ['default', 'flc']
// modes_we_want_to_test = ['flc', 'multicore']



def parallel_jobs = [:]

for (def fe in all_fe) {
    for (def opt in all_optimizations) {
        for (def mode in modes_we_want_to_test) {
            parallel_jobs["$fe" + "$opt" + "$mode"] = compile_test(fe, opt, mode)
        }
    }
}