Workaround for stc bug
authorJan Vrany <jan.vrany@fit.cvut.cz>
Sat, 29 Jun 2013 23:34:55 +0200
changeset 188 6eeac31d0432
parent 187 ee2471c56070
child 189 bd2bed33aba7
Workaround for stc bug Committed on the Free edition of March Hare Software CVSNT Server. Upgrade to CVS Suite for more features and support: http://march-hare.com/cvsnt/
reports/Builder__ReportRunner.st
--- a/reports/Builder__ReportRunner.st	Fri Jun 28 12:31:26 2013 +0200
+++ b/reports/Builder__ReportRunner.st	Sat Jun 29 23:34:55 2013 +0200
@@ -15,7 +15,7 @@
  The following class instance variables are inherited by this class:
 
 	StandaloneStartup - MutexHandle
-	Object - 
+	Object -
 "
 !
 
@@ -40,7 +40,7 @@
         short: $D;
         long: 'output-directory';
         description: 'Default report output directory';
-        action:[:outputdir | 
+        action:[:outputdir |
             Report outputDir: outputdir.
             self  verboseInfo:'Report dir: ' , Report outputDir asString.
         ]
@@ -57,8 +57,8 @@
         action:[:option |
             report := Smalltalk at: option asSymbol.
             report isNil ifTrue:[
-                Stderr nextPutLine:('ERROR: Report class %1 does not exist (forgot to load package?)' bindWith: option).        
-                "/Smalltalk exit: 1.        
+                Stderr nextPutLine:('ERROR: Report class %1 does not exist (forgot to load package?)' bindWith: option).
+                "/Smalltalk exit: 1.
             ].
             report := report new.
             parser options addAll: (CmdLineOption optionsFor: report)
@@ -74,7 +74,7 @@
         short: $s;
         long: 'setup';
         description: 'Code executed before tests are loaded and executed';
-        action:[:option | 
+        action:[:option |
             setup := option
         ]
 
@@ -87,7 +87,7 @@
         short: $t;
         long: 'setup';
         description: 'Code executed after all tests are executed';
-        action:[:option | 
+        action:[:option |
             teardown := option
         ]
 
@@ -108,10 +108,10 @@
     aStream nextPutAll: '== ['; nextPutAll: aProcess id printString; nextPutAll:'] '; nextPutAll: aProcess name; nextPutAll: ' =='; cr.
     aStream cr.
 
-    ctx := aProcess == Processor activeProcess ifTrue:[thisContext] ifFalse:[aProcess suspendedContext].
+    aProcess == Processor activeProcess ifTrue:[ctx := thisContext] ifFalse:[ctx := aProcess suspendedContext].
     [ ctx notNil ] whileTrue:[
         aStream nextPutAll: '  '.
-        ctx fullPrintOn: aStream.   
+        ctx fullPrintOn: aStream.
         aStream cr.
         ctx := ctx sender.
     ].
@@ -209,8 +209,10 @@
     "On UNIX, this sets up a custom signal handler on SIGUSR2 and SIGTERM that
      dumps stacks on all threads"
 
+    | sigusr2 sigterm |
+
     OperatingSystem isUNIXlike ifTrue:[
-        | sigusr2 sigterm |
+
 
         sigterm := Signal new.
         sigterm handlerBlock: [:ex | self handleSIGTERM].
@@ -224,7 +226,7 @@
     ].
 
     "
-    OperatingSystem sendSignal: OperatingSystem sigUSR2 to: OperatingSystem getProcessId  
+    OperatingSystem sendSignal: OperatingSystem sigUSR2 to: OperatingSystem getProcessId
     "
 
     "Created: / 27-06-2013 / 20:57:09 / Jan Vrany <jan.vrany@fit.cvut.cz>"
@@ -283,17 +285,17 @@
     parser := CmdLineParser new.
     CmdLineOptionError autoload.
 
-    [               
-        parser parse: argv for: self.        
+    [
+        parser parse: argv for: self.
     ] on:CmdLineOptionError do:[:ex|
         Stderr nextPutLine:'Error when processing options: ', ex description.
-        debugging ifFalse:[     
+        debugging ifFalse:[
             ex suspendedContext fullPrintAllOn: Stderr.
             Stderr nextPutLine:'Exiting'.
             Smalltalk exit:1.
         ] ifTrue:[
             ex pass
-        ]        
+        ]
     ].
 
     [