Move tmp test directory.

This commit is contained in:
Eric Huss 2021-08-20 12:12:42 -07:00
parent 580461bd40
commit 4e7fe836d5
4 changed files with 6 additions and 3 deletions

View File

@ -172,7 +172,7 @@ impl Layout {
fingerprint: dest.join(".fingerprint"), fingerprint: dest.join(".fingerprint"),
examples: dest.join("examples"), examples: dest.join("examples"),
doc: root.join("doc"), doc: root.join("doc"),
tmp: dest.join("tmp"), tmp: root.join("tmp"),
root, root,
dest, dest,
_lock: lock, _lock: lock,

View File

@ -642,6 +642,7 @@ impl TomlProfile {
| "rust" | "rust"
| "rustc" | "rustc"
| "rustdoc" | "rustdoc"
| "tmp"
| "uninstall" | "uninstall"
) || lower_name.starts_with("cargo") ) || lower_name.starts_with("cargo")
{ {

View File

@ -233,7 +233,6 @@ corresponding environment variable is set to the empty string, `""`.
where integration tests or benchmarks are free to put any data needed by where integration tests or benchmarks are free to put any data needed by
the tests/benches. Cargo initially creates this directory but doesn't the tests/benches. Cargo initially creates this directory but doesn't
manage its content in any way, this is the responsibility of the test code. manage its content in any way, this is the responsibility of the test code.
There are separate directories for `debug` and `release` profiles.
[integration test]: cargo-targets.md#integration-tests [integration test]: cargo-targets.md#integration-tests
[`env` macro]: ../../std/macro.env.html [`env` macro]: ../../std/macro.env.html

View File

@ -1377,7 +1377,10 @@ fn crate_env_vars() {
let tmpdir: PathBuf = tmp.unwrap().into(); let tmpdir: PathBuf = tmp.unwrap().into();
let exe: PathBuf = env::current_exe().unwrap().into(); let exe: PathBuf = env::current_exe().unwrap().into();
let mut expected: PathBuf = exe.parent().unwrap().parent().unwrap().into(); let mut expected: PathBuf = exe.parent().unwrap()
.parent().unwrap()
.parent().unwrap()
.into();
expected.push("tmp"); expected.push("tmp");
assert_eq!(tmpdir, expected); assert_eq!(tmpdir, expected);