Skip to main content

Module test

Module test 

Source
Expand description

Build-and-run steps for ./x.py test test fixtures

./x.py test (aka Kind::Test) is currently allowed to reach build steps in other modules. However, this contains ~all test parts we expect people to be able to build and run locally.

Modulesยง

compiletest ๐Ÿ”’
failed_tests

Macrosยง

test ๐Ÿ”’
Declares a test step that invokes compiletest on a particular test suite.
test_book ๐Ÿ”’

Structsยง

AssemblyGcc
AssemblyLlvm
BookTest ๐Ÿ”’
Runs the documentation tests for a book in src/doc using the rustdoc of test_compiler.
Bootstrap
BootstrapPy ๐Ÿ”’
Runs unit tests in bootstrap_test.py, which test the Python parts of bootstrap.
BuildStd
Cargo
Runs cargo test for cargo itself. We label these tests as โ€œcargo self-testsโ€.
CargoMiri
Runs cargo miri test to demonstrate that src/tools/miri/cargo-miri works and that libtest works under miri.
Cargotest
Builds cargo and then runs the src/tools/cargotest tool, which checks out some representative crate repositories and runs cargo test on them, in order to test cargo.
Clippy
CodegenCranelift
CodegenGCC
CodegenLlvm
CodegenUnits
CollectLicenseMetadata
Runs the tool src/tools/collect-license-metadata in ONLY_CHECK=1 mode, which verifies that license-metadata.json is up-to-date and therefore running the tool normally would not update anything.
Compiletest ๐Ÿ”’
Executes the compiletest tool to run a suite of tests.
CompiletestTest
Coverage
Runs the coverage test suite at tests/coverage in some or all of the coverage test modes.
CoverageRunRustdoc
Crashes
Crate
Runs cargo test for standard library crates.
CrateBootstrap
Runs cargo test on various internal tools used by bootstrap.
CrateBuildHelper
CrateLibrustc
Runs cargo test for the compiler crates in compiler/.
CrateRunMakeSupport
Runs cargo test on the src/tools/run-make-support crate. That crate is used by run-make tests.
CrateRustdoc
Run cargo tests for the rustdoc crate. Rustdoc is special in various ways, which is why this step is different from Crate.
CrateRustdocJsonTypes
Debuginfo
Distcheck
EditionGuide
EmbeddedBook
ErrorIndex
HtmlCheck
Incremental
IntrinsicTest
Runs stdarchโ€™s intrinsic-test binary crate to verify that Rustโ€™s core::arch SIMD intrinsics produce the same results as their C counterparts.
Linkcheck
LintDocs
MirOpt
Miri
Nomicon
Pretty
Priroda
Reference
RemoteCopyLibs
Some test suites are run inside emulators or on remote devices, and most of our test binaries are linked dynamically which means we need to ship the standard library and such to the emulator ahead of time. This step represents this and is a dependency of all test suites.
RemoteTestClientTests
RunMake
RunMakeCargo
RustAnalyzer
RustByExample
RustInstaller
RustcBook
RustdocBook
RustdocGUI
Run GUI tests on a given rustdoc.
RustdocHtml
RustdocJSNotStd
RustdocJSStd
Test rustdoc JS for the standard library.
RustdocJson
RustdocTheme
Run the rustdoc-themes tool to test a given compiler.
RustdocUi
Rustfmt
Runs cargo test for rustfmt.
StdSemverCheck
Run cargo-semver-checks on the standard library and compare its API versus a previous baseline, using rustdoc JSON data.
StdarchGenCheck
Runs stdarchโ€™s gen-checks (arm, loongarch, hexagon) to verify the committed core_arch files are up to date with their specs. With --bless, regenerates and writes them back instead.
StdarchVerify
Runs library/stdarch/crates/stdarch-verifyโ€™s tests which cross-check the core::arch intrinsics for x86, Arm, and MIPS against the corresponding vendor references (signatures, target features, and assert_instr mappings).
TestFloatParse
Test step that does two things:
TestHelpers
Compiles native (C/C++) code that is used as helper code for tests.
TheBook
Tidy
Runs src/tools/tidy and cargo fmt --check to detect various style problems in the repository.
TierCheck
Tests the Platform Support page in the rustc book. test_compiler is used to query the actual targets that are checked.
Ui
UiFullDeps
UnstableBook

Enumsยง

CoverageModeAlias
Registers the coverage-map and coverage-run aliases, which are then forwarded to the Coverage step.
TestTarget

Functionsยง

add_cargo_target_runner ๐Ÿ”’
Tells cargo how to execute binaries built for target, e.g. under an emulator or on a remote device.
bin_path_for_cargo ๐Ÿ”’
check_if_cargo_semver_checks_is_installed ๐Ÿ”’
check_if_tidy_is_installed ๐Ÿ”’
distcheck_plain_source_tarball ๐Ÿ”’
Check that we can build some basic things from the plain source tarball
distcheck_rust_src ๐Ÿ”’
Check that rust-src has all of libstdโ€™s dependencies
distcheck_rustc_dev ๐Ÿ”’
Check that rustc-devโ€™s compiler crate source code can be loaded with cargo metadata
get_browser_ui_test_version ๐Ÿ”’
get_browser_ui_test_version_inner ๐Ÿ”’
get_compiler_to_test ๐Ÿ”’
markdown_test ๐Ÿ”’
prepare_cargo_test ๐Ÿ”’
Given a cargo test subcommand, pass it the appropriate test flags given a builder.
run_cargo_test ๐Ÿ”’
Given a cargo test subcommand, add the appropriate flags and run it.
testdir ๐Ÿ”’