Skip to content

Commit 8824c24

Browse files
committed
Remove unused test options.
1 parent 79cc63b commit 8824c24

File tree

3 files changed

+2
-44
lines changed

3 files changed

+2
-44
lines changed

test/Project.toml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,4 +20,3 @@ SpecialFunctions = "276daf66-3868-5448-9aa4-cd146d93841b"
2020
StaticArrays = "90137ffa-7385-5640-81b9-e52037218182"
2121
Statistics = "10745b16-79ce-11e8-11f9-7d13ad32a3b2"
2222
Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40"
23-
TimerOutputs = "a759f4b9-e2f1-59dc-863e-4aeb61b1ea8f"

test/runtests.jl

Lines changed: 1 addition & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@ using Distributed
22
using Dates
33
import REPL
44
using Printf: @sprintf
5-
using TimerOutputs
65

76
# work around JuliaLang/Pkg.jl#2500
87
if VERSION < v"1.8"
@@ -47,14 +46,12 @@ if do_help
4746
--jobs=N Launch `N` processes to perform tests (default: Sys.CPU_THREADS).
4847
--gpus=N Expose `N` GPUs to test processes (default: 1).
4948
--sanitize[=tool] Run the tests under `compute-sanitizer`.
50-
--snoop=FILE Snoop on compiled methods and save to `FILE`.
5149
5250
Remaining arguments filter the tests that will be executed.""")
5351
exit(0)
5452
end
5553
set_jobs, jobs = extract_flag!(ARGS, "--jobs"; typ=Int)
5654
do_sanitize, sanitize_tool = extract_flag!(ARGS, "--sanitize", "memcheck")
57-
do_snoop, snoop_path = extract_flag!(ARGS, "--snoop")
5855
do_thorough, _ = extract_flag!(ARGS, "--thorough")
5956
do_quickfail, _ = extract_flag!(ARGS, "--quickfail")
6057

@@ -240,12 +237,6 @@ function addworker(X; kwargs...)
240237
end
241238
addworker(min(jobs, length(tests)))
242239

243-
# prepare to snoop on the compiler
244-
if do_snoop
245-
@info "Writing trace of compiled methods to '$snoop_path'"
246-
snoop_io = open(snoop_path, "w")
247-
end
248-
249240
# pretty print information about gc and mem usage
250241
testgroupheader = "Test"
251242
workerheader = "(Worker)"
@@ -327,7 +318,6 @@ end
327318
t0 = now()
328319
results = []
329320
all_tasks = Task[]
330-
timings = TimerOutput[]
331321
try
332322
# Monitor stdin and kill this task on ^C
333323
# but don't do this on Windows, because it may deadlock in the kernel
@@ -385,7 +375,6 @@ try
385375
wrkr = p
386376

387377
local resp
388-
snoop = do_snoop ? mktemp() : (nothing, nothing)
389378

390379
# tests that muck with the context should not be timed with CUDA events,
391380
# since they won't be valid at the end of the test anymore.
@@ -394,7 +383,7 @@ try
394383
# run the test
395384
running_tests[test] = now()
396385
try
397-
resp = remotecall_fetch(runtests, wrkr, test_runners[test], test, time_source, snoop[1])
386+
resp = remotecall_fetch(runtests, wrkr, test_runners[test], test, time_source)
398387
catch e
399388
isa(e, InterruptException) && return
400389
resp = Any[e]
@@ -413,15 +402,6 @@ try
413402
else
414403
print_testworker_stats(test, wrkr, resp)
415404
end
416-
417-
# aggregate the snooped compiler invocations
418-
if do_snoop
419-
for line in eachline(snoop[2])
420-
println(snoop_io, line)
421-
end
422-
close(snoop[2])
423-
rm(snoop[1])
424-
end
425405
end
426406

427407
if p !== nothing
@@ -461,17 +441,6 @@ t1 = now()
461441
elapsed = canonicalize(Dates.CompoundPeriod(t1-t0))
462442
println("Testing finished in $elapsed")
463443

464-
# report work timings
465-
if isdefined(CUDA, :to)
466-
println()
467-
for to in timings
468-
TimerOutputs.merge!(CUDA.to, to)
469-
end
470-
TimerOutputs.complement!(CUDA.to)
471-
show(CUDA.to, sortby=:name)
472-
println()
473-
end
474-
475444
# construct a testset to render the test results
476445
o_ts = Test.DefaultTestSet("Overall")
477446
Test.push_testset(o_ts)

test/setup.jl

Lines changed: 1 addition & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -44,15 +44,10 @@ CUDA.precompile_runtime()
4444

4545
## entry point
4646

47-
function runtests(f, name, time_source=:cuda, snoop=nothing)
47+
function runtests(f, name, time_source=:cuda)
4848
old_print_setting = Test.TESTSET_PRINT_ENABLE[]
4949
Test.TESTSET_PRINT_ENABLE[] = false
5050

51-
if snoop !== nothing
52-
io = open(snoop, "w")
53-
ccall(:jl_dump_compiles, Nothing, (Ptr{Nothing},), io.handle)
54-
end
55-
5651
try
5752
# generate a temporary module to execute the tests in
5853
mod_name = Symbol("Test", rand(1:100), "Main_", replace(name, '/' => '_'))
@@ -123,11 +118,6 @@ function runtests(f, name, time_source=:cuda, snoop=nothing)
123118
CUDA.can_reset_device() && device_reset!()
124119
res
125120
finally
126-
if snoop !== nothing
127-
ccall(:jl_dump_compiles, Nothing, (Ptr{Nothing},), C_NULL)
128-
close(io)
129-
end
130-
131121
Test.TESTSET_PRINT_ENABLE[] = old_print_setting
132122
end
133123
end

0 commit comments

Comments
 (0)