[squeak-dev] The Inbox: SUnitGUI-ct.85.mcz

Marcel Taeumel marcel.taeumel at hpi.de
Mon Jan 24 07:31:23 UTC 2022


Hi Christoph --

-1

#valueUnpreemptively is the only mechanism we have at this point to collect somewhat reliable coverage statistics. If you have a better idea, okay. But let's not break this existing facility here. It would modify the statistics being collected.

Best,
Marcel
Am 23.01.2022 16:44:54 schrieb commits at source.squeak.org <commits at source.squeak.org>:
A new version of SUnitGUI was added to project The Inbox:
http://source.squeak.org/inbox/SUnitGUI-ct.85.mcz

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

Name: SUnitGUI-ct.85
Author: ct
Time: 23 January 2022, 4:44:44.095219 pm
UUID: c523a4d5-d9aa-7347-8e2f-66452a540c30
Ancestors: SUnitGUI-ct.84

Proposal: Do not use #valueUnpreemptively for collecting coverage in the TestRunner. The former behavior made it impossible to interrupt a hanging test and also led to errors in all tests that try to schedule a process on a priority above the active priority.

I have been happily using this setting for a few months in multiple images. The downside is that any processes running with higher-than-normal priority could interfere the results, but this only applies to code in the Kernel packages which is often not OaM-safe anyway.

=============== Diff against SUnitGUI-ct.84 ===============

Item was changed:
----- Method: TestRunner>>collectCoverageFor: (in category 'actions') -----
collectCoverageFor: methods
| wrappers suite |
wrappers := methods collect: [ :each | TestCoverage on: each ].
suite := self
reset;
suiteAll.

+ wrappers do: [ :each | each install ].
+ [ self runSuite: suite ] ensure: [ wrappers do: [ :each | each uninstall ] ].
- [ wrappers do: [ :each | each install ].
- [ self runSuite: suite ] ensure: [ wrappers do: [ :each | each uninstall ] ] ] valueUnpreemptively.
wrappers := wrappers reject: [ :each | each hasRun ].
wrappers isEmpty
ifTrue:
+ [ self inform: 'Congratulations. Your tests cover all code under analysis.' translated ]
- [ UIManager default inform: 'Congratulations. Your tests cover all code under analysis.' ]
ifFalse:
[ ToolSet
browseMessageSet: (wrappers collect: [ :each | each reference ])
+ name: ('Not Covered Code ({1}% Code Coverage)' translated format: {100 - (100 * wrappers size // methods size)})
- name: 'Not Covered Code (' , (100 - (100 * wrappers size // methods size)) printString , '% Code Coverage)'
autoSelect: nil ].
self saveResultInHistory!


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20220124/0df57b2b/attachment.html>


More information about the Squeak-dev mailing list