Backed out 4c26321be573. jv
authorJan Vrany <jan.vrany@fit.cvut.cz>
Tue, 15 Mar 2016 14:36:37 +0000
branchjv
changeset 303 e217bb7aacf4
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
--- 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 <jan.vrany@fit.cvut.cz>"
 !
 
+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 <jan.vrany@fit.cvut.cz>"
+!
+
 cmdlineOptionKeepStdout
 
     ^CmdLineOption new
--- 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 <jan.vrany@fit.cvut.cz>"
-    "Modified: / 18-01-2016 / 08:12:56 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+    "Modified: / 15-03-2016 / 14:34:07 / Jan Vrany <jan.vrany@fit.cvut.cz>"
 !
 
 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 <jan.vrany@fit.cvut.cz>"
+    "Modified: / 15-03-2016 / 14:33:31 / Jan Vrany <jan.vrany@fit.cvut.cz>"
 ! !
 
 !TestReportFormat::JUnit class methodsFor:'accessing'!