File tree Expand file tree Collapse file tree 2 files changed +13
-6
lines changed
src/tools/run-make-support/src Expand file tree Collapse file tree 2 files changed +13
-6
lines changed Original file line number Diff line number Diff line change 11use crate :: command:: Command ;
2- use crate :: env_var;
32use crate :: util:: set_host_compiler_dylib_path;
43
5- /// Returns a command that can be used to invoke cargo. The cargo is provided by compiletest
6- /// through the `CARGO` env var.
4+ /// Returns a command that can be used to invoke in-tree cargo. The cargo is provided by compiletest
5+ /// through the `CARGO` env var, and is **only** available for the `run-make-cargo` test suite .
76pub fn cargo ( ) -> Command {
8- let mut cmd = Command :: new ( env_var ( "CARGO" ) ) ;
7+ let cargo_path = std:: env:: var ( "CARGO" ) . unwrap_or_else ( |e| {
8+ panic ! (
9+ "in-tree `cargo` should be available for `run-make-cargo` test suite, but not \
10+ `run-make` test suite: {e}"
11+ )
12+ } ) ;
13+
14+ let mut cmd = Command :: new ( cargo_path) ;
915 set_host_compiler_dylib_path ( & mut cmd) ;
1016 cmd
1117}
Original file line number Diff line number Diff line change 11//! `run-make-support` is a support library for run-make tests. It provides command wrappers and
22//! convenience utility functions to help test writers reduce duplication. The support library
3- //! notably is built via cargo: this means that if your test wants some non-trivial utility, such
4- //! as `object` or `wasmparser`, they can be re-exported and be made available through this library.
3+ //! notably is built via bootstrap cargo: this means that if your test wants some non-trivial
4+ //! utility, such as `object` or `wasmparser`, they can be re-exported and be made available through
5+ //! this library.
56
67#![ warn( unreachable_pub) ]
78
You can’t perform that action at this time.
0 commit comments