Backed out 4c26321be573. jv
authorJan Vrany <jan.vrany@fit.cvut.cz>
Tue, 15 Mar 2016 14:36:37 +0000
branchjv
changeset 303e217bb7aacf4
parent 302 567cade6bd72
child 313 9c15d2d4d8e2
Backed out 4c26321be573.

Only include bytecode when --keep-bytecode options is specified.
Otherwise it may generate a huge log and Jenkins may choke on it.
reports/Builder__TestReport.st
reports/Builder__TestReportFormat.st
     1.1 --- a/reports/Builder__TestReport.st	Fri Mar 11 07:03:20 2016 +0100
     1.2 +++ b/reports/Builder__TestReport.st	Tue Mar 15 14:36:37 2016 +0000
     1.3 @@ -3,7 +3,7 @@
     1.4  "{ NameSpace: Builder }"
     1.5  
     1.6  Report subclass:#TestReport
     1.7 -	instanceVariableNames:'suite coverage instrument keepStdout'
     1.8 +	instanceVariableNames:'suite coverage instrument keepStdout keepBytecode'
     1.9  	classVariableNames:''
    1.10  	poolDictionaries:''
    1.11  	category:'Builder-Reports'
    1.12 @@ -19,6 +19,14 @@
    1.13  
    1.14  !TestReport methodsFor:'accessing'!
    1.15  
    1.16 +keepBytecode
    1.17 +    ^ keepBytecode
    1.18 +!
    1.19 +
    1.20 +keepBytecode:aBoolean
    1.21 +    keepBytecode := aBoolean.
    1.22 +!
    1.23 +
    1.24  keepStdout
    1.25      ^ keepStdout
    1.26  !
    1.27 @@ -111,6 +119,18 @@
    1.28      "Created: / 27-05-2014 / 16:34:24 / Jan Vrany <jan.vrany@fit.cvut.cz>"
    1.29  !
    1.30  
    1.31 +cmdlineOptionKeepBytecode
    1.32 +
    1.33 +    ^CmdLineOption new
    1.34 +        long: 'keep-bytecode';
    1.35 +        description: 'Keep and include method''s bytecode in reported stacktraces. May generate huge report!!';
    1.36 +        action:[
    1.37 +            keepBytecode := true
    1.38 +        ]
    1.39 +
    1.40 +    "Created: / 15-03-2016 / 14:32:16 / Jan Vrany <jan.vrany@fit.cvut.cz>"
    1.41 +!
    1.42 +
    1.43  cmdlineOptionKeepStdout
    1.44  
    1.45      ^CmdLineOption new
     2.1 --- a/reports/Builder__TestReportFormat.st	Fri Mar 11 07:03:20 2016 +0100
     2.2 +++ b/reports/Builder__TestReportFormat.st	Tue Mar 15 14:36:37 2016 +0000
     2.3 @@ -125,15 +125,17 @@
     2.4      home := context methodHome.
     2.5      mthd := home method.  
     2.6  
     2.7 -    s nextPutAll:'bytecode: '; cr.    
     2.8 -    mthd notNil ifTrue:[ 
     2.9 -        (mthd isJavaMethod and:[mthd class ~~ JavaNativeMethod]) ifFalse:[ 
    2.10 -            Decompiler decompile: mthd to: s.
    2.11 -        ] ifTrue:[ 
    2.12 -            (Smalltalk at: #JavaByteCodeDisassembler) notNil ifTrue:[ 
    2.13 -                (Smalltalk at: #JavaByteCodeDisassembler) diassemble: mthd to: s.
    2.14 -            ] ifFalse:[ 
    2.15 -                s nextPutAll: ' ** no JavaByteCodeDisassembler **'  
    2.16 +    report keepBytecode ifTrue:[
    2.17 +        s nextPutAll:'bytecode: '; cr.    
    2.18 +        mthd notNil ifTrue:[ 
    2.19 +            (mthd isJavaMethod and:[mthd class ~~ JavaNativeMethod]) ifFalse:[ 
    2.20 +                Decompiler decompile: mthd to: s.
    2.21 +            ] ifTrue:[ 
    2.22 +                (Smalltalk at: #JavaByteCodeDisassembler) notNil ifTrue:[ 
    2.23 +                    (Smalltalk at: #JavaByteCodeDisassembler) diassemble: mthd to: s.
    2.24 +                ] ifFalse:[ 
    2.25 +                    s nextPutAll: ' ** no JavaByteCodeDisassembler **'  
    2.26 +                ].
    2.27              ].
    2.28          ].
    2.29      ].
    2.30 @@ -179,15 +181,14 @@
    2.31      "
    2.32  
    2.33      "Created: / 03-08-2011 / 14:53:52 / Jan Vrany <jan.vrany@fit.cvut.cz>"
    2.34 -    "Modified: / 18-01-2016 / 08:12:56 / Jan Vrany <jan.vrany@fit.cvut.cz>"
    2.35 +    "Modified: / 15-03-2016 / 14:34:07 / Jan Vrany <jan.vrany@fit.cvut.cz>"
    2.36  !
    2.37  
    2.38  writeStackTrace:err of:aTestCase on: str
    2.39  
    2.40 -    | context stop |
    2.41 +    | context |
    2.42  
    2.43      context := err signalerContext.
    2.44 -    stop := false.
    2.45  
    2.46      [ context notNil ] whileTrue:[
    2.47          self writeContext: context on: str.
    2.48 @@ -202,6 +203,7 @@
    2.49      ].
    2.50  
    2.51      "Created: / 03-08-2011 / 14:53:42 / Jan Vrany <jan.vrany@fit.cvut.cz>"
    2.52 +    "Modified: / 15-03-2016 / 14:33:31 / Jan Vrany <jan.vrany@fit.cvut.cz>"
    2.53  ! !
    2.54  
    2.55  !TestReportFormat::JUnit class methodsFor:'accessing'!