aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorbohu <bohu@google.com>2019-09-04 16:30:19 -0700
committerBo Hu <bohu@google.com>2019-11-01 16:36:42 +0000
commit949efeff46b9e960fc8dd64a533b011b642b2f20 (patch)
tree19f5e4e3aa622b8a5c36ea96ef2021b8b2d2fa8b
parentf33903d03a446fd2ccdf4c8ee169ca9420cb6d17 (diff)
downloadperfetto-pie-cts-dev.tar.gz
end-to-end test: skip TestFtraceProducer for device with an x86-like primary ABIpie-cts-dev
BUG: 140055722 BUG: 113071420 Change-Id: I025af21c1c0098bd03c3a91c637fb8e925a77cd7
-rw-r--r--test/end_to_end_integrationtest.cc13
1 files changed, 13 insertions, 0 deletions
diff --git a/test/end_to_end_integrationtest.cc b/test/end_to_end_integrationtest.cc
index 289f65dd0..d8a1ffd95 100644
--- a/test/end_to_end_integrationtest.cc
+++ b/test/end_to_end_integrationtest.cc
@@ -21,6 +21,8 @@
#include <random>
#include <thread>
+#include <sys/system_properties.h>
+
#include "gtest/gtest.h"
#include "perfetto/base/build_config.h"
#include "perfetto/base/logging.h"
@@ -47,6 +49,14 @@ namespace perfetto {
#define TEST_PRODUCER_SOCK_NAME ::perfetto::GetProducerSocket()
#endif
+bool IsX86() {
+ char buf[PROP_VALUE_MAX + 1] = {};
+ int ret = __system_property_get("ro.product.cpu.abi", buf);
+ PERFETTO_CHECK(ret >= 0);
+ std::string abi(buf);
+ return abi.find("x86") != std::string::npos;
+}
+
// TODO(b/73453011): reenable this on more platforms (including standalone
// Android).
#if PERFETTO_BUILDFLAG(PERFETTO_ANDROID_BUILD)
@@ -55,6 +65,9 @@ namespace perfetto {
#define MAYBE_TestFtraceProducer DISABLED_TestFtraceProducer
#endif
TEST(PerfettoTest, MAYBE_TestFtraceProducer) {
+ if (IsX86())
+ return;
+
base::TestTaskRunner task_runner;
TestHelper helper(&task_runner);