|
0 |
From: Benjamin Barenblat <bbaren@google.com>
|
|
1 |
Subject: Disable SysinfoTest.NominalCPUFrequency on armel/armhf
|
|
2 |
|
|
3 |
NominalCPUFrequency has different behavior on 32-bit and 64-bit ARM
|
|
4 |
kernels. The Debian arm64 buildds assume they can build 32-bit ARM
|
|
5 |
packages, but if they do, the NominalCPUFrequency test will fail.
|
|
6 |
Disable the test when building for 32-bit ARM.
|
|
7 |
|
|
8 |
--- a/absl/base/internal/sysinfo_test.cc
|
|
9 |
+++ b/absl/base/internal/sysinfo_test.cc
|
|
10 |
@@ -43,7 +43,13 @@
|
|
11 |
// POWER is particularly problematic here; some Linux kernels expose the CPU
|
|
12 |
// frequency, while others do not. Since we can't predict a priori what a given
|
|
13 |
// machine is going to do, just disable this test on POWER on Linux.
|
|
14 |
+//
|
|
15 |
+// Debian also disables this test on armel and armhf, since tests for those
|
|
16 |
+// platforms could either be run on a 32-bit ARM system (where
|
|
17 |
+// NominalCPUFrequency returns a reasonable value) or a 64-bit ARM system (where
|
|
18 |
+// it does not).
|
|
19 |
-#if !(defined(__linux) && (defined(__ppc64__) || defined(__PPC64__)))
|
|
20 |
+#if !(defined(__linux) && \
|
|
21 |
+ (defined(__ppc64__) || defined(__PPC64__) || defined(__arm__)))
|
|
22 |
TEST(SysinfoTest, NominalCPUFrequency) {
|
|
23 |
// Linux only exposes the CPU frequency on certain architectures, and
|
|
24 |
// Emscripten doesn't expose it at all.
|