You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
measure_conditions refuses a package with no condition, so a whole-tree run fails on cmd/internal/fileheader #1667
The whole-tree measurements dispatched on 31 October on main at 1ef08b1 (conditions.yml with tree=true, runs 41178598744 in branch mode and 41178600207 in condition mode) each failed on one shard, tree 15 of 20. ./cmd/internal/fileheader, added in #1562, has no condition at all, so gobco reports Branch coverage: 0/0. The script refuses a 0/0 report ("the report above measured no condition ..., which is what gobco prints when no test wrote its counts or when it declined to instrument every file"), and the shard and the run end red. The other 306 packages were measured, and the summary job still wrote both totals: 51919 of 51946 outcomes in branch mode and 62191 of 62246 in condition mode.
The guard is right to refuse a report it cannot tell from a failed instrumentation. But a package whose files hold no if, for, switch, && or || gives the same report legitimately, and the tree will keep gaining such packages.
What to change: let cmd/measure_conditions tell the two cases apart before refusing, for example by counting the conditions the package's own non-test files hold, the way gobco counts them, and recording a package with none as measured with nothing to measure (0 of 0) rather than as not measured. Then the whole-tree runs pass, and the summary counts 307 of 307 packages.
Activity
docs(testing): measure the whole tree at 3.4.0 in one run (#1668)
fix(measure_conditions): measure a package with no condition as 0 of 0 (