From 987da0751a33180e0889ba9f36f128d4ab67eb42 Mon Sep 17 00:00:00 2001 From: Fabio Niephaus Date: Fri, 22 Dec 2023 09:02:15 +0100 Subject: [PATCH] Avoid progress bars --- .../swa/trufflesqueak/test/runSqueakTests.st | 46 ++++++++++--------- 1 file changed, 25 insertions(+), 21 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 328ddf5d8..53557b156 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 @@ -2,8 +2,6 @@ FileStream stdout nextPutAll: 'Preparing image for testing...'; cr; flush. -"ToolSet default: CommandLineToolSet." - Utilities authorName: 'TruffleSqueak'; setAuthorInitials: 'TruffleSqueak'. @@ -5797,25 +5795,31 @@ failingTests := { SmallIntegerTest selector: #testPrintString. }. -FileStream stdout cr; nextPutAll: 'Running passing tests...'; cr; flush. -result := TestSuite new addTests: passingTests; run. -FileStream stdout cr; - nextPutAll: 'Test results:'; cr; - nextPutAll: result asString; cr; flush. -exitCode := (result hasFailures or: [ result hasErrors ]) ifTrue: [ 1 ] ifFalse: [ 0 ]. +WorldState addDeferredUIMessage: [ + "Avoid showing progress bars." + Project current instVarNamed: #uiManager put: DummyUIManager new. + "ToolSet default: CommandLineToolSet." + + FileStream stdout cr; nextPutAll: 'Running passing tests...'; cr; flush. + result := TestSuite new addTests: passingTests; run. + FileStream stdout cr; + nextPutAll: 'Test results:'; cr; + nextPutAll: result asString; cr; flush. + exitCode := (result hasFailures or: [ result hasErrors ]) ifTrue: [ 1 ] ifFalse: [ 0 ]. -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 ]. + 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 ]. -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 ]. + 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 ]. -Smalltalk quitPrimitive: exitCode \ No newline at end of file + "Smalltalk quitPrimitive: exitCode" +] \ No newline at end of file