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ยง

Assembly
BookTest ๐Ÿ”’
Bootstrap
Cargo
Runs cargo test for cargo itself.
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
Codegen
CodegenCranelift
CodegenGCC
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 ๐Ÿ”’
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
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
RustAnalyzer
RustByExample
RustInstaller
RustcBook
Rustdoc
RustdocBook
RustdocGUI
RustdocJSNotStd
RustdocJSStd
RustdocJson
RustdocTheme
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
Ui
UiFullDeps
UnstableBook

Constantsยง

ADB_TEST_DIR ๐Ÿ”’

Functionsยง

check_if_tidy_is_installed ๐Ÿ”’
get_browser_ui_test_version ๐Ÿ”’
get_browser_ui_test_version_inner ๐Ÿ”’
markdown_test ๐Ÿ”’
path_for_cargo ๐Ÿ”’
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 ๐Ÿ”’