Skip to content

Commit c7daa44

Browse files
author
Alan Christie
committed
- PipelineTester now treats duplicate tests as warnings
1 parent c0ffef2 commit c7daa44

File tree

1 file changed

+13
-4
lines changed

1 file changed

+13
-4
lines changed

src/groovy/PipelineTester.groovy

Lines changed: 13 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -79,6 +79,7 @@ class Tester {
7979
int testsExecuted = 0
8080
int testsIgnored = 0
8181
int filesUsed = 0
82+
int numWarnings = 0
8283
def failedTests = []
8384
def observedFiles = []
8485

@@ -129,10 +130,7 @@ class Tester {
129130
// this indicates there are pipelines in different projects
130131
// that will clash if combined.
131132
if (observedFiles.contains(currentTestFilename)) {
132-
err("Duplicate pipline ($currentTestFilename)")
133-
recordFailedTest("-")
134-
separate()
135-
continue
133+
warning("Duplicate pipline ($currentTestFilename)")
136134
}
137135
observedFiles.add(currentTestFilename)
138136

@@ -225,6 +223,7 @@ class Tester {
225223
println "Tests : " + sprintf('%4d', testsExecuted)
226224
println "Tests ignored: " + sprintf('%4d', testsIgnored)
227225
println "Tests failed : " + sprintf('%4d', failedTests.size())
226+
println "Warnings : " + sprintf('%4d', numWarnings)
228227
separate()
229228
println "Passed: ${testPassed.toString().toUpperCase()}"
230229

@@ -317,6 +316,16 @@ class Tester {
317316

318317
}
319318

319+
/**
320+
* Print a warning message (and counts it).
321+
*/
322+
private warning(String msg) {
323+
324+
println "WARNING: $msg"
325+
numWarnings += 1
326+
327+
}
328+
320329
/**
321330
* Dumps the pipeline command's output, used when there's been an error.
322331
*/

0 commit comments

Comments
 (0)