# HG changeset patch # User Jan Vrany # Date 1458052597 0 # Node ID e217bb7aacf4e84a502e0678f843054c2e7e4ae3 # Parent 567cade6bd72fd9522fce352a82b762c643cbeb8 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. diff -r 567cade6bd72 -r e217bb7aacf4 reports/Builder__TestReport.st --- a/reports/Builder__TestReport.st Fri Mar 11 07:03:20 2016 +0100 +++ b/reports/Builder__TestReport.st Tue Mar 15 14:36:37 2016 +0000 @@ -3,7 +3,7 @@ "{ NameSpace: Builder }" Report subclass:#TestReport - instanceVariableNames:'suite coverage instrument keepStdout' + instanceVariableNames:'suite coverage instrument keepStdout keepBytecode' classVariableNames:'' poolDictionaries:'' category:'Builder-Reports' @@ -19,6 +19,14 @@ !TestReport methodsFor:'accessing'! +keepBytecode + ^ keepBytecode +! + +keepBytecode:aBoolean + keepBytecode := aBoolean. +! + keepStdout ^ keepStdout ! @@ -111,6 +119,18 @@ "Created: / 27-05-2014 / 16:34:24 / Jan Vrany " ! +cmdlineOptionKeepBytecode + + ^CmdLineOption new + long: 'keep-bytecode'; + description: 'Keep and include method''s bytecode in reported stacktraces. May generate huge report!!'; + action:[ + keepBytecode := true + ] + + "Created: / 15-03-2016 / 14:32:16 / Jan Vrany " +! + cmdlineOptionKeepStdout ^CmdLineOption new diff -r 567cade6bd72 -r e217bb7aacf4 reports/Builder__TestReportFormat.st --- a/reports/Builder__TestReportFormat.st Fri Mar 11 07:03:20 2016 +0100 +++ b/reports/Builder__TestReportFormat.st Tue Mar 15 14:36:37 2016 +0000 @@ -125,15 +125,17 @@ home := context methodHome. mthd := home method. - s nextPutAll:'bytecode: '; cr. - mthd notNil ifTrue:[ - (mthd isJavaMethod and:[mthd class ~~ JavaNativeMethod]) ifFalse:[ - Decompiler decompile: mthd to: s. - ] ifTrue:[ - (Smalltalk at: #JavaByteCodeDisassembler) notNil ifTrue:[ - (Smalltalk at: #JavaByteCodeDisassembler) diassemble: mthd to: s. - ] ifFalse:[ - s nextPutAll: ' ** no JavaByteCodeDisassembler **' + report keepBytecode ifTrue:[ + s nextPutAll:'bytecode: '; cr. + mthd notNil ifTrue:[ + (mthd isJavaMethod and:[mthd class ~~ JavaNativeMethod]) ifFalse:[ + Decompiler decompile: mthd to: s. + ] ifTrue:[ + (Smalltalk at: #JavaByteCodeDisassembler) notNil ifTrue:[ + (Smalltalk at: #JavaByteCodeDisassembler) diassemble: mthd to: s. + ] ifFalse:[ + s nextPutAll: ' ** no JavaByteCodeDisassembler **' + ]. ]. ]. ]. @@ -179,15 +181,14 @@ " "Created: / 03-08-2011 / 14:53:52 / Jan Vrany " - "Modified: / 18-01-2016 / 08:12:56 / Jan Vrany " + "Modified: / 15-03-2016 / 14:34:07 / Jan Vrany " ! writeStackTrace:err of:aTestCase on: str - | context stop | + | context | context := err signalerContext. - stop := false. [ context notNil ] whileTrue:[ self writeContext: context on: str. @@ -202,6 +203,7 @@ ]. "Created: / 03-08-2011 / 14:53:42 / Jan Vrany " + "Modified: / 15-03-2016 / 14:33:31 / Jan Vrany " ! ! !TestReportFormat::JUnit class methodsFor:'accessing'!