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::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§
Macros§
- Implement common helpers for command wrappers. This assumes that the command wrapper is a struct containing a
cmd: Commandfield and aoutputfunction. The provided helpers are:
Functions§
- Check that
haystackdoes not containneedle. Panic otherwise. - Construct the binary name based on platform.
- Copy a directory into another.
- Use
cygpath -won a path to get a Windows path string back. This assumes thatcygpathis available on the platform! - Construct a path to a dynamic library under
$TMPDIRgiven the library name. This will return a path with$TMPDIRjoined with platform-and-compiler-specific library name. - 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.
- Check that all files in
dir1exist and have the same content indir2. Panic otherwise. - Construct a path to a rust library (rlib) under
$TMPDIRgiven the library name. This will return a path with$TMPDIRjoined with the library name. - Generate the name a rust library (rlib) would have. If you want the complete path, use
rust_libinstead. - Set the runtime library path as needed for running the host rustc/rustdoc/etc.
- Path to the root rust-lang/rust source checkout.
- Construct a path to a static library under
$TMPDIRgiven the library name. This will return a path with$TMPDIRjoined with platform-and-compiler-specific library name. - Construct the static library name based on the platform.
TARGET- Path of
TMPDIR(a temporary build directory, not under/tmp). - Run
uname. This assumes thatunameis available on the platform!