Remove all usages of tmp_dir from tests

This commit is contained in:
Jakub Beránek 2024-06-06 21:34:34 +02:00
parent 94ccb9b34d
commit d86c981908
No known key found for this signature in database
GPG key ID: 909CD0D26483516B
64 changed files with 182 additions and 210 deletions

View file

@ -1,9 +1,7 @@
use std::path::Path;
use std::process::Command;
use crate::{
bin_name, cygpath_windows, env_var, handle_failed_output, is_msvc, is_windows, tmp_dir, uname,
};
use crate::{bin_name, cygpath_windows, env_var, handle_failed_output, is_msvc, is_windows, uname};
/// Construct a new platform-specific C compiler invocation.
///

View file

@ -1,7 +1,7 @@
use std::path::Path;
use std::process::Command;
use crate::{bin_name, env_var, handle_failed_output, tmp_dir};
use crate::{bin_name, env_var, handle_failed_output};
/// Construct a new `clang` invocation. `clang` is not always available for all targets.
pub fn clang() -> Clang {

View file

@ -171,6 +171,11 @@ pub fn bin_name(name: &str) -> String {
if is_windows() { format!("{name}.exe") } else { name.to_string() }
}
/// Return the current working directory.
pub fn cwd() -> PathBuf {
env::current_dir().unwrap()
}
/// Use `cygpath -w` on a path to get a Windows path string back. This assumes that `cygpath` is
/// available on the platform!
#[track_caller]