--- a/quickSelfTest/RunUnitTests.st Thu Mar 28 14:06:01 2019 +0100
+++ b/quickSelfTest/RunUnitTests.st Thu Mar 28 14:39:52 2019 +0100
@@ -121,51 +121,55 @@
(excludedUnitTestClassNames includes:eachClassName) ifTrue:[
self logInfo:'exclude test "%1".' with:eachClassName.
] ifFalse:[
- (corruptedUnitTestClassNames includes:eachClassName) ifTrue:[
- self logWarning:'test "%1" is marked as corrupted, please fix' with:eachClassName.
+ (runTestCases notEmptyOrNil and:[(runTestCases includes:eachClassName) not]) ifTrue:[
+ self logInfo:'not selected: "%1".' with:eachClassName.
] ifFalse:[
- (eachClassName notNil
- and:[
- "/ skip non test class classes
- (#(
- 'stx_goodies_regression'
- ) includes:eachClassName) not
- and:[
- forceTestCase isNil
- or:[forceTestCase = eachClassName
- or:[forceTestCase = ((eachClassName subStrings:'::') lastIfEmpty:nil)]]
- ]]) ifTrue:[
- eachClass := Smalltalk at:eachClassName.
+ (corruptedUnitTestClassNames includes:eachClassName) ifTrue:[
+ self logWarning:'test "%1" is marked as corrupted, please fix' with:eachClassName.
+ ] ifFalse:[
+ (eachClassName notNil
+ and:[
+ "/ skip non test class classes
+ (#(
+ 'stx_goodies_regression'
+ ) includes:eachClassName) not
+ and:[
+ forceTestCase isNil
+ or:[forceTestCase = eachClassName
+ or:[forceTestCase = ((eachClassName subStrings:'::') lastIfEmpty:nil)]]
+ ]]) ifTrue:[
+ eachClass := Smalltalk at:eachClassName.
- useCompiledUnitTestClasses ifFalse:[
- "here we want to test the jitter code
- therfore we file in, exit if the class is already present somwhow"
- eachClass notNil ifTrue:[
- self logWarning:'test class "%1" was already present as stc-compiled class before file in.' with:eachClassName.
- Smalltalk isSmalltalkDevelopmentSystem ifFalse:[
- Smalltalk exit:1.
+ useCompiledUnitTestClasses ifFalse:[
+ "here we want to test the jitter code
+ therfore we file in, exit if the class is already present somwhow"
+ eachClass notNil ifTrue:[
+ self logWarning:'test class "%1" was already present as stc-compiled class before file in.' with:eachClassName.
+ Smalltalk isSmalltalkDevelopmentSystem ifFalse:[
+ Smalltalk exit:1.
+ ].
].
+
+ eachClass := Smalltalk
+ fileInClass:eachClassName
+ package:'stx:goodies/regression'.
].
- eachClass := Smalltalk
- fileInClass:eachClassName
- package:'stx:goodies/regression'.
- ].
-
- eachClass notNil ifTrue:[
- (eachClass isTestCaseLike
- and:[eachClass isAbstract not]) ifTrue:[
- self logInfo:'added test "%1".' with:eachClassName.
- unitTestSuite addTest:eachClass suite.
+ eachClass notNil ifTrue:[
+ (eachClass isTestCaseLike
+ and:[eachClass isAbstract not]) ifTrue:[
+ self logInfo:'added test "%1".' with:eachClassName.
+ unitTestSuite addTest:eachClass suite.
+ ] ifFalse:[
+ self logInfo:'not a test "%1" (abstract or something else).'
+ with:eachClassName.
+ ].
] ifFalse:[
- self logInfo:'not a test "%1" (abstract or something else).'
- with:eachClassName.
+ self logWarning:'test class "%1" is not loaded.' with:eachClassName.
].
] ifFalse:[
- self logWarning:'test class "%1" is not loaded.' with:eachClassName.
+ self logInfo:'skipped test "%1".' with:eachClassName.
].
- ] ifFalse:[
- self logInfo:'skipped test "%1".' with:eachClassName.
].
].
].
@@ -344,17 +348,23 @@
!RunUnitTests class methodsFor:'logging'!
log:aString type:aType
- Transcript notNil ifTrue:[
- Transcript showCR:'%1 [%2] : %3'
- with:Timestamp now printString
+ |fmt msg|
+
+ fmt := '%1 RunUnitTests [%2]: %3'.
+ fmt := 'RunUnitTests [%2]: %3'.
+
+ msg := fmt
+ bindWith:Timestamp now printString
with:(aType printString asLowercase "paddedTo:'warning' size")
with:aString.
+
+ Transcript notNil ifTrue:[
+ Transcript showCR:msg.
^ self
].
- Stderr showCR:'%1 [%2] : %3'
- with:Timestamp now printString
- with:(aType printString asLowercase paddedTo:'warning' size)
- with:aString.
+ Stderr notNil ifTrue:[
+ Stderr showCR:msg.
+ ].
"Modified: / 26-03-2019 / 18:53:48 / Claus Gittinger"
!