reports/report-runner.st
author Claus Gittinger <cg@exept.de>
Thu, 28 Mar 2019 13:54:38 +0100
changeset 542 aa25a71be62a
parent 189 bd2bed33aba7
child 327 113031dfa759
permissions -rw-r--r--
#DOCUMENTATION by cg
class: stx_goodies_builder_quickSelfTest
class definition

class: stx_goodies_builder_quickSelfTest class
added:18 methods
jan@75
     1
| pp wd i p |
jan@75
     2
jan@75
     3
"Search for package path, bit hacky but..."
jan@75
     4
wd := Filename currentDirectory.
jan@75
     5
pp := nil.
jan@75
     6
p := wd.
jan@75
     7
i := 10."How many super-directories try"
jan@75
     8
[i > 0 and:[pp == nil]] whileTrue:[
jan@75
     9
        p := p / '..'. i := i - 1.
jan@75
    10
        ((p / 'stx' / 'libbasic') exists and:[(p / 'stx' / 'libcomp') exists])
jan@75
    11
                ifTrue:[pp := p]].
jan@75
    12
pp
jan@75
    13
        ifNil:
jan@75
    14
                [Stderr nextPutAll: 'ERROR: Cannot find package path'.
jan@75
    15
                Smalltalk exit: 16]
jan@75
    16
        ifNotNil:
jan@75
    17
                [Smalltalk packagePath add: pp pathName].
jan@75
    18
jan@75
    19
(Smalltalk commandLineArguments includes:'--debug') ifTrue:[
jan@75
    20
    Stderr nextPutAll:'Package path:'; cr.
jan@75
    21
    Smalltalk packagePath do:[:each|
jan@75
    22
       Stderr nextPutAll:'  '; nextPutAll: each; cr.
jan@75
    23
    ].
jan@75
    24
jan@83
    25
    Smalltalk beHeadless: (OperatingSystem getEnvironment: 'DISPLAY') isNil.
jan@75
    26
] ifFalse: [
jan@75
    27
	Smalltalk beHeadless: true.
jan@75
    28
].
jan@75
    29
jan@75
    30
(Smalltalk at:#'Builder::ReportRunner') isNil ifTrue:[
jan@189
    31
    (Smalltalk loadPackage: 'stx:goodies/sunit') ifFalse:[
jan@189
    32
        Stderr nextPutAll:'ERROR: cannot load stx:goodies/sunit.'.
jan@189
    33
        Smalltalk exit: 17
jan@189
    34
    ].
jan@75
    35
    (Smalltalk loadPackage: 'stx:goodies/builder/reports') ifFalse:[
jan@75
    36
        Stderr nextPutAll:'ERROR: cannot load stx:goodies/builder/reports.'.
jan@75
    37
        Smalltalk exit: 17
jan@75
    38
    ].
jan@75
    39
].
jan@75
    40
jan@189
    41
(Smalltalk at:#'Builder::ReportRunner') start.