Skip to content

Commit

Permalink
Don't create a testset for each potential test file. (#2338)
Browse files Browse the repository at this point in the history
This cleans up the output when running the tests, as there is no output for files that are excluded.

Previously, the output was like:

Test Summary: | Pass  Total
Containers    |  241    241
Containers.jl took 37.4 seconds.
Test Summary:    |
JuMPExtension.jl | No tests
callbacks.jl took 15.9 seconds.
Test Summary: | Pass  Total
callbacks.jl  |   22     22

With this patch:

Test Summary: | Pass  Total
Containers    |  241    241
Containers.jl took 22.0 seconds.
callbacks.jl took 16.8 seconds.
Test Summary: | Pass  Total
callbacks.jl  |   22     22
  • Loading branch information
dourouc05 authored Sep 26, 2020
1 parent cd32c6d commit eaa22fa
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions test/runtests.jl
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ t = time()
include("Containers/Containers.jl")
println("Containers.jl took $(round(time() - t; digits = 1)) seconds.")

@testset "$(file)" for file in filter(f -> endswith(f, ".jl"), readdir(@__DIR__))
for file in filter(f -> endswith(f, ".jl"), readdir(@__DIR__))
if file in [
"runtests.jl",
"utilities.jl",
Expand All @@ -26,9 +26,12 @@ println("Containers.jl took $(round(time() - t; digits = 1)) seconds.")
]
continue
end
t = time()
include(file)
println("$(file) took $(round(time() - t; digits = 1)) seconds.")

@testset "$(file)" begin
t = time()
include(file)
println("$(file) took $(round(time() - t; digits = 1)) seconds.")
end
end

# TODO: The hygiene test should run in a separate Julia instance where JuMP
Expand Down

0 comments on commit eaa22fa

Please sign in to comment.