From b892c971cddf16365a529732a30461c2e9349159 Mon Sep 17 00:00:00 2001 From: Matt Rendina Date: Thu, 30 Nov 2017 13:57:36 -0500 Subject: Add convenience function --- vars/utils.groovy | 19 ++----------------- 1 file changed, 2 insertions(+), 17 deletions(-) (limited to 'vars') diff --git a/vars/utils.groovy b/vars/utils.groovy index c10b447..84c5aec 100644 --- a/vars/utils.groovy +++ b/vars/utils.groovy @@ -36,7 +36,6 @@ def concurrent(configs) { println("Size of configs = ${configs.size()}") for (config in configs) { def myconfig = new BuildConfig() // MUST be inside for loop. - //myconfig = config.copy() myconfig = SerializationUtils.clone(config) // Code defined within 'tasks' is eventually executed on a separate node. @@ -51,7 +50,6 @@ def concurrent(configs) { env.PATH = "${tvar}:${env.PATH}" } } - //env.PATH = "${env.WORKSPACE}/_install/bin:${env.PATH}" //withEnv(myconfig.env_vars) { //withEnv(vars) { println("task: env.PATH = ${env.PATH}") @@ -77,12 +75,6 @@ def concurrent(configs) { } finally { // TODO: Test for presence of report file. - //step([$class: 'XUnitBuilder', - // thresholds: [ - // [$class: 'SkippedThreshold', failureThreshold: '0'], - // [$class: 'FailedThreshold', unstableThreshold: '1'], - // [$class: 'FailedThreshold', failureThreshold: '6']], - // tools: [[$class: 'JUnitType', pattern: '*.xml']]]) step([$class: 'XUnitBuilder', thresholds: [ [$class: 'SkippedThreshold', unstableThreshold: "${myconfig.skippedUnstableThresh}"], @@ -102,13 +94,6 @@ def concurrent(configs) { } } //end concurrent - -// standard deep copy implementation -def deepcopy(orig) { - bos = new ByteArrayOutputStream() - oos = new ObjectOutputStream(bos) - oos.writeObject(orig); oos.flush() - bin = new ByteArrayInputStream(bos.toByteArray()) - ois = new ObjectInputStream(bin) - return ois.readObject() +def copy(obj) { + return SerializationUtils.clone(obj) } -- cgit