diff --git a/README.md b/README.md
index b2baa7670..2a083915a 100644
--- a/README.md
+++ b/README.md
@@ -76,6 +76,4 @@ the [official plugins](plugins/official). The plugin API is still a preview.
[Apache 2.0](LICENSE). Bundled third-party assets are listed in [`THIRD_PARTY_LICENSES.md`](THIRD_PARTY_LICENSES.md).
-
-
Not affiliated with JetBrains. IntelliJ IDEA is a trademark of JetBrains s.r.o.
diff --git a/crates/ide-host/src/plugins/intellij.rs b/crates/ide-host/src/plugins/intellij.rs
index ade859c4d..8b55b0ee0 100644
--- a/crates/ide-host/src/plugins/intellij.rs
+++ b/crates/ide-host/src/plugins/intellij.rs
@@ -992,7 +992,9 @@ mod tests {
let put = |product: &str, file: &str, seconds| {
let path = root.join(product).join(file);
write(&path, b"");
- std::fs::File::open(path)
+ std::fs::File::options()
+ .write(true)
+ .open(path)
.unwrap()
.set_modified(std::time::UNIX_EPOCH + std::time::Duration::from_secs(seconds))
.unwrap();
diff --git a/crates/ide-host/tests/plugin_workbench.rs b/crates/ide-host/tests/plugin_workbench.rs
index 49dd4c344..201fbd8f6 100644
--- a/crates/ide-host/tests/plugin_workbench.rs
+++ b/crates/ide-host/tests/plugin_workbench.rs
@@ -250,7 +250,7 @@ async fn plugin_run_targets_register_prompt_route_revalidate_and_withdraw() {
f.host.set_plugin_host(&plugins);
let package = PathBuf::from(env!("CARGO_MANIFEST_DIR")).join("../ide-plugin/tests/fixtures/execution");
plugins.install_from_dir(&package, &Consent::all()).unwrap();
- let tool = f._tmp.path().join("wrapper");
+ let tool = f.root.with_file_name("wrapper");
std::fs::write(&tool, "#!/bin/sh\nprintf 'cwd=%s\\n' \"$PWD\"\nprintf '<%s>\\n' \"$@\"\n").unwrap();
std::fs::set_permissions(&tool, std::fs::Permissions::from_mode(0o755)).unwrap();
let invocation =
@@ -370,7 +370,7 @@ async fn run_target_api15_overrides_and_frozen_api14_registration() {
let engine = PluginEngine::new().unwrap();
let legacy = engine.compile(&fixtures.join("run-target-api14/dist/plugin.wasm")).unwrap();
assert_eq!(engine.check_component(&legacy).unwrap().unwrap().to_string(), "1.4.0");
- let tool = f._tmp.path().join("wrapper");
+ let tool = f.root.with_file_name("wrapper");
std::fs::write(&tool, "#!/bin/sh\nexit 0\n").unwrap();
std::fs::set_permissions(&tool, std::fs::Permissions::from_mode(0o755)).unwrap();
let invocation =
@@ -456,7 +456,7 @@ async fn run_target_validation_gates_launches_and_preserves_selection() {
f.host.set_plugin_host(&plugins);
let fixture = PathBuf::from(env!("CARGO_MANIFEST_DIR")).join("../ide-plugin/tests/fixtures/execution");
plugins.install_from_dir(&fixture, &Consent::all()).unwrap();
- let tool = f._tmp.path().join("wrapper");
+ let tool = f.root.with_file_name("wrapper");
std::fs::write(&tool, "#!/bin/sh\ntouch spawned\n").unwrap();
std::fs::set_permissions(&tool, std::fs::Permissions::from_mode(0o755)).unwrap();
plugins.choose_program("execution", "process:execution-tool", Some(&f.root), Some(&tool)).unwrap();
diff --git a/crates/ide-host/tests/remote_plugins.rs b/crates/ide-host/tests/remote_plugins.rs
index dfbc4feb1..054541690 100644
--- a/crates/ide-host/tests/remote_plugins.rs
+++ b/crates/ide-host/tests/remote_plugins.rs
@@ -616,16 +616,16 @@ async fn api14_stage3_remote_terminal_pins_and_exit_events_stay_on_the_execution
assert_eq!(settings["run"]["defaultTarget"], "");
let config = json!({"id":"wrapped-php", "name":"Wrapped PHP", "kind":"php", "command":"php", "args":["x.php", "literal ; $(touch bad)"], "env":{}, "detected":false, "isTest":false, "target":id});
invoke(&peer, "run_start", json!({"config":config, "onOutput":{"$channel":38}})).await.unwrap();
- until("remote wrapped run", 5, || project.join("wrapped.txt").exists()).await;
- assert_eq!(
- std::fs::read_to_string(project.join("wrapped.txt")).unwrap(),
- "\n<--cwd=/container>\n\n\n\n"
- );
+ let wrapped = "\n<--cwd=/container>\n\n\n\n";
+ until("remote wrapped run", 5, || std::fs::read_to_string(project.join("wrapped.txt")).is_ok_and(|s| s == wrapped))
+ .await;
assert!(!project.join("bad").exists());
let composer = json!({"id":"composer", "name":"Composer", "kind":"shell", "command":"composer", "args":["install"], "env":{}, "detected":false, "isTest":false, "target":id});
invoke(&peer, "run_start", json!({"config":composer, "onOutput":{"$channel":39}})).await.unwrap();
- until("remote composer override", 5, || project.join("composer.txt").exists()).await;
- assert_eq!(std::fs::read_to_string(project.join("composer.txt")).unwrap(), "\n\n");
+ until("remote composer override", 5, || {
+ std::fs::read_to_string(project.join("composer.txt")).is_ok_and(|s| s == "\n\n")
+ })
+ .await;
invoke(
&peer,
"plugin_run_command",
diff --git a/crates/ide-run/tests/import_jetbrains.rs b/crates/ide-run/tests/import_jetbrains.rs
index f52aee279..99641a4fc 100644
--- a/crates/ide-run/tests/import_jetbrains.rs
+++ b/crates/ide-run/tests/import_jetbrains.rs
@@ -98,7 +98,7 @@ fn jar_applications_from_every_configuration_location() {
"-jar",
"../dist/server app.jar",
"--config",
- &format!("{root}/server config.yml"),
+ &format!("{}/server config.yml", dir.path().to_string_lossy()),
""
])
);