#BUGFIX by sr
authorsr
Tue, 10 Oct 2017 15:19:14 +0200
changeset 400 9bc1e8189279
parent 399 98d1fb9a0b33
child 401 9b1d27b1d333
#BUGFIX by sr class: RunUnitTests class changed: #run
quickSelfTest/RunUnitTests.st
--- a/quickSelfTest/RunUnitTests.st	Tue Oct 10 15:17:18 2017 +0200
+++ b/quickSelfTest/RunUnitTests.st	Tue Oct 10 15:19:14 2017 +0200
@@ -32,90 +32,7 @@
 !RunUnitTests class methodsFor:'actions'!
 
 run
-    |doRunSpecificUnitTests unitTestSuiteName excludedUnitTestClassNames corruptedUnitTestClassNames
-     cmdArgs
-     unitTestSuite
-     eachClassName eachClass
-     result index settingsFilePathName|
-
-    doRunSpecificUnitTests := false.
-    unitTestSuiteName := 'All Unit Tests'.
-    excludedUnitTestClassNames := self excludedUnitTestClassNamesForAll.
-    corruptedUnitTestClassNames := self corruptedUnitTestClassNames.
-
-    cmdArgs := Smalltalk commandLineArguments.
-    index := cmdArgs indexOf:'--settingsFile'.
-    index > 0 ifTrue:[
-	settingsFilePathName := cmdArgs at:index + 1.
-	self logInfo:'load settings file: ', settingsFilePathName printString.
-	settingsFilePathName asFilename fileIn.
-	self logInfo:'ParserFlags makeCommand: ', ParserFlags makeCommand printString.
-    ].
-
-    (cmdArgs includes:'--runOnlyExpeccoUnitTests') ifTrue:[
-	self logInfo:'configured to run expecco unit tests only'.
-	doRunSpecificUnitTests := true.
-	unitTestSuiteName := 'expecco Unit Tests'.
-	excludedUnitTestClassNames := self excludedUnitTestClassNamesForExpecco.
-    ].
-
-    doRunSpecificUnitTests ifFalse:[
-	self logInfo:'configured to run all available unit tests'.
-    ].
-
-    self logInfo:'collecting unit test classes to run'.
-    unitTestSuite := TestSuite named:unitTestSuiteName.
-    (Smalltalk at: #'stx_goodies_regression') classNamesAndAttributes do:[:eachClassNameAndAttributes |
-	eachClassNameAndAttributes isSymbol ifTrue:[
-	    eachClassName := eachClassNameAndAttributes.
-	] ifFalse:[
-	    eachClassName := eachClassNameAndAttributes
-		firstIfEmpty:nil.
-	].
-
-	(excludedUnitTestClassNames includes:eachClassName) ifFalse:[
-	    (corruptedUnitTestClassNames includes:eachClassName) ifTrue:[
-		self
-		    logWarning:('corrupted unit test class detected, please fix #%1'
-			bindWith:eachClassName).
-	    ] ifFalse:[
-		eachClassName notNil ifTrue:[
-				eachClass := Smalltalk
-					fileInClass:eachClassName
-					package:'stx:goodies/regression'.
-
-				eachClass notNil ifTrue:[
-				eachClass isTestCaseLike ifTrue:[
-					unitTestSuite addTest:eachClass suite.
-				].
-		    ].
-		].
-	    ].
-	].
-    ].
-
-    self
-	logInfo:('%1 unit test classes collected'
-	    bindWith:unitTestSuite tests size).
-
-    self logInfo:'starting unit tests'.
-    result := unitTestSuite
-	run:TestResultStX new
-	beforeEachDo:[:test | self logInfo:'performing unit test ', test printString]
-	afterEachDo:[:test| ]
-	debug:(cmdArgs includes:'--debug').
-
-    self logInfo:'generating report'.
-    TestResultReporter
-	report:result
-	format:#xml_jUnit
-	as:'testresult.xml'.
-
-    self logInfo:'summary:'.
-    self logInfo:('%1 tests' bindWith:result runCount).
-    self logInfo:('%1 passed' bindWith:result passedCount).
-    self logInfo:('%1 failed' bindWith:result failureCount).
-    self logInfo:('%1 errors' bindWith:result errorCount).
+    self runWithCompiledUnitTestClasses:false.
 !
 
 runWithCompiledUnitTestClasses:useCompiledUnitTestClasses