From 4a0b2ead5168dd2825f6b8e3e2ddab641539443c Mon Sep 17 00:00:00 2001 From: Fabio Niephaus Date: Fri, 22 Dec 2023 13:14:14 +0100 Subject: [PATCH] Adjust test logging --- .../swa/trufflesqueak/test/runSqueakTests.st | 31 ++++++++++++++++--- 1 file changed, 26 insertions(+), 5 deletions(-) diff --git a/src/de.hpi.swa.trufflesqueak.test/src/de/hpi/swa/trufflesqueak/test/runSqueakTests.st b/src/de.hpi.swa.trufflesqueak.test/src/de/hpi/swa/trufflesqueak/test/runSqueakTests.st index 27cbf7ace..5dae7818f 100644 --- a/src/de.hpi.swa.trufflesqueak.test/src/de/hpi/swa/trufflesqueak/test/runSqueakTests.st +++ b/src/de.hpi.swa.trufflesqueak.test/src/de/hpi/swa/trufflesqueak/test/runSqueakTests.st @@ -10,7 +10,7 @@ SystemBrowser default: Browser. TestCase addSelectorSilently: #run: withMethod: ( TestCase - compile: 'run: aResult FileStream stdout nextPutAll: self asString; cr; flush. aResult runCase: self' + compile: 'run: aResult FileStream stdout nextPut: $.; flush. aResult runCase: self' notifying: nil trailer: (CompiledMethodTrailer empty) ifFail: [ 1 halt ]) method. @@ -5805,21 +5805,42 @@ WorldState addDeferredUIMessage: [ FileStream stdout cr; nextPutAll: 'Test results:'; cr; nextPutAll: result asString; cr; flush. - exitCode := (result hasFailures or: [ result hasErrors ]) ifTrue: [ 1 ] ifFalse: [ 0 ]. - + result hasFailures ifTrue: [ + FileStream stdout nextPutAll: 'Failures:'; cr; flush. + result failures do: [ :ea | FileStream stdout nextPutAll: ea asString; cr ] + FileStream stdout flush. + exitCode := 1. + ] + result hasErrors ifTrue: [ + FileStream stdout nextPutAll: 'Errors:'; cr; flush. + result errors do: [ :ea | FileStream stdout nextPutAll: ea asString; cr ] + FileStream stdout flush. + exitCode := 1. + ] + FileStream stdout cr; nextPutAll: 'Running flaky tests...'; cr; flush. result := TestSuite new addTests: flakyTests; run. FileStream stdout cr; nextPutAll: 'Test results:'; cr; nextPutAll: result asString; cr; flush. - exitCode := result hasErrors ifTrue: [ 1 ] ifFalse: [ exitCode ]. + result hasErrors ifTrue: [ + FileStream stdout nextPutAll: 'Errors:'; cr; flush. + result errors do: [ :ea | FileStream stdout nextPutAll: ea asString; cr ] + FileStream stdout flush. + exitCode := 1. + ] FileStream stdout cr; nextPutAll: 'Running failing tests...'; cr; flush. result := TestSuite new addTests: failingTests; run. FileStream stdout cr; nextPutAll: 'Test results:'; cr; nextPutAll: result asString; cr; flush. - exitCode := result hasPassed ifTrue: [ 1 ] ifFalse: [ exitCode ]. + result hasErrors ifTrue: [ + FileStream stdout nextPutAll: 'Passing tests:'; cr; flush. + result passed do: [ :ea | FileStream stdout nextPutAll: ea asString; cr ] + FileStream stdout flush. + exitCode := 1. + ] Smalltalk quitPrimitive: exitCode ] \ No newline at end of file