File tree Expand file tree Collapse file tree 2 files changed +6
-0
lines changed Expand file tree Collapse file tree 2 files changed +6
-0
lines changed Original file line number Diff line number Diff line change @@ -2014,6 +2014,9 @@ end
20142014
20152015function get_threads_spec ()
20162016 if haskey (ENV , " JULIA_NUM_THREADS" )
2017+ if isempty (ENV [" JULIA_NUM_THREADS" ])
2018+ throw (ArgumentError (" JULIA_NUM_THREADS is set to an empty string. It is not clear what Pkg.test should set for `-t` on the test worker." ))
2019+ end
20172020 # if set, prefer JULIA_NUM_THREADS because this is passed to the test worker via --threads
20182021 # which takes precedence in the worker
20192022 ENV [" JULIA_NUM_THREADS" ]
Original file line number Diff line number Diff line change @@ -2128,6 +2128,7 @@ end
21282128 withenv (
21292129 " EXPECTED_NUM_THREADS_DEFAULT" => " $default_nthreads_default " ,
21302130 " EXPECTED_NUM_THREADS_INTERACTIVE" => " $default_nthreads_interactive " ,
2131+ " JULIA_NUM_THREADS" => nothing ,
21312132 ) do
21322133 Pkg. test (" TestThreads" )
21332134 end
@@ -2154,6 +2155,7 @@ end
21542155 withenv (
21552156 " EXPECTED_NUM_THREADS_DEFAULT" => " $other_nthreads_default " ,
21562157 " EXPECTED_NUM_THREADS_INTERACTIVE" => " $default_nthreads_interactive " ,
2158+ " JULIA_NUM_THREADS" => nothing ,
21572159 ) do
21582160 Pkg. test (" TestThreads" ; julia_args= ` --threads=$other_nthreads_default ` )
21592161 end
@@ -2162,6 +2164,7 @@ end
21622164 withenv (
21632165 " EXPECTED_NUM_THREADS_DEFAULT" => " $other_nthreads_default " ,
21642166 " EXPECTED_NUM_THREADS_INTERACTIVE" => " $other_nthreads_interactive " ,
2167+ " JULIA_NUM_THREADS" => nothing ,
21652168 ) do
21662169 Pkg. test (" TestThreads" ; julia_args= ` --threads=$other_nthreads_default ,$other_nthreads_interactive ` )
21672170 end
You can’t perform that action at this time.
0 commit comments