Crate run_make_support
source ·Expand description
run-make-support is a support library for run-make tests. It provides command wrappers and
convenience utility functions to help test writers reduce duplication. The support library
notably is built via cargo: this means that if your test wants some non-trivial utility, such
as object or wasmparser, they can be re-exported and be made available through this library.
Re-exports§
pub use cc::cc;pub use cc::extra_c_flags;pub use cc::extra_cxx_flags;pub use cc::Cc;pub use clang::clang;pub use clang::Clang;pub use diff::diff;pub use diff::Diff;pub use llvm_readobj::llvm_readobj;pub use llvm_readobj::LlvmReadobj;pub use run::cmd;pub use run::run;pub use run::run_fail;pub use rustc::aux_build;pub use rustc::rustc;pub use rustc::Rustc;pub use rustdoc::bare_rustdoc;pub use rustdoc::rustdoc;pub use rustdoc::Rustdoc;pub use gimli;pub use object;pub use regex;pub use wasmparser;
Modules§
- command 🔒
- This module implements “drop bombs” intended for use by command wrappers to ensure that the constructed commands are eventually executed. This is exactly like
rustc_errors::Diagwhere we force everyDiagto be consumed or we emit a bug, but we panic instead.
Macros§
- Implement common helpers for command wrappers. This assumes that the command wrapper is a struct containing a
cmd: Commandfield. The provided helpers are:
Functions§
- Check that
haystackdoes not containneedle. Panic otherwise. - Construct the binary name based on platform.
- Copy a directory into another.
- Return the current working directory.
- Use
cygpath -won a path to get a Windows path string back. This assumes thatcygpathis available on the platform! - Construct the dynamic library name based on the platform.
- Check if target uses macOS.
- Check if target uses msvc.
- Check if target is windows-like.
- Returns the path for a local test file.
- Check that all files in
dir1exist and have the same content indir2. Panic otherwise. - This function is designed for running commands in a temporary directory that is cleared after the function ends.
- Generate the name a rust library (rlib) would have.
- Set the runtime library path as needed for running the host rustc/rustdoc/etc.
- Path to the root rust-lang/rust source checkout.
- Construct the static library name based on the platform.
TARGET- Run
uname. This assumes thatunameis available on the platform!