Skip to main content

Crate run_make_support

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 bootstrap 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 crate::artifact_names::bin_name;
pub use crate::artifact_names::dynamic_lib_extension;
pub use crate::artifact_names::dynamic_lib_name;
pub use crate::artifact_names::msvc_import_dynamic_lib_name;
pub use crate::artifact_names::rust_lib_name;
pub use crate::artifact_names::static_lib_name;
pub use crate::assertion_helpers::assert_contains;
pub use crate::assertion_helpers::assert_contains_regex;
pub use crate::assertion_helpers::assert_count_is;
pub use crate::assertion_helpers::assert_dirs_are_equal;
pub use crate::assertion_helpers::assert_equals;
pub use crate::assertion_helpers::assert_not_contains;
pub use crate::assertion_helpers::assert_not_contains_regex;
pub use crate::command::CompletedProcess;
pub use crate::diff::Diff;
pub use crate::diff::diff;
pub use crate::env::env_var;
pub use crate::env::env_var_os;
pub use crate::env::set_current_dir;
pub use crate::external_deps::c_build::build_native_dynamic_lib;
pub use crate::external_deps::c_build::build_native_static_lib;
pub use crate::external_deps::c_build::build_native_static_lib_cxx;
pub use crate::external_deps::c_build::build_native_static_lib_optimized;
pub use crate::external_deps::c_cxx_compiler::Cc;
pub use crate::external_deps::c_cxx_compiler::Gcc;
pub use crate::external_deps::c_cxx_compiler::cc;
pub use crate::external_deps::c_cxx_compiler::cxx;
pub use crate::external_deps::c_cxx_compiler::extra_c_flags;
pub use crate::external_deps::c_cxx_compiler::extra_cxx_flags;
pub use crate::external_deps::c_cxx_compiler::extra_linker_flags;
pub use crate::external_deps::c_cxx_compiler::gcc;
pub use crate::external_deps::cargo::cargo;
pub use crate::external_deps::clang::Clang;
pub use crate::external_deps::clang::clang;
pub use crate::external_deps::htmldocck::htmldocck;
pub use crate::external_deps::llvm;
pub use crate::external_deps::llvm::LlvmAr;
pub use crate::external_deps::llvm::LlvmBcanalyzer;
pub use crate::external_deps::llvm::LlvmDis;
pub use crate::external_deps::llvm::LlvmDwarfdump;
pub use crate::external_deps::llvm::LlvmFilecheck;
pub use crate::external_deps::llvm::LlvmNm;
pub use crate::external_deps::llvm::LlvmObjcopy;
pub use crate::external_deps::llvm::LlvmObjdump;
pub use crate::external_deps::llvm::LlvmProfdata;
pub use crate::external_deps::llvm::LlvmReadobj;
pub use crate::external_deps::llvm::llvm_ar;
pub use crate::external_deps::llvm::llvm_as;
pub use crate::external_deps::llvm::llvm_bcanalyzer;
pub use crate::external_deps::llvm::llvm_dis;
pub use crate::external_deps::llvm::llvm_dwarfdump;
pub use crate::external_deps::llvm::llvm_filecheck;
pub use crate::external_deps::llvm::llvm_nm;
pub use crate::external_deps::llvm::llvm_objcopy;
pub use crate::external_deps::llvm::llvm_objdump;
pub use crate::external_deps::llvm::llvm_profdata;
pub use crate::external_deps::llvm::llvm_readobj;
pub use crate::external_deps::python::python_command;
pub use crate::external_deps::rustc;
pub use crate::external_deps::rustc::Rustc;
pub use crate::external_deps::rustc::bare_rustc;
pub use crate::external_deps::rustc::rustc;
pub use crate::external_deps::rustc::rustc_minicore;
pub use crate::external_deps::rustc::rustc_path;
pub use crate::external_deps::rustc::stable_bare_rustc;
pub use crate::external_deps::rustdoc::Rustdoc;
pub use crate::external_deps::rustdoc::bare_rustdoc;
pub use crate::external_deps::rustdoc::rustdoc;
pub use crate::path_helpers::build_root;
pub use crate::path_helpers::cwd;
pub use crate::path_helpers::filename_contains;
pub use crate::path_helpers::filename_not_in_denylist;
pub use crate::path_helpers::has_extension;
pub use crate::path_helpers::has_prefix;
pub use crate::path_helpers::has_suffix;
pub use crate::path_helpers::not_contains;
pub use crate::path_helpers::path;
pub use crate::path_helpers::recursive_find_files;
pub use crate::path_helpers::shallow_find_directories;
pub use crate::path_helpers::shallow_find_files;
pub use crate::path_helpers::source_root;
pub use crate::run::cmd;
pub use crate::run::run;
pub use crate::run::run_fail;
pub use crate::run::run_fail_with_args;
pub use crate::run::run_with_args;
pub use crate::scoped_run::run_in_tmpdir;
pub use crate::scoped_run::test_while_readonly;
pub use crate::string::count_regex_matches_in_files_with_extension;
pub use crate::string::invalid_utf8_contains;
pub use crate::string::invalid_utf8_not_contains;
pub use crate::targets::apple_os;
pub use crate::targets::is_aix;
pub use crate::targets::is_arm64ec;
pub use crate::targets::is_darwin;
pub use crate::targets::is_win7;
pub use crate::targets::is_windows;
pub use crate::targets::is_windows_gnu;
pub use crate::targets::is_windows_msvc;
pub use crate::targets::llvm_components_contain;
pub use crate::targets::target;
pub use crate::targets::uname;
pub use bstr;
pub use gimli;
pub use libc;
pub use object;
pub use regex;
pub use rustdoc_json_types;
pub use serde_json;
pub use similar;
pub use tempfile;
pub use wasmparser;

Modulesยง

artifact_names
A collection of helpers to construct artifact names, such as names of dynamic or static libraries which are target-dependent.
assertion_helpers
Collection of assertions and assertion-related helpers.
command ๐Ÿ”’
diff
env
external_deps
This module contains external tool dependencies that we assume are available in the environment, such as cc or python.
fs ๐Ÿ”’
linker
macros ๐Ÿ”’
obj
Helpers for working with types from the [object] crate.
parallel
path_helpers
Collection of path-related helpers.
rfs
std::fs wrappers and assorted filesystem-related helpers. Public to tests as rfs to not be confused with std::fs.
run
scoped_run
Collection of helpers that try to maintain certain properties while running a test closure.
string
symbols
Older version of the obj module. Prefer importing from there instead.
targets
util ๐Ÿ”’
wasm
Wasm-specific helpers for various tests