@@ -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 )
583583"""
584584 runtests(mod::Module, args::ParsedArgs;
585585 testsuite::Dict{String,Expr}=find_tests(pwd()),
586- RecordType = TestRecord,
587586 init_code = :(),
588587 test_worker = Returns(nothing),
589588 stdout = Base.stdout,
@@ -603,7 +602,6 @@ Several keyword arguments are also supported:
603602
604603- `testsuite`: Dictionary mapping test names to expressions to execute (default: `find_tests(pwd())`).
605604 By default, automatically discovers all `.jl` files in the test directory.
606- - `RecordType`: Type of test record to use for tracking test results (default: `TestRecord`)
607605- `init_code`: Code use to initialize each test's sandbox module (e.g., import auxiliary
608606 packages, define constants, etc).
609607- `test_worker`: Optional function that takes a test name and returns a specific worker.
@@ -663,7 +661,7 @@ issues during long test runs. The memory limit is set based on system architectu
663661"""
664662function runtests (mod:: Module , args:: ParsedArgs ;
665663 testsuite:: Dict{String,Expr} = find_tests (pwd ()),
666- RecordType = TestRecord, init_code = :(), test_worker = Returns (nothing ),
664+ init_code = :(), test_worker = Returns (nothing ),
667665 stdout = Base. stdout , stderr = Base. stderr )
668666 #
669667 # set-up
@@ -731,8 +729,8 @@ function runtests(mod::Module, args::ParsedArgs;
731729 stderr . lock = print_lock
732730 end
733731
734- io_ctx = test_IOContext (RecordType, stdout , stderr , print_lock, name_align)
735- print_header (RecordType, io_ctx, testgroupheader, workerheader)
732+ io_ctx = test_IOContext (stdout , stderr , print_lock, name_align)
733+ print_header (io_ctx, testgroupheader, workerheader)
736734
737735 status_lines_visible = Ref (0 )
738736
@@ -829,7 +827,7 @@ function runtests(mod::Module, args::ParsedArgs;
829827 # Optionally print verbose started message
830828 if args. verbose != = nothing
831829 clear_status ()
832- print_test_started (RecordType, wrkr, test_name, io_ctx)
830+ print_test_started (wrkr, test_name, io_ctx)
833831 end
834832
835833 elseif msg_type == :finished
@@ -846,7 +844,7 @@ function runtests(mod::Module, args::ParsedArgs;
846844 test_name, wrkr = msg[2 ], msg[3 ]
847845
848846 clear_status ()
849- print_test_crashed (RecordType, wrkr, test_name, io_ctx)
847+ print_test_crashed (wrkr, test_name, io_ctx)
850848 end
851849 end
852850
@@ -906,7 +904,7 @@ function runtests(mod::Module, args::ParsedArgs;
906904 put! (printer_channel, (:started , test, worker_id (wrkr)))
907905 result = try
908906 Malt. remote_eval_wait (Main, wrkr, :(import ParallelTestRunner))
909- Malt. remote_call_fetch (invokelatest, wrkr, runtest, RecordType,
907+ Malt. remote_call_fetch (invokelatest, wrkr, runtest,
910908 testsuite[test], test, init_code, io_ctx. color)
911909 catch ex
912910 if isa (ex, InterruptException)
@@ -922,7 +920,6 @@ function runtests(mod::Module, args::ParsedArgs;
922920
923921 # act on the results
924922 if result isa AbstractTestRecord
925- @assert result isa RecordType
926923 put! (printer_channel, (:finished , test, worker_id (wrkr), result))
927924
928925 if memory_usage (result) > max_worker_rss
0 commit comments