From: <no...@tc...> - 2025-10-19 12:33:45
|
Automated mail by fx, on behalf of no...@tc... Ticket Change [724575a7fce9c0dd098b9aeb2db5a93aac8a5cf8aab6f59dec3c5e1175f6442f] [Skip test files entirely if all tests are skipped] By erikleunissen For Tk On 2025-10-19T12:27:37.593 Details https://core.tcl-lang.org/tk/tinfo?name=724575a7fce9c0dd098b9aeb2db5a93aac8a5cf8aab6f59dec3c5e1175f6442f Ticket https://core.tcl-lang.org/tk/tktview/83eed90f933b64378b689b8b87c9777b903c280e Changed Fields icomment: Special case: winDialog.test ============================ The test file winDialog.test is a special one: there are two constraints used in that test file (one of them or both per test): "nt" and "testwinevent". The expression that would determine whether this test file can be skipped entirely would then be: {[tcltest::testConstraint nt] || [llength [info commands testwinevent]]} However, after due consideration I decided not to use this expression. The reason is that I can imagine that in the future tests are added to this test file that carry yet another test constraint. That would require the expression to be extended. This would be needed each time another constraint is used. Apart from the fact that the expression is somewhat intricate already, a certain alertness is demanded from test authors and maintainers. Given that test authors come and go, the maintenance burden too high, and won't go down that road. Therefore, the following general rule emerges for test files being elected for skipping: no additional test constraints are expected in the future that would require the condition for skipping to be changed. If a test file already uses more than one condition or constraint, this may be a sign of additional constraints being added in the future. Note that this leaves the possibility to use a less specific, encompassing test constraint instead of a combination of specific constraints or expressions. This is exactly what applies to winDialog.test: we can use the test constraint "win" because both "nt" and "testwinevent" imply "win". That's what commit [b63a9af7c9] implements. login: erikleunissen ------------------------------------------------------------ See Tcl/Tk development @ http://core.tcl-lang.org/ ------------------------------------------------------------ |