diff options
| author | Matt Rendina <mrendina@stsci.edu> | 2017-11-30 13:57:36 -0500 |
|---|---|---|
| committer | Matt Rendina <mrendina@stsci.edu> | 2017-11-30 13:57:36 -0500 |
| commit | b892c971cddf16365a529732a30461c2e9349159 (patch) | |
| tree | 326ca1b19a6820ad281f95537349ddeec48003b2 /vars/utils.groovy | |
| parent | 7258f570c501eb673ff2681eb4ec7086dbdd8971 (diff) | |
| download | jscu_refactor-b892c971cddf16365a529732a30461c2e9349159.tar.gz | |
Add convenience function
Diffstat (limited to 'vars/utils.groovy')
| -rw-r--r-- | vars/utils.groovy | 19 |
1 files changed, 2 insertions, 17 deletions
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) } |
