From 03a2ab3e95bdc7e4b90ca1846e73a3fc86c83e59 Mon Sep 17 00:00:00 2001 From: Yabin Cui Date: Tue, 25 Jul 2023 10:06:16 -0700 Subject: simpleperf: Disable failed tests when running with a 32-bit translator The CtsSimpleperfTestCases built for ARM may run with a 32-bit translator on a 64-bit only CPU. In this situation, tests about recording apps can fail because of the limiation of translation. So detect this situation and diable failed tests. Bug: 291717595 Test: run CtsSimpleperfTestCases Change-Id: Icd9f3736d5dd84c2c502e6b733a3688b0a3de2bb Merged-In: Icd9f3736d5dd84c2c502e6b733a3688b0a3de2bb --- simpleperf/cmd_record_test.cpp | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'simpleperf/cmd_record_test.cpp') diff --git a/simpleperf/cmd_record_test.cpp b/simpleperf/cmd_record_test.cpp index b8300d7f..4ea71ad1 100644 --- a/simpleperf/cmd_record_test.cpp +++ b/simpleperf/cmd_record_test.cpp @@ -790,6 +790,7 @@ static void TestRecordingApps(const std::string& app_name, const std::string& ap } TEST(record_cmd, app_option_for_debuggable_app) { + OMIT_TEST_ON_NON_NATIVE_ABIS(); TEST_REQUIRE_APPS(); SetRunInAppToolForTesting(true, false); TestRecordingApps("com.android.simpleperf.debuggable", "debuggable"); @@ -798,6 +799,7 @@ TEST(record_cmd, app_option_for_debuggable_app) { } TEST(record_cmd, app_option_for_profileable_app) { + OMIT_TEST_ON_NON_NATIVE_ABIS(); TEST_REQUIRE_APPS(); SetRunInAppToolForTesting(false, true); TestRecordingApps("com.android.simpleperf.profileable", "profileable"); @@ -827,6 +829,7 @@ static void RecordJavaApp(RecordingAppHelper& helper) { TEST(record_cmd, record_java_app) { #if defined(__ANDROID__) + OMIT_TEST_ON_NON_NATIVE_ABIS(); RecordingAppHelper helper; RecordJavaApp(helper); @@ -892,6 +895,7 @@ TEST(record_cmd, record_native_app) { TEST(record_cmd, check_trampoline_after_art_jni_methods) { // Test if art jni methods are called by art_jni_trampoline. #if defined(__ANDROID__) + OMIT_TEST_ON_NON_NATIVE_ABIS(); RecordingAppHelper helper; RecordJavaApp(helper); -- cgit v1.2.3