@@ -92,7 +92,7 @@ struct TestIOContext
9292 rss_align:: Int
9393end
9494
95- function test_IOContext (:: Type{TestRecord} , stdout :: IO , stderr :: IO , lock:: ReentrantLock , name_align:: Int )
95+ function test_IOContext (stdout :: IO , stderr :: IO , lock:: ReentrantLock , name_align:: Int )
9696 elapsed_align = textwidth (" Time (s)" )
9797 gc_align = textwidth (" GC (s)" )
9898 percent_align = textwidth (" GC %" )
@@ -107,7 +107,7 @@ function test_IOContext(::Type{TestRecord}, stdout::IO, stderr::IO, lock::Reentr
107107 )
108108end
109109
110- function print_header (:: Type{TestRecord} , ctx:: TestIOContext , testgroupheader, workerheader)
110+ function print_header (ctx:: TestIOContext , testgroupheader, workerheader)
111111 lock (ctx. lock)
112112 try
113113 printstyled (ctx. stdout , " " ^ (ctx. name_align + textwidth (testgroupheader) - 3 ), " │ " )
@@ -121,7 +121,7 @@ function print_header(::Type{TestRecord}, ctx::TestIOContext, testgroupheader, w
121121 end
122122end
123123
124- function print_test_started (:: Type{TestRecord} , wrkr, test, ctx:: TestIOContext )
124+ function print_test_started (wrkr, test, ctx:: TestIOContext )
125125 lock (ctx. lock)
126126 try
127127 printstyled (ctx. stdout , test, lpad (" ($wrkr )" , ctx. name_align - textwidth (test) + 1 , " " ), " │" , color = :white )
@@ -185,7 +185,7 @@ function print_test_failed(record::TestRecord, wrkr, test, ctx::TestIOContext)
185185 end
186186end
187187
188- function print_test_crashed (:: Type{TestRecord} , wrkr, test, ctx:: TestIOContext )
188+ function print_test_crashed (wrkr, test, ctx:: TestIOContext )
189189 lock (ctx. lock)
190190 try
191191 printstyled (ctx. stderr , test, color = :red )
@@ -236,7 +236,7 @@ function Test.finish(ts::WorkerTestSet)
236236 return ts. wrapped_ts
237237end
238238
239- function runtest (:: Type{TestRecord} , f, name, init_code, color)
239+ function runtest (f, name, init_code, color)
240240 function inner ()
241241 # generate a temporary module to execute the tests in
242242 mod = @eval (Main, module $ (gensym (name)) end )
565565"""
566566 runtests(mod::Module, args::ParsedArgs;
567567 testsuite::Dict{String,Expr}=find_tests(pwd()),
568- RecordType = TestRecord,
569568 init_code = :(),
570569 test_worker = Returns(nothing),
571570 stdout = Base.stdout,
@@ -585,7 +584,6 @@ Several keyword arguments are also supported:
585584
586585- `testsuite`: Dictionary mapping test names to expressions to execute (default: `find_tests(pwd())`).
587586 By default, automatically discovers all `.jl` files in the test directory.
588- - `RecordType`: Type of test record to use for tracking test results (default: `TestRecord`)
589587- `init_code`: Code use to initialize each test's sandbox module (e.g., import auxiliary
590588 packages, define constants, etc).
591589- `test_worker`: Optional function that takes a test name and returns a specific worker.
@@ -645,7 +643,7 @@ issues during long test runs. The memory limit is set based on system architectu
645643"""
646644function runtests (mod:: Module , args:: ParsedArgs ;
647645 testsuite:: Dict{String,Expr} = find_tests (pwd ()),
648- RecordType = TestRecord, init_code = :(), test_worker = Returns (nothing ),
646+ init_code = :(), test_worker = Returns (nothing ),
649647 stdout = Base. stdout , stderr = Base. stderr )
650648 #
651649 # set-up
@@ -713,8 +711,8 @@ function runtests(mod::Module, args::ParsedArgs;
713711 stderr . lock = print_lock
714712 end
715713
716- io_ctx = test_IOContext (RecordType, stdout , stderr , print_lock, name_align)
717- print_header (RecordType, io_ctx, testgroupheader, workerheader)
714+ io_ctx = test_IOContext (stdout , stderr , print_lock, name_align)
715+ print_header (io_ctx, testgroupheader, workerheader)
718716
719717 status_lines_visible = Ref (0 )
720718
@@ -811,7 +809,7 @@ function runtests(mod::Module, args::ParsedArgs;
811809 # Optionally print verbose started message
812810 if args. verbose != = nothing
813811 clear_status ()
814- print_test_started (RecordType, wrkr, test_name, io_ctx)
812+ print_test_started (wrkr, test_name, io_ctx)
815813 end
816814
817815 elseif msg_type == :finished
@@ -828,7 +826,7 @@ function runtests(mod::Module, args::ParsedArgs;
828826 test_name, wrkr = msg[2 ], msg[3 ]
829827
830828 clear_status ()
831- print_test_crashed (RecordType, wrkr, test_name, io_ctx)
829+ print_test_crashed (wrkr, test_name, io_ctx)
832830 end
833831 end
834832
@@ -888,7 +886,7 @@ function runtests(mod::Module, args::ParsedArgs;
888886 put! (printer_channel, (:started , test, worker_id (wrkr)))
889887 result = try
890888 Malt. remote_eval_wait (Main, wrkr, :(import ParallelTestRunner))
891- Malt. remote_call_fetch (invokelatest, wrkr, runtest, RecordType,
889+ Malt. remote_call_fetch (invokelatest, wrkr, runtest,
892890 testsuite[test], test, init_code, io_ctx. color)
893891 catch ex
894892 if isa (ex, InterruptException)
@@ -904,7 +902,6 @@ function runtests(mod::Module, args::ParsedArgs;
904902
905903 # act on the results
906904 if result isa AbstractTestRecord
907- @assert result isa RecordType
908905 put! (printer_channel, (:finished , test, worker_id (wrkr), result))
909906
910907 if memory_usage (result) > max_worker_rss
0 commit comments