@@ -203,6 +203,7 @@ approvalTest = tasks.register("approvalTest", Test) {
203203 dependsOn copyJarToBin, copyRunScripts
204204
205205 def output = -1
206+ def weRanATest = false
206207 def runningOs = OS_NAME . toLowerCase()
207208
208209 if (runningOs == " linux" ) {
@@ -214,21 +215,27 @@ approvalTest = tasks.register("approvalTest", Test) {
214215
215216 def proc = " ./approvaltest" . execute()
216217 proc. waitForProcessOutput(System . out, System . err)
218+ weRanATest = true
217219 }
218220 if (runningOs. contains(" windows" )) {
219221 println " Windows detected"
220222 def proc = " ./approvaltestWin.cmd" . execute()
221223 proc. waitForProcessOutput(System . out, System . err)
224+ weRanATest = true
222225 }
223226
224- output = new BuildHelper (). compareFiles(approvalExpectedOutput, approvalActualOutput, true )
225- println " exit from compare: ${ output} "
226-
227- if (output != 0 ) {
228- println " *** FAIL ***"
229- throw new StopExecutionException (" ${ approvalExpectedOutput} and ${ approvalActualOutput} are different" )
227+ if (! weRanATest){
228+ println " No prepared test for the OS detected: ${ runningOs} - skipping"
230229 } else {
231- println " ${ approvalExpectedOutput} matches ${ approvalActualOutput} - PASS"
230+ output = new BuildHelper (). compareFiles(approvalExpectedOutput, approvalActualOutput, true )
231+ println " exit from compare: ${ output} "
232+
233+ if (output != 0 ) {
234+ println " *** FAIL ***"
235+ throw new StopExecutionException (" ${ approvalExpectedOutput} and ${ approvalActualOutput} are different" )
236+ } else {
237+ println " ${ approvalExpectedOutput} matches ${ approvalActualOutput} - PASS"
238+ }
232239 }
233240}
234241
0 commit comments