Module executor

Module executor 

Source
Expand description

This module contains a reimplementation of the subset of libtest functionality needed by compiletest.

FIXME(Zalathar): Much of this code was originally designed to mimic libtest as closely as possible, for ease of migration. Now that libtest is no longer used, we can potentially redesign things to be a better fit for compiletest.

ModulesΒ§

deadline πŸ”’
json πŸ”’
Collects statistics and emits suite/test events as JSON messages, using the same JSON format as libtest’s JSON formatter.

StructsΒ§

CollectedTest πŸ”’
Information that was historically needed to create a libtest TestDescAndFn.
CollectedTestDesc πŸ”’
Information that was historically needed to create a libtest TestDesc.
RunnableTest πŸ”’
RunningTest πŸ”’
TestCompletion πŸ”’
Test completion message sent by individual test threads when their test finishes (successfully or unsuccessfully).
TestId πŸ”’

EnumsΒ§

CaptureKind πŸ”’
ColorConfig
Whether console output should be colored or not.
ShouldPanic πŸ”’
Whether test is expected to panic or not.
TestOutcome πŸ”’

FunctionsΒ§

__rust_begin_short_backtrace πŸ”’
Fixed frame used to clean the backtrace with RUST_BACKTRACE=1.
filter_tests πŸ”’
Applies command-line arguments for filtering/skipping tests by name.
get_concurrency πŸ”’
Determines the number of tests to run concurrently.
run_test_inner πŸ”’
Runs a single test, within the dedicated thread spawned by the caller.
run_tests πŸ”’
spawn_test_thread πŸ”’
Spawns a thread to run a single test, and returns the thread’s join handle.