Revision 6f26e4fd099505f046a2bfb96e76e68a66f0b748 authored by Jishnu Bhattacharya on 27 June 2023, 13:53:31 UTC, committed by GitHub on 27 June 2023, 13:53:31 UTC
* Throw on promotion failure in UnitRange

* rename variables
1 parent fc8b700
Raw File
gc.jl
# This file is a part of Julia. License is MIT: https://julialang.org/license

using Test

function run_gctest(file)
    let cmd = `$(Base.julia_cmd()) --depwarn=error --rr-detach --startup-file=no $file`
        @testset for test_nthreads in (1, 2, 4)
            new_env = copy(ENV)
            new_env["JULIA_NUM_THREADS"] = string(test_nthreads)
            new_env["JULIA_NUM_GC_THREADS"] = string(test_nthreads)
            @test success(run(pipeline(setenv(cmd, new_env), stdout = stdout, stderr = stderr)))
        end
    end
end

# !!! note:
#     Since we run our tests on 32bit OS as well we confine ourselves
#     to parameters that allocate about 512MB of objects. Max RSS is lower
#     than that.
@testset "GC threads" begin
    run_gctest("gc/binarytree.jl")
    run_gctest("gc/linkedlist.jl")
    run_gctest("gc/objarray.jl")
    run_gctest("gc/chunks.jl")
end
back to top