quickSelfTest/RunUnitTests.st
changeset 549 57af1d2ef11e
parent 548 54b9fecb0bc9
child 550 e8b3552904ba
--- a/quickSelfTest/RunUnitTests.st	Thu Mar 28 15:25:46 2019 +0100
+++ b/quickSelfTest/RunUnitTests.st	Thu Mar 28 15:57:11 2019 +0100
@@ -222,22 +222,28 @@
     self logInfo:'%1 unit test(s) collected' with:(unitTestSuite tests size).
 
     self logInfo:'start tests...'.
-    result := unitTestSuite
-	run:TestResultStX new
-	beforeEachDo:[:test |
-	    self logInfo:'Run "%1"' with:test printString
-	]
-	afterEachDo:[:test :result|
-	    |execTime status|
+    [
+	result :=
+	    unitTestSuite
+		run:TestResultStX new
+		beforeEachDo:[:test |
+		    self logInfo:'Run "%1"' with:test printString
+		]
+		afterEachDo:[:test :result|
+		    |execTime status|
 
-	    execTime := result lastOutcome executionTimeDuration.
-	    status := result lastOutcome result.
-	    self logInfo:'   %1 (%2)' with:status with:execTime.
-	    (status == TestResult stateFail or:[status == TestResult stateError]) ifTrue:[
-		self logInfo:'   ==================='.
-	    ]
-	]
-	debug:debug.
+		    execTime := result lastOutcome executionTimeDuration.
+		    status := result lastOutcome result.
+		    self logInfo:'   %1 (%2)' with:status with:execTime.
+		    (status == TestResult stateFail or:[status == TestResult stateError]) ifTrue:[
+			self logInfo:'   ==================='.
+		    ]
+		]
+		debug:debug.
+    ] ifCurtailed:[
+	self logWarning:'aborted in:.'.
+	thisContext fullPrintAllOn:Stderr.
+    ].
 
     self logInfo:'tests finished.'.