reports/Builder__ReportRunner.st
branchjv
changeset 570 9c47ccc9e9b5
parent 243 625f6907682a
equal deleted inserted replaced
569:67563f72d36b 570:9c47ccc9e9b5
       
     1 "
       
     2 COPYRIGHT (c) 2021 LabWare
       
     3 "
     1 "{ Package: 'stx:goodies/builder/reports' }"
     4 "{ Package: 'stx:goodies/builder/reports' }"
     2 
     5 
     3 "{ NameSpace: Builder }"
     6 "{ NameSpace: Builder }"
     4 
     7 
     5 StandaloneStartup subclass:#ReportRunner
     8 StandaloneStartup subclass:#ReportRunner
    17 	StandaloneStartup - MutexHandle
    20 	StandaloneStartup - MutexHandle
    18 	Object - 
    21 	Object - 
    19 "
    22 "
    20 !
    23 !
    21 
    24 
       
    25 !ReportRunner class methodsFor:'documentation'!
       
    26 
       
    27 copyright
       
    28 "
       
    29 COPYRIGHT (c) 2021 LabWare
       
    30 
       
    31 "
       
    32 ! !
    22 
    33 
    23 !ReportRunner class methodsFor:'initialization'!
    34 !ReportRunner class methodsFor:'initialization'!
    24 
    35 
    25 initialize
    36 initialize
    26 
    37 
   390 !ReportRunner class methodsFor:'startup-to be redefined'!
   401 !ReportRunner class methodsFor:'startup-to be redefined'!
   391 
   402 
   392 main:argv0
   403 main:argv0
   393     "Process command line arguments"
   404     "Process command line arguments"
   394 
   405 
   395     | argv |
   406     | argv status |
   396 
   407 
   397     argv := argv0 asOrderedCollection.
   408     argv := argv0 asOrderedCollection.
   398     argv isEmpty ifTrue:[ 
   409     argv isEmpty ifTrue:[ 
   399         self usage.
   410         self usage.
   400     ].
   411     ].
   407     ] on:CmdLineOptionError do:[:ex|
   418     ] on:CmdLineOptionError do:[:ex|
   408         Stderr nextPutLine:'Error when processing options: ', ex description.
   419         Stderr nextPutLine:'Error when processing options: ', ex description.
   409         debugging ifFalse:[
   420         debugging ifFalse:[
   410             ex suspendedContext fullPrintAllOn: Stderr.
   421             ex suspendedContext fullPrintAllOn: Stderr.
   411             Stderr nextPutLine:'Exiting'.
   422             Stderr nextPutLine:'Exiting'.
   412             Smalltalk exit:1.
   423             Smalltalk exit:2.
   413         ] ifTrue:[
   424         ] ifTrue:[
   414             ex pass
   425             ex pass
   415         ]
   426         ]
   416     ].
   427     ].
   417 
   428 
   421 
   432 
   422     [
   433     [
   423         setup notNil ifTrue:[Compiler evaluate: setup].
   434         setup notNil ifTrue:[Compiler evaluate: setup].
   424         [
   435         [
   425             report ident: ident.
   436             report ident: ident.
   426             report run.
   437             status := report run.
   427         ] ensure:[
   438         ] ensure:[
   428             teardown notNil ifTrue:[Compiler evaluate: teardown].
   439             teardown notNil ifTrue:[Compiler evaluate: teardown].
   429         ].
   440         ].
   430         debugging ifFalse:[
   441         debugging ifFalse:[
   431             Smalltalk exit:0.
   442             Smalltalk exit: status.
   432         ].
   443         ].
   433     ] on: Error do:[:ex|
   444     ] on: Error do:[:ex|
   434         Stderr nextPutAll:'Error when running tests: '.
   445         Stderr nextPutAll:'Error when running tests: '.
   435         Stderr nextPutAll:ex description; cr.
   446         Stderr nextPutAll:ex description; cr.
   436         ex suspendedContext printAllOn:Stderr.
   447         ex suspendedContext printAllOn:Stderr.
   437 
   448 
   438 
   449 
   439         debugging ifFalse:[
   450         debugging ifFalse:[
   440             Smalltalk exit:1.
   451             Smalltalk exit:3.
   441         ] ifTrue:[
   452         ] ifTrue:[
   442             ex pass
   453             ex pass
   443         ]
   454         ]
   444     ]
   455     ]
   445 
   456 
   446     "Modified: / 27-05-2014 / 17:05:06 / Jan Vrany <jan.vrany@fit.cvut.cz>"
   457     "Modified: / 27-05-2014 / 17:05:06 / Jan Vrany <jan.vrany@fit.cvut.cz>"
       
   458     "Modified: / 03-12-2021 / 13:14:00 / Jan Vrany <jan.vrany@labware.com>"
   447 ! !
   459 ! !
   448 
   460 
   449 !ReportRunner class methodsFor:'documentation'!
   461 !ReportRunner class methodsFor:'documentation'!
   450 
   462 
   451 version
   463 version