diff --git a/src/API.jl b/src/API.jl index 88e33204fb..212d2c3de1 100644 --- a/src/API.jl +++ b/src/API.jl @@ -1131,7 +1131,8 @@ end function precompile(ctx::Context, pkgs::Vector{PackageSpec}; internal_call::Bool=false, strict::Bool=false, warn_loaded = true, already_instantiated = false, timing::Bool = false, - _from_loading::Bool=false, flags_cacheflags::Pair{Cmd, Base.CacheFlags}=(``=>Base.CacheFlags()), kwargs...) + _from_loading::Bool=false, configs::Union{Base.Precompilation.Config,Vector{Base.Precompilation.Config}}=(``=>Base.CacheFlags()), + kwargs...) Context!(ctx; kwargs...) if !already_instantiated instantiate(ctx; allow_autoprecomp=false, kwargs...) @@ -1154,7 +1155,7 @@ function precompile(ctx::Context, pkgs::Vector{PackageSpec}; internal_call::Bool activate(dirname(ctx.env.project_file)) do pkgs_name = String[pkg.name for pkg in pkgs] - return Base.Precompilation.precompilepkgs(pkgs_name; internal_call, strict, warn_loaded, timing, _from_loading, flags_cacheflags, io) + return Base.Precompilation.precompilepkgs(pkgs_name; internal_call, strict, warn_loaded, timing, _from_loading, configs, io) end end diff --git a/src/Operations.jl b/src/Operations.jl index 21ff8297f5..7e837c74c8 100644 --- a/src/Operations.jl +++ b/src/Operations.jl @@ -1753,7 +1753,6 @@ function gen_subprocess_flags(source_path::String; coverage, julia_args) --inline=$(Bool(Base.JLOptions().can_inline) ? "yes" : "no") --startup-file=$(Base.JLOptions().startupfile == 1 ? "yes" : "no") --track-allocation=$(("none", "user", "all")[Base.JLOptions().malloc_log + 1]) - --threads=$(get_threads_spec()) $(julia_args) ``` end @@ -2047,14 +2046,14 @@ function test(ctx::Context, pkgs::Vector{PackageSpec}; if should_autoprecompile() cacheflags = Base.CacheFlags(parse(UInt8, read(`$(Base.julia_cmd()) $(flags) --eval 'show(ccall(:jl_cache_flags, UInt8, ()))'`, String))) Pkg.activate(sandbox_ctx.env.project_file; #=io=devnull=#) do - Pkg.precompile(sandbox_ctx; io=sandbox_ctx.io, flags_cacheflags = flags => cacheflags) + Pkg.precompile(sandbox_ctx; io=sandbox_ctx.io, configs = flags => cacheflags) end end printpkgstyle(ctx.io, :Testing, "Running tests...") flush(ctx.io) code = gen_test_code(source_path; test_args) - cmd = `$(Base.julia_cmd()) $(flags) --eval $code` + cmd = `$(Base.julia_cmd()) $(flags) --threads=$(get_threads_spec()) --eval $code` p, interrupted = subprocess_handler(cmd, ctx, sandbox_ctx, "Tests interrupted. Exiting the test process") if success(p) printpkgstyle(ctx.io, :Testing, pkg.name * " tests passed ")