pub struct Config {Show 80 fields
pub bless: bool,
pub compile_lib_path: PathBuf,
pub run_lib_path: PathBuf,
pub rustc_path: PathBuf,
pub cargo_path: Option<PathBuf>,
pub rustdoc_path: Option<PathBuf>,
pub coverage_dump_path: Option<PathBuf>,
pub python: String,
pub jsondocck_path: Option<String>,
pub jsondoclint_path: Option<String>,
pub llvm_filecheck: Option<PathBuf>,
pub llvm_bin_dir: Option<PathBuf>,
pub run_clang_based_tests_with: Option<String>,
pub src_base: PathBuf,
pub build_base: PathBuf,
pub sysroot_base: PathBuf,
pub stage_id: String,
pub mode: Mode,
pub suite: String,
pub debugger: Option<Debugger>,
pub run_ignored: bool,
pub with_rustc_debug_assertions: bool,
pub with_std_debug_assertions: bool,
pub filters: Vec<String>,
pub skip: Vec<String>,
pub filter_exact: bool,
pub force_pass_mode: Option<PassMode>,
pub run: Option<bool>,
pub logfile: Option<PathBuf>,
pub runner: Option<String>,
pub host_rustcflags: Vec<String>,
pub target_rustcflags: Vec<String>,
pub rust_randomized_layout: bool,
pub optimize_tests: bool,
pub target: String,
pub host: String,
pub cdb: Option<OsString>,
pub cdb_version: Option<[u16; 4]>,
pub gdb: Option<String>,
pub gdb_version: Option<u32>,
pub lldb_version: Option<u32>,
pub llvm_version: Option<Version>,
pub system_llvm: bool,
pub android_cross_path: PathBuf,
pub adb_path: String,
pub adb_test_dir: String,
pub adb_device_status: bool,
pub lldb_python_dir: Option<String>,
pub verbose: bool,
pub format: OutputFormat,
pub color: ColorConfig,
pub remote_test_client: Option<PathBuf>,
pub compare_mode: Option<CompareMode>,
pub rustfix_coverage: bool,
pub has_html_tidy: bool,
pub has_enzyme: bool,
pub channel: String,
pub git_hash: bool,
pub edition: Option<String>,
pub cc: String,
pub cxx: String,
pub cflags: String,
pub cxxflags: String,
pub ar: String,
pub target_linker: Option<String>,
pub host_linker: Option<String>,
pub llvm_components: String,
pub nodejs: Option<String>,
pub npm: Option<String>,
pub force_rerun: bool,
pub only_modified: bool,
pub target_cfgs: OnceLock<TargetCfgs>,
pub builtin_cfg_names: OnceLock<HashSet<String>>,
pub nocapture: bool,
pub git_repository: String,
pub nightly_branch: String,
pub git_merge_commit_email: String,
pub profiler_runtime: bool,
pub diff_command: Option<String>,
pub minicore_path: PathBuf,
}
Expand description
Configuration for compiletest
Fields§
§bless: bool
true
to overwrite stderr/stdout files instead of complaining about changes in output.
compile_lib_path: PathBuf
The library paths required for running the compiler.
run_lib_path: PathBuf
The library paths required for running compiled programs.
rustc_path: PathBuf
The rustc executable.
cargo_path: Option<PathBuf>
The cargo executable.
rustdoc_path: Option<PathBuf>
The rustdoc executable.
coverage_dump_path: Option<PathBuf>
The coverage-dump executable.
python: String
The Python executable to use for LLDB and htmldocck.
jsondocck_path: Option<String>
The jsondocck executable.
jsondoclint_path: Option<String>
The jsondoclint executable.
llvm_filecheck: Option<PathBuf>
The LLVM FileCheck
binary path.
llvm_bin_dir: Option<PathBuf>
Path to LLVM’s bin directory.
run_clang_based_tests_with: Option<String>
The path to the Clang executable to run Clang-based tests with. If
None
then these tests will be ignored.
src_base: PathBuf
The directory containing the tests to run
build_base: PathBuf
The directory where programs should be built
sysroot_base: PathBuf
The directory containing the compiler sysroot
stage_id: String
The name of the stage being built (stage1, etc)
mode: Mode
The test mode, e.g. ui or debuginfo.
suite: String
The test suite (essentially which directory is running, but without the directory prefix such as tests)
debugger: Option<Debugger>
The debugger to use in debuginfo mode. Unset otherwise.
run_ignored: bool
Run ignored tests
with_rustc_debug_assertions: bool
Whether rustc was built with debug assertions.
with_std_debug_assertions: bool
Whether std was built with debug assertions.
filters: Vec<String>
Only run tests that match these filters
skip: Vec<String>
Skip tests matching these substrings. Corresponds to
test::TestOpts::skip
. filter_exact
does not apply to these flags.
filter_exact: bool
Exactly match the filter, rather than a substring
force_pass_mode: Option<PassMode>
Force the pass mode of a check/build/run-pass test to this mode.
run: Option<bool>
Explicitly enable or disable running.
logfile: Option<PathBuf>
Write out a parseable log of tests that were run
runner: Option<String>
A command line to prefix program execution with, for running under valgrind for example.
Similar to CARGO_*_RUNNER
configuration.
host_rustcflags: Vec<String>
Flags to pass to the compiler when building for the host
target_rustcflags: Vec<String>
Flags to pass to the compiler when building for the target
rust_randomized_layout: bool
Whether the compiler and stdlib has been built with randomized struct layouts
optimize_tests: bool
Whether tests should be optimized by default. Individual test-suites and test files may override this setting.
target: String
Target system to be tested
host: String
Host triple for the compiler being invoked
cdb: Option<OsString>
Path to / name of the Microsoft Console Debugger (CDB) executable
cdb_version: Option<[u16; 4]>
Version of CDB
gdb: Option<String>
Path to / name of the GDB executable
gdb_version: Option<u32>
Version of GDB, encoded as ((major * 1000) + minor) * 1000 + patch
lldb_version: Option<u32>
Version of LLDB
llvm_version: Option<Version>
Version of LLVM
system_llvm: bool
Is LLVM a system LLVM
android_cross_path: PathBuf
Path to the android tools
adb_path: String
Extra parameter to run adb on arm-linux-androideabi
adb_test_dir: String
Extra parameter to run test suite on arm-linux-androideabi
adb_device_status: bool
status whether android device available or not
lldb_python_dir: Option<String>
the path containing LLDB’s Python module
verbose: bool
Explain what’s going on
format: OutputFormat
Print one character per test instead of one line
color: ColorConfig
Whether to use colors in test.
remote_test_client: Option<PathBuf>
where to find the remote test client process, if we’re using it
compare_mode: Option<CompareMode>
mode describing what file the actual ui output will be compared to
rustfix_coverage: bool
If true, this will generate a coverage file with UI test files that run MachineApplicable
diagnostics but are missing run-rustfix
annotations. The generated coverage file is
created in /<build_base>/rustfix_missing_coverage.txt
has_html_tidy: bool
whether to run tidy
(html-tidy) when a rustdoc test fails
has_enzyme: bool
whether to run enzyme
autodiff tests
channel: String
The current Rust channel
git_hash: bool
Whether adding git commit information such as the commit hash has been enabled for building
edition: Option<String>
The default Rust edition
cc: String
§cxx: String
§cflags: String
§cxxflags: String
§ar: String
§target_linker: Option<String>
§host_linker: Option<String>
§llvm_components: String
§nodejs: Option<String>
Path to a NodeJS executable. Used for JS doctests, emscripten and WASM tests
npm: Option<String>
Path to a npm executable. Used for rustdoc GUI tests
force_rerun: bool
Whether to rerun tests even if the inputs are unchanged.
only_modified: bool
Only rerun the tests that result has been modified according to Git status
target_cfgs: OnceLock<TargetCfgs>
§builtin_cfg_names: OnceLock<HashSet<String>>
§nocapture: bool
§git_repository: String
§nightly_branch: String
§git_merge_commit_email: String
§profiler_runtime: bool
True if the profiler runtime is enabled for this target. Used by the “needs-profiler-runtime” directive in test files.
diff_command: Option<String>
Command for visual diff display, e.g. diff-tool --color=always
.
minicore_path: PathBuf
Path to minicore aux library, used for no_core
tests that need core
stubs in
cross-compilation scenarios that do not otherwise want/need to -Zbuild-std
. Used in e.g.
ABI tests.
Implementations§
Source§impl Config
impl Config
pub fn run_enabled(&self) -> bool
pub fn target_cfgs(&self) -> &TargetCfgs
pub fn target_cfg(&self) -> &TargetCfg
pub fn matches_arch(&self, arch: &str) -> bool
pub fn matches_os(&self, os: &str) -> bool
pub fn matches_env(&self, env: &str) -> bool
pub fn matches_abi(&self, abi: &str) -> bool
pub fn matches_family(&self, family: &str) -> bool
pub fn is_big_endian(&self) -> bool
pub fn get_pointer_width(&self) -> u32
pub fn can_unwind(&self) -> bool
Sourcepub fn builtin_cfg_names(&self) -> &HashSet<String>
pub fn builtin_cfg_names(&self) -> &HashSet<String>
Get the list of builtin, ‘well known’ cfg names
pub fn has_threads(&self) -> bool
pub fn has_asm_support(&self) -> bool
pub fn git_config(&self) -> GitConfig<'_>
Source§impl Config
impl Config
fn parse_and_update_revisions( &self, testfile: &Path, line: &str, existing: &mut Vec<String>, )
fn parse_env(nv: String) -> (String, String)
fn parse_pp_exact(&self, line: &str, testfile: &Path) -> Option<PathBuf>
fn parse_custom_normalization( &self, line: &str, prefix: &str, ) -> Option<(String, String)>
fn parse_name_directive(&self, line: &str, directive: &str) -> bool
fn parse_negative_name_directive(&self, line: &str, directive: &str) -> bool
pub fn parse_name_value_directive( &self, line: &str, directive: &str, ) -> Option<String>
pub fn find_rust_src_root(&self) -> Option<PathBuf>
fn parse_edition(&self, line: &str) -> Option<String>
fn set_name_directive(&self, line: &str, directive: &str, value: &mut bool)
fn set_name_value_directive<T>( &self, line: &str, directive: &str, value: &mut Option<T>, parse: impl FnOnce(String) -> T, )
fn push_name_value_directive<T>( &self, line: &str, directive: &str, values: &mut Vec<T>, parse: impl FnOnce(String) -> T, )
Trait Implementations§
Auto Trait Implementations§
impl !Freeze for Config
impl RefUnwindSafe for Config
impl Send for Config
impl Sync for Config
impl Unpin for Config
impl UnwindSafe for Config
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> WithSubscriber for T
impl<T> WithSubscriber for T
Source§fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
Source§fn with_current_subscriber(self) -> WithDispatch<Self>
fn with_current_subscriber(self) -> WithDispatch<Self>
Layout§
Note: Most layout information is completely unstable and may even differ between compilations. The only exception is types with certain repr(...)
attributes. Please see the Rust Reference's “Type Layout” chapter for details on type layout guarantees.
Size: 1920 bytes