дзеркало
https://github.com/l0ng-ai/openidea.git
синхронізовано 2026-12-04 09:11:10 +02:00
fix(run): scope JVM thread-dump test helpers to Unix (#5672)
The thread-dump tests' helpers in ide-jvm-attach and ide-host use Unix-only APIs, so the Windows test build failed to compile on main. Gate the helpers and the tests that use them to Unix. Closes #5671 Co-authored-by: principalwater <[email protected]>
Цей коміт міститься в:
1 джерело
af3e174702
коміт
3927e70476
2 files changed
+3
-2
No files matched your search
@@ -68,6 +68,7 @@ mod tests {
|
||||
panic!("not reached")
|
||||
}
|
||||
|
||||
#[cfg(unix)]
|
||||
fn proc(pid: u32, ppid: u32, command: &str) -> ProcEntry {
|
||||
ProcEntry { pid, ppid, command: command.into() }
|
||||
}
|
||||
|
||||
@@ -3,7 +3,7 @@ use std::time::Duration;
|
||||
use crate::socket::AttachError;
|
||||
#[cfg(unix)]
|
||||
use crate::socket::{check_socket, has_listener, has_listener_at, socket_path, temp_dir};
|
||||
#[cfg(any(target_os = "linux", target_os = "macos", test))]
|
||||
#[cfg(any(target_os = "linux", target_os = "macos", all(unix, test)))]
|
||||
use std::time::UNIX_EPOCH;
|
||||
#[cfg(unix)]
|
||||
use std::{
|
||||
@@ -204,7 +204,7 @@ fn process_start(_pid: u32) -> Option<SystemTime> {
|
||||
|
||||
/// `/proc/<pid>/stat` field 22 is the start in clock ticks since boot; `btime` in `/proc/stat`
|
||||
/// is the boot time in seconds since the epoch.
|
||||
#[cfg(any(target_os = "linux", test))]
|
||||
#[cfg(any(target_os = "linux", all(unix, test)))]
|
||||
fn start_from_proc(stat: &str, system: &str, ticks_per_sec: u64) -> Option<SystemTime> {
|
||||
// The command name (field 2) may contain spaces and parentheses; the fields after it start at 3.
|
||||
let ticks: u64 = stat.rsplit_once(')')?.1.split_whitespace().nth(22 - 3)?.parse().ok()?;
|
||||
|
||||
Reference in new issue
Заблокувати користувача