quickSelfTest/RunUnitTests.st
changeset 419 3ff8e074f1c3
parent 418 dfb090997957
child 420 1e2f59a4f198
--- a/quickSelfTest/RunUnitTests.st	Wed Oct 11 16:54:09 2017 +0200
+++ b/quickSelfTest/RunUnitTests.st	Thu Oct 12 10:51:46 2017 +0200
@@ -40,7 +40,7 @@
      cmdArgs
      unitTestSuite
      eachClassName eachClass
-     result index 
+     result index
      settingsFilePathName resultFilePathName forceTestCase|
 
     doRunSpecificUnitTests := false.
@@ -51,111 +51,111 @@
     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.
+	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.
+	self logInfo:'configured to run expecco unit tests only'.
+	doRunSpecificUnitTests := true.
+	unitTestSuiteName := 'expecco Unit Tests'.
+	excludedUnitTestClassNames := self excludedUnitTestClassNamesForExpecco.
     ].
 
     index := cmdArgs indexOf:'--resultFile'.
     index > 0 ifTrue:[
-        resultFilePathName := cmdArgs at:index + 1.
-        self logInfo:'set custom result file: ', resultFilePathName printString.
+	resultFilePathName := cmdArgs at:index + 1.
+	self logInfo:'set custom result file: ', resultFilePathName printString.
     ].
 
     index := cmdArgs indexOf:'--forceTestCase'.
     index > 0 ifTrue:[
-        forceTestCase := cmdArgs at:index + 1.
-        self logInfo:'set force test case: ', resultFilePathName printString.
-    ].        
+	forceTestCase := cmdArgs at:index + 1.
+	self logInfo:'set force test case: ', resultFilePathName printString.
+    ].
 
     doRunSpecificUnitTests ifFalse:[
-        self logInfo:'configured to run all available unit tests'.
+	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.
-        ].
+	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
-                and:[
-                    "/ skip non test case classes
-                    (#(
-                        'stx_goodies_regression'
-                    ) includes:eachClassName) not
-                and:[
-                    forceTestCase isNil 
-                    or:[forceTestCase = eachClassName   
-                    or:[forceTestCase = ((eachClassName subStrings:'::') lastIfEmpty:nil)]]
-                ]]) ifTrue:[
-                    eachClass := Smalltalk at:eachClassName.
+	(excludedUnitTestClassNames includes:eachClassName) ifFalse:[
+	    (corruptedUnitTestClassNames includes:eachClassName) ifTrue:[
+		self
+		    logWarning:('corrupted unit test class detected, please fix #%1'
+			bindWith:eachClassName).
+	    ] ifFalse:[
+		(eachClassName notNil
+		and:[
+		    "/ skip non test case 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 test the jitter code
-                         therfor we file in, exit if the class is already present somwhow"
-                        eachClass notNil ifTrue:[
-                            self
-                                logWarning:('Unit test class "%1" was already present before file in.'
-                                    bindWith:eachClassName).
+		    useCompiledUnitTestClasses ifFalse:[
+			"here we want test the jitter code
+			 therfor we file in, exit if the class is already present somwhow"
+			eachClass notNil ifTrue:[
+			    self
+				logWarning:('Unit test class "%1" was already present before file in.'
+				    bindWith:eachClassName).
 
-                            Smalltalk exit:1.
-                        ].
+			    Smalltalk exit:1.
+			].
 
-                        eachClass := Smalltalk
-                            fileInClass:eachClassName
-                            package:'stx:goodies/regression'.
-                    ].
+			eachClass := Smalltalk
+			    fileInClass:eachClassName
+			    package:'stx:goodies/regression'.
+		    ].
 
-                    eachClass notNil ifTrue:[
-                        eachClass isTestCaseLike ifTrue:[
-                            unitTestSuite addTest:eachClass suite.
-                        ].
-                    ] ifFalse:[
-                        self
-                            logWarning:('unit test class "%1" is not loaded.'
-                                bindWith:eachClassName).
-                    ].
-                ].
-            ].
-        ].
+		    eachClass notNil ifTrue:[
+			eachClass isTestCaseLike ifTrue:[
+			    unitTestSuite addTest:eachClass suite.
+			].
+		    ] ifFalse:[
+			self
+			    logWarning:('unit test class "%1" is not loaded.'
+				bindWith:eachClassName).
+		    ].
+		].
+	    ].
+	].
     ].
 
     self
-        logInfo:('%1 unit test classes collected'
-            bindWith:unitTestSuite tests size).
+	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').
+	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:resultFilePathName ? 'testresult.xml'.
+	report:result
+	format:#xml_jUnit
+	as:resultFilePathName ? 'testresult.xml'.
 
     self logInfo:'summary:'.
     self logInfo:('%1 tests' bindWith:result runCount).
@@ -176,12 +176,15 @@
 !
 
 excludedUnitTestClassNamesForAll
-    ^ #(#'RegressionTests::SelectorNamespacesTests')
+    ^ #(
+	#'RegressionTests::SelectorNamespacesTests'
+    )
 !
 
 excludedUnitTestClassNamesForExpecco
     ^ self excludedUnitTestClassNamesForAll
 	, #(
+	    #'RegressionTests::VMCrashTests'
 	    #'RegressionTests::BreakpointTests'
 	    #'RegressionTests::SunitXMLOutputTest'
 	    #'RegressionTests::CompilerTests2'
@@ -235,4 +238,3 @@
 version_CVS
     ^ '$Header$'
 ! !
-