File: dont-fail-tests-on-arm32-or-riscv64-if-cpu-speed-unavailable.diff

package info (click to toggle)
rust-sysinfo 0.37.2-1
  • links: PTS, VCS
  • area: main
  • in suites: experimental
  • size: 2,264 kB
  • sloc: ansic: 158; makefile: 27
file content (20 lines) | stat: -rw-r--r-- 800 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
Index: sysinfo/src/lib.rs
===================================================================
--- sysinfo.orig/src/common/system.rs
+++ sysinfo/src/common/system.rs
@@ -485,6 +485,7 @@ mod test {
             assert_eq!(proc_.frequency(), 0);
         }
         // In a VM, it'll fail.
+        #[cfg(not(any(target_arch = "arm", target_arch = "riscv64")))]
         if std::env::var("APPLE_CI").is_err() && std::env::var("FREEBSD_CI").is_err() {
             s.refresh_cpu_specifics(CpuRefreshKind::everything());
             for proc_ in s.cpus() {
Index: sysinfo/tests/cpu.rs
===================================================================
--- sysinfo.orig/tests/cpu.rs
+++ sysinfo/tests/cpu.rs
@@ -22,2 +20,3 @@
 #[test]
+#[cfg(not(target_arch = "arm"))]
 fn test_physical_core_numbers() {