Skip to content

Show real testset durations on Julia 1.13 - #138

Merged
omus merged 1 commit into
masterfrom
cv/1.13-testset-timing
Oct 20, 2026
Merged

omus merged 1 commit into
masterfrom
cv/1.13-testset-timing

Conversation

@omus

@omus omus commented Oct 20, 2026 •

Copy link
Copy Markdown
Member

Follow up to #137

With this PR the timing is captured:

julia> using TestReports, Test, Dates
[ Info: Precompiling TestReports [dcd651b4-b50a-5b6b-8f22-87e9f253a252] (caches not reused: 1 for file size changed, 1 for different source file path)
Precompiling TestReports finished.
  1 dependency successfully precompiled in 1 seconds. 37 already precompiled.

julia> @testset ReportingTestSet "MyTests" begin
           record_testset_property("ID", 1)
           @testset "inner" begin
              @test 2 == 2
              sleep(3)
              @test 3 == 3
           end
       end;
Test Summary: | Pass  Total  Time
inner         |    2      2  3.2s

With just #137 the output was:

Test Summary: | Pass  Total  Time
inner         |    2      2  0.0s

On Julia 1.13 `DefaultTestSet.time_start` is `const`, so the 1.8-1.12
approach of overwriting it before `finish` is skipped and
`display_reporting_testset` reported only the display overhead in the
Time column (e.g. `0.1s` for a testset whose `time_taken` was 1660ms).

Pass a back-dated `time_start`, derived from the `ReportingTestSet`'s
`time_taken`, to the `DefaultTestSet` constructor instead, which
accepts it as a keyword on 1.13. XML output is unaffected since it
reads `time_taken` directly.

Co-Authored-By: Claude Opus 5.5 (claude-opus-5-5) <noreply@anthropic.com>
@omus
omus merged commit 1a99d39 into master Oct 20, 2026
14 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants