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
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
75
686f675d9442 scripts and README added
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
     1
| pp wd i p |
686f675d9442 scripts and README added
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
     2
686f675d9442 scripts and README added
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
     3
"Search for package path, bit hacky but..."
686f675d9442 scripts and README added
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
     4
wd := Filename currentDirectory.
686f675d9442 scripts and README added
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
     5
pp := nil.
686f675d9442 scripts and README added
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
     6
p := wd.
686f675d9442 scripts and README added
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
     7
i := 10."How many super-directories try"
686f675d9442 scripts and README added
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
     8
[i > 0 and:[pp == nil]] whileTrue:[
686f675d9442 scripts and README added
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
     9
        p := p / '..'. i := i - 1.
686f675d9442 scripts and README added
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    10
        ((p / 'stx' / 'libbasic') exists and:[(p / 'stx' / 'libcomp') exists])
686f675d9442 scripts and README added
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    11
                ifTrue:[pp := p]].
686f675d9442 scripts and README added
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    12
pp
686f675d9442 scripts and README added
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    13
        ifNil:
686f675d9442 scripts and README added
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    14
                [Stderr nextPutAll: 'ERROR: Cannot find package path'.
686f675d9442 scripts and README added
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    15
                Smalltalk exit: 16]
686f675d9442 scripts and README added
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    16
        ifNotNil:
686f675d9442 scripts and README added
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    17
                [Smalltalk packagePath add: pp pathName].
686f675d9442 scripts and README added
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    18
686f675d9442 scripts and README added
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    19
(Smalltalk commandLineArguments includes:'--debug') ifTrue:[
686f675d9442 scripts and README added
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    20
    Stderr nextPutAll:'Package path:'; cr.
686f675d9442 scripts and README added
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    21
    Smalltalk packagePath do:[:each|
686f675d9442 scripts and README added
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    22
       Stderr nextPutAll:'  '; nextPutAll: each; cr.
686f675d9442 scripts and README added
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    23
    ].
686f675d9442 scripts and README added
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    24
83
40162ba13436 Fix for --debug
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 75
diff changeset
    25
    Smalltalk beHeadless: (OperatingSystem getEnvironment: 'DISPLAY') isNil.
75
686f675d9442 scripts and README added
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    26
] ifFalse: [
686f675d9442 scripts and README added
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    27
	Smalltalk beHeadless: true.
686f675d9442 scripts and README added
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    28
].
686f675d9442 scripts and README added
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    29
686f675d9442 scripts and README added
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    30
(Smalltalk at:#'Builder::ReportRunner') isNil ifTrue:[
189
bd2bed33aba7 Fixes to make it running on Smalltalk/X 6.2.2 released in July 2012
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 83
diff changeset
    31
    (Smalltalk loadPackage: 'stx:goodies/sunit') ifFalse:[
bd2bed33aba7 Fixes to make it running on Smalltalk/X 6.2.2 released in July 2012
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 83
diff changeset
    32
        Stderr nextPutAll:'ERROR: cannot load stx:goodies/sunit.'.
bd2bed33aba7 Fixes to make it running on Smalltalk/X 6.2.2 released in July 2012
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 83
diff changeset
    33
        Smalltalk exit: 17
bd2bed33aba7 Fixes to make it running on Smalltalk/X 6.2.2 released in July 2012
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 83
diff changeset
    34
    ].
75
686f675d9442 scripts and README added
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    35
    (Smalltalk loadPackage: 'stx:goodies/builder/reports') ifFalse:[
686f675d9442 scripts and README added
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    36
        Stderr nextPutAll:'ERROR: cannot load stx:goodies/builder/reports.'.
686f675d9442 scripts and README added
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    37
        Smalltalk exit: 17
686f675d9442 scripts and README added
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    38
    ].
686f675d9442 scripts and README added
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    39
].
686f675d9442 scripts and README added
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    40
189
bd2bed33aba7 Fixes to make it running on Smalltalk/X 6.2.2 released in July 2012
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 83
diff changeset
    41
(Smalltalk at:#'Builder::ReportRunner') start.