diff options
| author | Matt Rendina <mrendina@stsci.edu> | 2017-11-28 11:38:25 -0500 |
|---|---|---|
| committer | Matt Rendina <mrendina@stsci.edu> | 2017-11-28 11:38:25 -0500 |
| commit | c56aa9fc7e0697aad91eb7c5c2892e21363f7d17 (patch) | |
| tree | dbda10d88f36a53601fda81f650a08f068b633cf /vars/utils.groovy | |
| parent | 0230f29c1429e44b56b0e3cfddd0fc872ef477d0 (diff) | |
| download | jscu_refactor-c56aa9fc7e0697aad91eb7c5c2892e21363f7d17.tar.gz | |
Add test report ingestion
Diffstat (limited to 'vars/utils.groovy')
| -rw-r--r-- | vars/utils.groovy | 18 |
1 files changed, 15 insertions, 3 deletions
diff --git a/vars/utils.groovy b/vars/utils.groovy index 24a050a..5d06399 100644 --- a/vars/utils.groovy +++ b/vars/utils.groovy @@ -49,9 +49,21 @@ def concurrent(configs) { unstash "source_tree" sh(script: "ls -al") } //end stage - stage("Test (${myconfig.build_mode})") { - if (myconfig.run_tests) { - println("RUNNING TESTS") + if (myconfig.run_tests) { + try { + stage("Test (${myconfig.build_mode})") { + // Test command(s) here + println("RUNNING TESTS") + } + } + 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']]]) } } } //end withEnv |
