*** empty log message ***
authorsr
Tue, 12 Sep 2017 15:37:32 +0200
changeset 3378dcc6a1f364b
parent 336 aaa1ed543bd0
child 338 5c4798132eac
*** empty log message ***
quickSelfTest/RunUnitTests.st
     1.1 --- a/quickSelfTest/RunUnitTests.st	Tue Sep 12 13:33:30 2017 +0200
     1.2 +++ b/quickSelfTest/RunUnitTests.st	Tue Sep 12 15:37:32 2017 +0200
     1.3 @@ -18,7 +18,7 @@
     1.4      documentation to be added.
     1.5  
     1.6      [author:]
     1.7 -        sr
     1.8 +	sr
     1.9  
    1.10      [instance variables:]
    1.11  
    1.12 @@ -33,75 +33,75 @@
    1.13  
    1.14  run
    1.15      |doRunSpecificUnitTests unitTestSuiteName excludedUnitTestClassNames corruptedUnitTestClassNames
    1.16 -     cmdArgs 
    1.17 -     unitTestSuite 
    1.18 +     cmdArgs
    1.19 +     unitTestSuite
    1.20       eachClassName eachClass
    1.21       result|
    1.22  
    1.23      doRunSpecificUnitTests := false.
    1.24 -    unitTestSuiteName := 'All Unit Tests'. 
    1.25 +    unitTestSuiteName := 'All Unit Tests'.
    1.26      excludedUnitTestClassNames := self excludedUnitTestClassNamesForAll.
    1.27      corruptedUnitTestClassNames := self corruptedUnitTestClassNames.
    1.28  
    1.29      cmdArgs := Smalltalk commandLineArguments.
    1.30      (cmdArgs includes:'--runOnlyExpeccoUnitTests') ifTrue:[
    1.31 -        self logInfo:'configured to run expecco unit tests only'.
    1.32 -        doRunSpecificUnitTests := true.
    1.33 -        unitTestSuiteName := 'expecco Unit Tests'. 
    1.34 -        excludedUnitTestClassNames := self excludedUnitTestClassNamesForExpecco.
    1.35 +	self logInfo:'configured to run expecco unit tests only'.
    1.36 +	doRunSpecificUnitTests := true.
    1.37 +	unitTestSuiteName := 'expecco Unit Tests'.
    1.38 +	excludedUnitTestClassNames := self excludedUnitTestClassNamesForExpecco.
    1.39      ].
    1.40  
    1.41      doRunSpecificUnitTests ifFalse:[
    1.42 -        self logInfo:'configured to run all available unit tests'.
    1.43 +	self logInfo:'configured to run all available unit tests'.
    1.44      ].
    1.45  
    1.46      self logInfo:'collecting unit test classes to run'.
    1.47      unitTestSuite := TestSuite named:unitTestSuiteName.
    1.48      (Smalltalk at: #'stx_goodies_regression') classNamesAndAttributes do:[:eachClassNameAndAttributes |
    1.49 -        eachClassNameAndAttributes isSymbol ifTrue:[
    1.50 -            eachClassName := eachClassNameAndAttributes.
    1.51 -        ] ifFalse:[
    1.52 -            eachClassName := eachClassNameAndAttributes 
    1.53 -                firstIfEmpty:nil.
    1.54 -        ].
    1.55 +	eachClassNameAndAttributes isSymbol ifTrue:[
    1.56 +	    eachClassName := eachClassNameAndAttributes.
    1.57 +	] ifFalse:[
    1.58 +	    eachClassName := eachClassNameAndAttributes
    1.59 +		firstIfEmpty:nil.
    1.60 +	].
    1.61  
    1.62 -        (corruptedUnitTestClassNames includes:eachClassName) ifTrue:[
    1.63 -            self 
    1.64 -                logWarning:('corrupted unit test class detected, please fix #%1' 
    1.65 -                    bindWith:eachClassName).
    1.66 -        ] ifFalse:[
    1.67 -            (excludedUnitTestClassNames includes:eachClassName) ifFalse:[
    1.68 -                eachClassName notNil ifTrue:[
    1.69 -                    eachClass := Smalltalk 
    1.70 -                        fileInClass:eachClassName 
    1.71 -                        package:'stx:goodies/regression'.
    1.72 +	(corruptedUnitTestClassNames includes:eachClassName) ifTrue:[
    1.73 +	    self
    1.74 +		logWarning:('corrupted unit test class detected, please fix #%1'
    1.75 +		    bindWith:eachClassName).
    1.76 +	] ifFalse:[
    1.77 +	    (excludedUnitTestClassNames includes:eachClassName) ifFalse:[
    1.78 +		eachClassName notNil ifTrue:[
    1.79 +		    eachClass := Smalltalk
    1.80 +			fileInClass:eachClassName
    1.81 +			package:'stx:goodies/regression'.
    1.82  
    1.83 -                    eachClass notNil ifTrue:[
    1.84 -                        eachClass isTestCaseLike ifTrue:[
    1.85 -                            unitTestSuite addTest:eachClass suite.
    1.86 -                        ].
    1.87 -                    ].
    1.88 -                ].
    1.89 -            ].
    1.90 -        ].
    1.91 +		    eachClass notNil ifTrue:[
    1.92 +			eachClass isTestCaseLike ifTrue:[
    1.93 +			    unitTestSuite addTest:eachClass suite.
    1.94 +			].
    1.95 +		    ].
    1.96 +		].
    1.97 +	    ].
    1.98 +	].
    1.99      ].
   1.100  
   1.101 -    self 
   1.102 -        logInfo:('%1 unit test classes collected'
   1.103 -            bindWith:unitTestSuite tests size).
   1.104 +    self
   1.105 +	logInfo:('%1 unit test classes collected'
   1.106 +	    bindWith:unitTestSuite tests size).
   1.107  
   1.108      self logInfo:'starting unit tests'.
   1.109      result := unitTestSuite
   1.110 -        run:TestResultStX new
   1.111 -        beforeEachDo:[:test | self logInfo:'performing unit test ', test printString]
   1.112 -        afterEachDo:[:test| ]
   1.113 -        debug:(cmdArgs includes:'--debug').
   1.114 +	run:TestResultStX new
   1.115 +	beforeEachDo:[:test | self logInfo:'performing unit test ', test printString]
   1.116 +	afterEachDo:[:test| ]
   1.117 +	debug:(cmdArgs includes:'--debug').
   1.118  
   1.119      self logInfo:'generating report'.
   1.120      TestResultReporter
   1.121 -        report:result
   1.122 -        format:#xml_jUnit
   1.123 -        as:'testresult.xml'.
   1.124 +	report:result
   1.125 +	format:#xml_jUnit
   1.126 +	as:'testresult.xml'.
   1.127  
   1.128      self logInfo:'summary:'.
   1.129      self logInfo:('%1 tests' bindWith:result runCount).
   1.130 @@ -114,14 +114,14 @@
   1.131  
   1.132  corruptedUnitTestClassNames
   1.133      ^ #(
   1.134 -        #'RegressionTests::ExternalInterfaceTests'
   1.135 -        #'RegressionTests::Win32OLETests'
   1.136 -        #'RegressionTests::HTTPServerTests'
   1.137 -        #'RegressionTests::SocketTests'
   1.138 -        #'RegressionTests::DelayTest'
   1.139 -        #'RegressionTests::ContextTest2'
   1.140 -        #'RegressionTests::DebuggerTest'
   1.141 -        #'RegressionTests::OperatingSystem'
   1.142 +	#'RegressionTests::ExternalInterfaceTests'
   1.143 +	#'RegressionTests::Win32OLETests'
   1.144 +	#'RegressionTests::HTTPServerTests'
   1.145 +	#'RegressionTests::SocketTests'
   1.146 +	#'RegressionTests::DelayTest'
   1.147 +	#'RegressionTests::ContextTest2'
   1.148 +	#'RegressionTests::DebuggerTest'
   1.149 +	#'RegressionTests::OperatingSystem'
   1.150      )
   1.151  !
   1.152  
   1.153 @@ -129,11 +129,12 @@
   1.154      ^ #()
   1.155  !
   1.156  
   1.157 -excludedUnitTestClassNamesForExpecco 
   1.158 +excludedUnitTestClassNamesForExpecco
   1.159      ^ self excludedUnitTestClassNamesForAll
   1.160 -        , #(
   1.161 -            #'RegressionTests::BreakpointTests'
   1.162 -        )
   1.163 +	, #(
   1.164 +	    #'RegressionTests::BreakpointTests'
   1.165 +	    #'RegressionTests::SunitXMLOutputTest'
   1.166 +	)
   1.167  ! !
   1.168  
   1.169  !RunUnitTests class methodsFor:'logging'!
   1.170 @@ -141,22 +142,21 @@
   1.171  log:aString
   1.172      type:aType
   1.173  
   1.174 -    Stdout 
   1.175 -        showCR:('%1 [%2] : %3'
   1.176 -            bindWith:Timestamp now printString
   1.177 -            with:(aType printString asLowercase paddedTo:'warning' size)
   1.178 -            with:aString).
   1.179 +    Stdout
   1.180 +	showCR:('%1 [%2] : %3'
   1.181 +	    bindWith:Timestamp now printString
   1.182 +	    with:(aType printString asLowercase paddedTo:'warning' size)
   1.183 +	    with:aString).
   1.184  !
   1.185  
   1.186  logInfo:aString
   1.187      self
   1.188 -        log:aString
   1.189 -        type:'INFO'
   1.190 +	log:aString
   1.191 +	type:'INFO'
   1.192  !
   1.193  
   1.194  logWarning:aString
   1.195      self
   1.196 -        log:aString
   1.197 -        type:'WARNING'
   1.198 +	log:aString
   1.199 +	type:'WARNING'
   1.200  ! !
   1.201 -