<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=us-ascii">
</head>
<body>
<style type="text/css" style="display:none;"><!-- P {margin-top:0;margin-bottom:0;} --></style>
<div id="divtagdefaultwrapper" style="font-size:12pt;color:#000000;font-family:Calibri,Helvetica,sans-serif;" dir="ltr">
<p>Hi Marcel,</p>
<p><br>
</p>
<p>I think that this argument only applies to very few classes that are run on a higher priority than normal (for instance, the low space watcher). Could we maybe just define a "special list" for these components/packages? Or alternatively, ask the user whether
 to run on the highest priority or not? Or similarly to #<span>ignoreForCoverage/#<span>classNamesNotUnderTest/#<span>packageNamesUnderTest, allow the source code under test to specify #deniesInterruptabilityForCoverage per method or per class? Then we could
 specify this attribute for WeakArray and Semaphore, for instance.</span></span></span></p>
<p><br>
</p>
<p>I understand that we do not want to break code coverage for all Trunk packages, but this only affects a small minority of use cases for this tool whereas not being able to interrupt the test runner affects every developer for every third-party package.</p>
<p><br>
</p>
<p>Best,</p>
<p>Christoph</p>
</div>
<hr style="display:inline-block;width:98%" tabindex="-1">
<div id="divRplyFwdMsg" dir="ltr"><font face="Calibri, sans-serif" style="font-size:11pt" color="#000000"><b>Von:</b> Squeak-dev <squeak-dev-bounces@lists.squeakfoundation.org> im Auftrag von Taeumel, Marcel<br>
<b>Gesendet:</b> Montag, 24. Januar 2022 08:31:23<br>
<b>An:</b> squeak-dev<br>
<b>Betreff:</b> Re: [squeak-dev] The Inbox: SUnitGUI-ct.85.mcz</font>
<div> </div>
</div>
<div>
<div id="__MailbirdStyleContent" style="font-size: 10pt;font-family: Arial;color: #000000;text-align: left" dir="ltr">
Hi Christoph --
<div><br>
</div>
<div>-1</div>
<div><br>
</div>
<div>#<span style="font-family: Arial, Helvetica, sans-serif;font-size: 13px">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.</span></div>
<div><span style="font-family: Arial, Helvetica, sans-serif;font-size: 13px"><br>
</span></div>
<div><span style="font-family: Arial, Helvetica, sans-serif;font-size: 13px">Best,</span></div>
<div><span style="font-family: Arial, Helvetica, sans-serif;font-size: 13px">Marcel</span></div>
<div class="mb_sig"></div>
<blockquote class="history_container" type="cite" style="border-left-style:solid;border-width:1px; margin-top:20px; margin-left:0px;padding-left:10px;">
<p style="color: #AAAAAA; margin-top: 10px;">Am 23.01.2022 16:44:54 schrieb commits@source.squeak.org <commits@source.squeak.org>:</p>
<div style="font-family:Arial,Helvetica,sans-serif">A new version of SUnitGUI was added to project The Inbox:<br>
http://source.squeak.org/inbox/SUnitGUI-ct.85.mcz<br>
<br>
==================== Summary ====================<br>
<br>
Name: SUnitGUI-ct.85<br>
Author: ct<br>
Time: 23 January 2022, 4:44:44.095219 pm<br>
UUID: c523a4d5-d9aa-7347-8e2f-66452a540c30<br>
Ancestors: SUnitGUI-ct.84<br>
<br>
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.<br>
<br>
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.<br>
<br>
=============== Diff against SUnitGUI-ct.84 ===============<br>
<br>
Item was changed:<br>
----- Method: TestRunner>>collectCoverageFor: (in category 'actions') -----<br>
collectCoverageFor: methods<br>
| wrappers suite |<br>
wrappers := methods collect: [ :each | TestCoverage on: each ].<br>
suite := self<br>
reset;<br>
suiteAll.<br>
<br>
+ wrappers do: [ :each | each install ].<br>
+ [ self runSuite: suite ] ensure: [ wrappers do: [ :each | each uninstall ] ].<br>
- [ wrappers do: [ :each | each install ].<br>
- [ self runSuite: suite ] ensure: [ wrappers do: [ :each | each uninstall ] ] ] valueUnpreemptively.<br>
wrappers := wrappers reject: [ :each | each hasRun ].<br>
wrappers isEmpty <br>
ifTrue: <br>
+ [ self inform: 'Congratulations. Your tests cover all code under analysis.' translated ]<br>
- [ UIManager default inform: 'Congratulations. Your tests cover all code under analysis.' ]<br>
ifFalse: <br>
[ ToolSet <br>
browseMessageSet: (wrappers collect: [ :each | each reference ])<br>
+ name: ('Not Covered Code ({1}% Code Coverage)' translated format: {100 - (100 * wrappers size // methods size)})<br>
- name: 'Not Covered Code (' , (100 - (100 * wrappers size // methods size)) printString , '% Code Coverage)'<br>
autoSelect: nil ].<br>
self saveResultInHistory!<br>
<br>
<br>
</div>
</blockquote>
</div>
</div>
</body>
</html>