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§

Modules§

Macros§

  • Implement common helpers for command wrappers. This assumes that the command wrapper is a struct containing a cmd: Command field and a output function. The provided helpers are:

Functions§

  • Check that haystack does not contain needle. Panic otherwise.
  • Construct the binary name based on platform.
  • Copy a directory into another.
  • Use cygpath -w on a path to get a Windows path string back. This assumes that cygpath is available on the platform!
  • Construct a path to a dynamic library under $TMPDIR given the library name. This will return a path with $TMPDIR joined 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 dir1 exist and have the same content in dir2. Panic otherwise.
  • Construct a path to a rust library (rlib) under $TMPDIR given the library name. This will return a path with $TMPDIR joined with the library name.
  • Generate the name a rust library (rlib) would have. If you want the complete path, use rust_lib instead.
  • 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 $TMPDIR given the library name. This will return a path with $TMPDIR joined 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 that uname is available on the platform!