Skip to content

Commit

Permalink
group threaded testsets to show one report
Browse files Browse the repository at this point in the history
  • Loading branch information
IanButterworth committed Mar 22, 2023
1 parent c91ccfe commit 612ec41
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions test/threads_exec.jl
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,8 @@ end
# (expected test duration is about 18-180 seconds)
Timer(t -> killjob("KILLING BY THREAD TEST WATCHDOG\n"), 1200)

@testset """threads_exec.jl with JULIA_NUM_THREADS == $(ENV["JULIA_NUM_THREADS"])""" begin

@test Threads.threadid() == 1
@test 1 <= threadpoolsize() <= Threads.maxthreadid()

Expand Down Expand Up @@ -232,7 +234,7 @@ end
# Make sure that eval'ing in a different module doesn't mess up other threads
orig_curmodule14726 = @__MODULE__
main_var14726 = 1
module M14726
@eval Main module M14726
module_var14726 = 1
end

Expand All @@ -252,7 +254,7 @@ end
@test @__MODULE__() == orig_curmodule14726
end

module M14726_2
@eval Main module M14726_2
using Test
using Base.Threads
@threads for i in 1:100
Expand Down Expand Up @@ -1067,3 +1069,5 @@ end
popfirst!(LOAD_PATH)
end
end

end # main testset

0 comments on commit 612ec41

Please sign in to comment.