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 1
1
use crate :: command:: Command ;
2
- use crate :: env_var;
3
2
use crate :: util:: set_host_compiler_dylib_path;
4
3
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 .
7
6
pub 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) ;
9
15
set_host_compiler_dylib_path ( & mut cmd) ;
10
16
cmd
11
17
}
Original file line number Diff line number Diff line change 1
1
//! `run-make-support` is a support library for run-make tests. It provides command wrappers and
2
2
//! 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.
5
6
6
7
#![ warn( unreachable_pub) ]
7
8
You can’t perform that action at this time.
0 commit comments