All notable changes to the run_make_support
library should be documented in this file.
The format is based on Keep a Changelog and the support library should adhere to Semantic Versioning even if it‘s not intended for public consumption (it’s moreso to help internally, to help test writers track changes to the support library).
This support library will probably never reach 1.0. Please bump the minor version in Cargo.toml
if you make any breaking changes or other significant changes, or bump the patch version for bug fixes.
fs_wrapper
module which provides panic-on-fail helpers for their respective std::fs
counterparts, the motivation is to:.unwrap()
or .expect()
everywhere for fs operations-Dunused_must_use
)path()
helper which creates a Path
relative to cwd()
(but is less noisy).#[must_use]
, and rmake.rs are now compiled with -Dunused_must_use
.Command::{run, run_fail}
will defuse the drop bomb.Command
helpers that forward to std::process::Command
counterparts.env_var
method which was incorrectly named and is env_clear
underneath and is a footgun from impl_common_helpers
. For example, removing TMPDIR
on Unix and TMP
/TEMP
breaks std::env::temp_dir
and wrecks anything using that, such as rustc's codgen.Deref
/DerefMut
for run_make_support::Command
-> std::process::Command
because it causes a method chain like htmldocck().arg().run()
to fail, because arg()
resolves to std::process::Command
which also returns a &mut std::process::Command
, causing the run()
to be not found.Consider this version to contain all changes made to the support library before we started to track changes in this changelog.
std::process::Command
(run_make_support::Command
) and custom wrapper around std::process::Output
(CompletedProcess
) to make it more convenient to work with commands and their output, and help avoid forgetting to check for exit status.Command
: set_stdin
, run
, run_fail
.CompletedProcess
: std{err,out}_utf8
, status
, assert_std{err,out}_{equals, contains, not_contains}
, assert_exit_code
.impl_common_helpers
macro to avoid repeating adding common convenience methods, including:env
, env_remove
arg
, args
inspect
is called): inspect
run
(for commands expected to succeed execution, exit status 0
) and run_fail
(for commands expected to fail execution, exit status non-zero).rustc
, clang
, cc
, rustc
, rustdoc
, llvm-readobj
.python
and htmldocck
commands.run
and run_fail
(like Command::{run, run_fail}
) for running binaries, which sets suitable env vars (like LD_LIB_PATH
or equivalent, TARGET_RPATH_ENV
, PATH
on Windows).diff
which has similar functionality as the cli util but not the same API.env_var
, env_var_os
, cwd
for their std::env
conterparts.target
, source_root
.is_windows
, is_msvc
, cygpath_windows
, uname
.copy_dir_all
.recursive_diff
helper.assert_not_contains
helper.run_in_tmpdir
which is designed to run commands in a temporary directory that is cleared when closure returns.rust_lib_name
, static_lib_name
, bin_name
, dynamic_lib_name
.gimli
, object
, regex
, wasmparsmer
.