The Trunk: SystemReporter-laza.11.mcz

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

The Trunk: SystemReporter-laza.11.mcz

commits-2
Alexander Lazarević uploaded a new version of SystemReporter to project The Trunk:
http://source.squeak.org/trunk/SystemReporter-laza.11.mcz

==================== Summary ====================

Name: SystemReporter-laza.11
Author: laza
Time: 31 January 2011, 9:21:27.089 pm
UUID: 15d33a31-fc91-f043-9045-f92b0fb76005
Ancestors: SystemReporter-laza.10

Add a report for all SUnit tests

=============== Diff against SystemReporter-laza.10 ===============

Item was changed:
  Object subclass: #SystemReporter
+ instanceVariableNames: 'categories categoriesSelected report tinyBenchmarksResult categoryList testRunner'
- instanceVariableNames: 'categories categoriesSelected report tinyBenchmarksResult categoryList'
  classVariableNames: ''
  poolDictionaries: ''
  category: 'SystemReporter'!
 
  !SystemReporter commentStamp: 'laza 1/18/2011 12:04' prior: 0!
  SystemReporter offers a window where information about the system is gathered. This can be easily copied to the clipboard and be attached to a bug report for better identification of the context the bug occured in.
 
  To extend the SystemReporter:
  - add a method
  reportXYZ: aStream
   to the reporting category
  - insert a line
  add: #XYZ method: #reportXYZ
   to the initialize method
  !

Item was changed:
  ----- Method: SystemReporter>>initialize (in category 'initialize-release') -----
  initialize
  self
  add: #Image method: #reportImage;
  add: #'Image Parameters' method: #reportImageParameters;
  add: #'Image Sources' method: #reportSources;
  add: #'Image Preferences' method: #reportPreferences;
  add: #'MC Repositories' method: #reportRepositories;
  add: #'MC Working Copies' method: #reportWorkingCopies;
  add: #'VM General' method: #reportVM;
  add: #'VM Options' method: #reportVMOptions;
  add: #'VM Modules' method: #reportModules;
  add: #'VM Parameters' method: #reportVMParameters;
  add: #'VM Stats' method: #reportVMStats.
  Smalltalk os platformName = 'Win32' ifTrue: [
  self
  add: #'VM Configuration' method: #reportINI.
  ].
  self
  add: #'OS General' method: #reportOS.
  Smalltalk os platformName = 'Win32' ifTrue: [
  self
  add: #'OS Details' method: #reportOSDetails;
  add: #'Hardware Details' method: #reportHardwareDetails;
  add: #'GFX Hardware Details' method: #reportGFXDetails.
  ].
+ self
+ add: #'Tiny Benchmarks' method: #reportTinyBenchmarks;
+ add: #'SUnit' method: #reportTestRunner.
- self add: #'Tiny Benchmarks' method: #reportTinyBenchmarks.
  categoriesSelected := Set with: #Image with: #'VM General'.
  self updateReport
  !

Item was changed:
  ----- Method: SystemReporter>>refresh (in category 'accessing-categories') -----
  refresh
+ tinyBenchmarksResult := testRunner := nil.
- tinyBenchmarksResult := nil.
  self updateReport!

Item was added:
+ ----- Method: SystemReporter>>reportTestRunner: (in category 'reporting') -----
+ reportTestRunner: aStream
+ testRunner ifNil: [| runAllTests |
+ runAllTests := UIManager confirm: 'Running all Tests\will take long time' withCRs.
+ runAllTests
+ ifTrue: [testRunner := TestRunner new runAll]
+ ifFalse: [
+ categoriesSelected remove: #SUnit.
+ ^self changed: #categorySelected]].
+ self header: 'SUnit Results' on: aStream.
+ aStream nextPutAll: testRunner statusText; cr; cr.
+ self header: 'Failed Tests' on: aStream.
+ testRunner failedList do: [:each | aStream nextPutAll: each; cr].
+ aStream cr.
+ self header: 'Errors' on: aStream.
+ testRunner errorList do: [:each | aStream nextPutAll: each; cr]
+ !

Item was changed:
  ----- Method: SystemReporter>>reportTinyBenchmarks: (in category 'reporting') -----
  reportTinyBenchmarks: aStream
  tinyBenchmarksResult ifNil: [
  UIManager inform: 'Running the Benchmarks\will take a few seconds' withCRs.
  tinyBenchmarksResult := 0 tinyBenchmarks].
  self header: 'Tiny Benchmarks' on: aStream.
+ aStream nextPutAll: tinyBenchmarksResult; cr!
- aStream nextPutAll: tinyBenchmarksResult!