File: fix-test-feature-requirements.diff

package info (click to toggle)
rust-uucore 0.0.30-4
  • links: PTS, VCS
  • area: main
  • in suites: sid
  • size: 1,036 kB
  • sloc: makefile: 2
file content (32 lines) | stat: -rw-r--r-- 990 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
Index: uucore/src/lib/features/entries.rs
===================================================================
--- uucore.orig/src/lib/features/entries.rs
+++ uucore/src/lib/features/entries.rs
@@ -361,6 +361,7 @@ pub fn grp2gid(name: &str) -> IOResult<g
 }
 
 #[cfg(test)]
+#[cfg(feature = "process")]
 mod test {
     use super::*;
 
Index: uucore/src/lib/features/proc_info.rs
===================================================================
--- uucore.orig/src/lib/features/proc_info.rs
+++ uucore/src/lib/features/proc_info.rs
@@ -472,6 +472,7 @@ mod tests {
     }
 
     #[test]
+    #[cfg(feature = "libc")]
     fn test_thread_ids() {
         let main_tid = unsafe { crate::libc::gettid() };
         std::thread::spawn(move || {
@@ -503,6 +504,7 @@ mod tests {
     }
 
     #[test]
+    #[cfg(feature = "process")]
     fn test_uid_gid() {
         let mut pid_entry = ProcessInformation::try_new(
             PathBuf::from_str(&format!("/proc/{}", current_pid())).unwrap(),