fix cargo path logic
This commit is contained in:
@@ -305,9 +305,10 @@ impl Step for Cargo {
|
|||||||
// those features won't be able to land.
|
// those features won't be able to land.
|
||||||
cargo.env("CARGO_TEST_DISABLE_NIGHTLY", "1");
|
cargo.env("CARGO_TEST_DISABLE_NIGHTLY", "1");
|
||||||
cargo.env("PATH", path_for_cargo(builder, compiler));
|
cargo.env("PATH", path_for_cargo(builder, compiler));
|
||||||
// Cargo's test suite requires configurations from its own `.cargo/config.toml`.
|
// Cargo's test suite uses `CARGO_RUSTC_CURRENT_DIR` to determine the path that `file!` is
|
||||||
// Change to the directory so Cargo can read from it.
|
// relative to. Cargo no longer sets this env var, so we have to do that. This has to be the
|
||||||
cargo.current_dir(builder.src.join(Self::CRATE_PATH));
|
// same value as `-Zroot-dir`.
|
||||||
|
cargo.env("CARGO_RUSTC_CURRENT_DIR", builder.src.display().to_string());
|
||||||
|
|
||||||
#[cfg(feature = "build-metrics")]
|
#[cfg(feature = "build-metrics")]
|
||||||
builder.metrics.begin_test_suite(
|
builder.metrics.begin_test_suite(
|
||||||
|
|||||||
Reference in New Issue
Block a user