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.
RunningTest πŸ”’
TestCompletion πŸ”’
Test completion message sent by individual test threads when their test finishes (successfully or unsuccessfully).
TestId πŸ”’
TestThreadArgs πŸ”’
All of the owned data needed by test_thread_main.

EnumsΒ§

CaptureKind πŸ”’
ColorConfig
Whether console output should be colored or not.
ShouldFail πŸ”’
Tests with //@ should-fail are tests of compiletest itself, and should be reported as successful if and only if they would have failed.
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_tests πŸ”’
spawn_test_thread πŸ”’
Spawns a thread to run a single test, and returns the thread’s join handle.
test_thread_main πŸ”’
Runs a single test, within the dedicated thread spawned by the caller.