*** empty log message ***
authorClaus Gittinger <cg@exept.de>
Thu, 28 Mar 2019 14:39:52 +0100
changeset 5488846155dc785
parent 547 72e5307ece32
child 549 54b9fecb0bc9
*** empty log message ***
quickSelfTest/RunUnitTests.st
     1.1 --- a/quickSelfTest/RunUnitTests.st	Thu Mar 28 14:06:01 2019 +0100
     1.2 +++ b/quickSelfTest/RunUnitTests.st	Thu Mar 28 14:39:52 2019 +0100
     1.3 @@ -121,51 +121,55 @@
     1.4  	(excludedUnitTestClassNames includes:eachClassName) ifTrue:[
     1.5  	    self logInfo:'exclude test "%1".' with:eachClassName.
     1.6  	] ifFalse:[
     1.7 -	    (corruptedUnitTestClassNames includes:eachClassName) ifTrue:[
     1.8 -		self logWarning:'test "%1" is marked as corrupted, please fix' with:eachClassName.
     1.9 +	    (runTestCases notEmptyOrNil and:[(runTestCases includes:eachClassName) not]) ifTrue:[
    1.10 +		self logInfo:'not selected: "%1".' with:eachClassName.
    1.11  	    ] ifFalse:[
    1.12 -		(eachClassName notNil
    1.13 -		and:[
    1.14 -		    "/ skip non test class classes
    1.15 -		    (#(
    1.16 -			'stx_goodies_regression'
    1.17 -		    ) includes:eachClassName) not
    1.18 -		and:[
    1.19 -		    forceTestCase isNil
    1.20 -		    or:[forceTestCase = eachClassName
    1.21 -		    or:[forceTestCase = ((eachClassName subStrings:'::') lastIfEmpty:nil)]]
    1.22 -		]]) ifTrue:[
    1.23 -		    eachClass := Smalltalk at:eachClassName.
    1.24 +		(corruptedUnitTestClassNames includes:eachClassName) ifTrue:[
    1.25 +		    self logWarning:'test "%1" is marked as corrupted, please fix' with:eachClassName.
    1.26 +		] ifFalse:[
    1.27 +		    (eachClassName notNil
    1.28 +		    and:[
    1.29 +			"/ skip non test class classes
    1.30 +			(#(
    1.31 +			    'stx_goodies_regression'
    1.32 +			) includes:eachClassName) not
    1.33 +		    and:[
    1.34 +			forceTestCase isNil
    1.35 +			or:[forceTestCase = eachClassName
    1.36 +			or:[forceTestCase = ((eachClassName subStrings:'::') lastIfEmpty:nil)]]
    1.37 +		    ]]) ifTrue:[
    1.38 +			eachClass := Smalltalk at:eachClassName.
    1.39  
    1.40 -		    useCompiledUnitTestClasses ifFalse:[
    1.41 -			"here we want to test the jitter code
    1.42 -			 therfore we file in, exit if the class is already present somwhow"
    1.43 -			eachClass notNil ifTrue:[
    1.44 -			    self logWarning:'test class "%1" was already present as stc-compiled class before file in.' with:eachClassName.
    1.45 -			    Smalltalk isSmalltalkDevelopmentSystem ifFalse:[
    1.46 -				Smalltalk exit:1.
    1.47 +			useCompiledUnitTestClasses ifFalse:[
    1.48 +			    "here we want to test the jitter code
    1.49 +			     therfore we file in, exit if the class is already present somwhow"
    1.50 +			    eachClass notNil ifTrue:[
    1.51 +				self logWarning:'test class "%1" was already present as stc-compiled class before file in.' with:eachClassName.
    1.52 +				Smalltalk isSmalltalkDevelopmentSystem ifFalse:[
    1.53 +				    Smalltalk exit:1.
    1.54 +				].
    1.55  			    ].
    1.56 +
    1.57 +			    eachClass := Smalltalk
    1.58 +				fileInClass:eachClassName
    1.59 +				package:'stx:goodies/regression'.
    1.60  			].
    1.61  
    1.62 -			eachClass := Smalltalk
    1.63 -			    fileInClass:eachClassName
    1.64 -			    package:'stx:goodies/regression'.
    1.65 -		    ].
    1.66 -
    1.67 -		    eachClass notNil ifTrue:[
    1.68 -			(eachClass isTestCaseLike
    1.69 -			and:[eachClass isAbstract not]) ifTrue:[
    1.70 -			    self logInfo:'added test "%1".' with:eachClassName.
    1.71 -			    unitTestSuite addTest:eachClass suite.
    1.72 +			eachClass notNil ifTrue:[
    1.73 +			    (eachClass isTestCaseLike
    1.74 +			    and:[eachClass isAbstract not]) ifTrue:[
    1.75 +				self logInfo:'added test "%1".' with:eachClassName.
    1.76 +				unitTestSuite addTest:eachClass suite.
    1.77 +			    ] ifFalse:[
    1.78 +				self logInfo:'not a test "%1" (abstract or something else).'
    1.79 +					with:eachClassName.
    1.80 +			    ].
    1.81  			] ifFalse:[
    1.82 -			    self logInfo:'not a test "%1" (abstract or something else).'
    1.83 -				    with:eachClassName.
    1.84 +			    self logWarning:'test class "%1" is not loaded.' with:eachClassName.
    1.85  			].
    1.86  		    ] ifFalse:[
    1.87 -			self logWarning:'test class "%1" is not loaded.' with:eachClassName.
    1.88 +			self logInfo:'skipped test "%1".' with:eachClassName.
    1.89  		    ].
    1.90 -		] ifFalse:[
    1.91 -		    self logInfo:'skipped test "%1".' with:eachClassName.
    1.92  		].
    1.93  	    ].
    1.94  	].
    1.95 @@ -344,17 +348,23 @@
    1.96  !RunUnitTests class methodsFor:'logging'!
    1.97  
    1.98  log:aString type:aType
    1.99 -    Transcript notNil ifTrue:[
   1.100 -	Transcript showCR:'%1 [%2] : %3'
   1.101 -		with:Timestamp now printString
   1.102 +    |fmt msg|
   1.103 +
   1.104 +    fmt := '%1 RunUnitTests [%2]: %3'.
   1.105 +    fmt := 'RunUnitTests [%2]: %3'.
   1.106 +
   1.107 +    msg := fmt
   1.108 +		bindWith:Timestamp now printString
   1.109  		with:(aType printString asLowercase "paddedTo:'warning' size")
   1.110  		with:aString.
   1.111 +
   1.112 +    Transcript notNil ifTrue:[
   1.113 +	Transcript showCR:msg.
   1.114  	^ self
   1.115      ].
   1.116 -    Stderr showCR:'%1 [%2] : %3'
   1.117 -	    with:Timestamp now printString
   1.118 -	    with:(aType printString asLowercase paddedTo:'warning' size)
   1.119 -	    with:aString.
   1.120 +    Stderr notNil ifTrue:[
   1.121 +	Stderr showCR:msg.
   1.122 +    ].
   1.123  
   1.124      "Modified: / 26-03-2019 / 18:53:48 / Claus Gittinger"
   1.125  !