summaryrefslogtreecommitdiffhomepage
path: root/tests/util.rs
diff options
context:
space:
mode:
Diffstat (limited to 'tests/util.rs')
-rw-r--r--tests/util.rs16
1 files changed, 0 insertions, 16 deletions
diff --git a/tests/util.rs b/tests/util.rs
deleted file mode 100644
index 8fe87e5783..0000000000
--- a/tests/util.rs
+++ /dev/null
@@ -1,16 +0,0 @@
-use std::fs::File;
-use std::io::Read;
-use std::path::Path;
-
-pub fn read_file<P: AsRef<Path>>(path: P) -> String {
- let mut string = String::new();
- let mut f = File::open(path).unwrap();
- f.read_to_string(&mut string).unwrap();
- string
-}
-
-#[cfg(target_os = "linux")]
-pub fn read_args_for_proc(pid: u32) -> Vec<String> {
- let cmdline = read_file(format!("/proc/{}/cmdline", pid));
- cmdline.split_terminator('\0').map(String::from).collect()
-}