-
Notifications
You must be signed in to change notification settings - Fork 28
/
Copy pathruntests.jl
28 lines (25 loc) · 1.08 KB
/
runtests.jl
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
using JuliaWebAPI
using Test
const opts = Base.JLOptions()
const inline_flag = opts.can_inline == 1 ? `` : `--inline=no`
const cov_flag = (opts.code_coverage == 1) ? `--code-coverage=user` :
(opts.code_coverage == 2) ? `--code-coverage=all` :
``
const startup_flag = `--startup-file=no`
function run_test(script, flags)
srvrscript = joinpath(dirname(@__FILE__), script)
srvrcmd = `$(joinpath(Sys.BINDIR, "julia")) $startup_flag $cov_flag $inline_flag $script $flags`
println("Running tests from ", script, "\n", "="^60)
ret = withenv("JULIA_DEPOT_PATH"=>join(DEPOT_PATH, Sys.iswindows() ? ';' : ':')) do
run(srvrcmd)
end
println("Finished ", script, "\n", "="^60)
nothing
end
run_test("test_asyncsrvr.jl", "--runasyncsrvr")
run_test("test_clntsrvr.jl", "--runclntsrvr")
run_test("test_remotecall.jl", "--runremotecall")
run_test("test_plugins.jl", "--runsermsgformat")
run_test("test_plugins.jl", "--runinproctransport")
run_test("test_httprpc.jl", "--runhttptests")
run_test("test_create_responder.jl", "--runcreateresponder")