diff -r 8ea8b3692704 -r b48196ea5f68 reports/Builder__TestReport.st --- a/reports/Builder__TestReport.st Tue May 27 18:06:08 2014 +0200 +++ b/reports/Builder__TestReport.st Tue May 27 18:06:15 2014 +0200 @@ -3,7 +3,7 @@ "{ NameSpace: Builder }" Report subclass:#TestReport - instanceVariableNames:'suite coverage' + instanceVariableNames:'suite coverage instrument' classVariableNames:'' poolDictionaries:'' category:'Builder-Reports' @@ -62,12 +62,33 @@ ^CmdLineOption new short: $c; long: 'coverage'; - description: 'Collect code coverage when running tests'; + description: 'collect code coverage when running tests'; action:[ coverage := CoverageReport new. ] "Created: / 25-06-2013 / 15:36:46 / Jan Vrany " + "Modified: / 27-05-2014 / 16:54:32 / Jan Vrany " +! + +cmdlineOptionInstrument + + ^CmdLineOption new + short: $I; + long: 'instrument'; + description: 'extra package to instrument for coverage (implies --coverage)'; + action:[:package | + instrument isNil ifTrue:[ + instrument := Set new. + ]. + instrument add: package. + coverage isNil ifTrue:[ + coverage := CoverageReport new. + ]. + + ] + + "Created: / 27-05-2014 / 16:34:24 / Jan Vrany " ! ! !TestReport methodsFor:'initialization'! @@ -132,9 +153,12 @@ ]. coverage notNil ifTrue:[ coverage setupForPackages: packages. + instrument notNil ifTrue:[ + coverage setupForPackages: instrument. + ]. ] - "Modified: / 25-06-2013 / 16:12:18 / Jan Vrany " + "Modified: / 27-05-2014 / 16:35:52 / Jan Vrany " ! setupForSuite: suiteToAdd @@ -340,8 +364,10 @@ sel size > 20 ifTrue:[ sel := '...' , (sel copyFrom: sel size - 16 to: sel size) ]. + Transcript showCR:('%1 >> #%2' bindWith: aTestCase nameForHDTestReport with: aTestCase selectorForHDTestReport). Transcript show:('%-20s >> %-20s : ' printfWith: nm with: sel). + outcome := self createOutcome. outcome testCase: aTestCase.