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.

MacrosΒ§

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

StructsΒ§

AssemblyLlvm
BookTest πŸ”’
Runs the documentation tests for a book in src/doc using the rustdoc of test_compiler.
Bootstrap
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
Linkcheck
LintDocs
MirOpt
Miri
Nomicon
Pretty
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.
RunMake
RunMakeCargo
RustAnalyzer
RustByExample
RustInstaller
RustcBook
Rustdoc
RustdocBook
RustdocGUI
Run GUI tests on a given rustdoc.
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.
TestFloatParse
Test step that does two things:
TestHelpers
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

ConstantsΒ§

ADB_TEST_DIR πŸ”’

FunctionsΒ§

bin_path_for_cargo πŸ”’
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 πŸ”’