summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYabin Cui <yabinc@google.com>2019-11-06 16:57:31 -0800
committerandroid-build-merger <android-build-merger@google.com>2019-11-06 16:57:31 -0800
commite44558f001213272926dc75222dffbd52dc8611d (patch)
tree4aa2593256785621ad178e76d7939d06d6d45f21
parentdcb00c902611804b44aec61d54f9fbcaa3923f31 (diff)
parentb74b2b5c11f4dda203387d86f9af91e99840082d (diff)
downloadextras-e44558f001213272926dc75222dffbd52dc8611d.tar.gz
Merge "simpleperf: fix test.py on x86/x86_64."
am: b74b2b5c11 Change-Id: I8bc33282f6eda38bccaf7e48dc25cba2000aac47
-rw-r--r--simpleperf/scripts/script_testdata/cpp_api-profile_Q.apkbin1308411 -> 5079732 bytes
-rw-r--r--simpleperf/scripts/script_testdata/cpp_api-profile_prev_Q.apkbin1329603 -> 5078484 bytes
-rwxr-xr-xsimpleperf/scripts/test.py15
3 files changed, 9 insertions, 6 deletions
diff --git a/simpleperf/scripts/script_testdata/cpp_api-profile_Q.apk b/simpleperf/scripts/script_testdata/cpp_api-profile_Q.apk
index b3f4e7d8..746b86cc 100644
--- a/simpleperf/scripts/script_testdata/cpp_api-profile_Q.apk
+++ b/simpleperf/scripts/script_testdata/cpp_api-profile_Q.apk
Binary files differ
diff --git a/simpleperf/scripts/script_testdata/cpp_api-profile_prev_Q.apk b/simpleperf/scripts/script_testdata/cpp_api-profile_prev_Q.apk
index 33d78806..9718824e 100644
--- a/simpleperf/scripts/script_testdata/cpp_api-profile_prev_Q.apk
+++ b/simpleperf/scripts/script_testdata/cpp_api-profile_prev_Q.apk
Binary files differ
diff --git a/simpleperf/scripts/test.py b/simpleperf/scripts/test.py
index 5ebf652a..cd9e6f3a 100755
--- a/simpleperf/scripts/test.py
+++ b/simpleperf/scripts/test.py
@@ -173,6 +173,9 @@ class TestHelper(object):
elif os.path.isdir(source):
shutil.copytree(source, target)
+ def get_32bit_abi(self):
+ return self.adb.get_property('ro.product.cpu.abilist32').strip().split(',')[0]
+
TEST_HELPER = TestHelper()
@@ -734,32 +737,32 @@ class TestExampleWithNativeJniCall(TestExampleBase):
self.run_cmd([INFERNO_SCRIPT, "-sc"])
-class TestExampleWithNativeForceArm(TestExampleWithNative):
+class TestExampleWithNativeForce32Bit(TestExampleWithNative):
@classmethod
def setUpClass(cls):
cls.prepare("SimpleperfExampleWithNative",
"com.example.simpleperf.simpleperfexamplewithnative",
".MainActivity",
- abi="armeabi-v7a")
+ abi=TEST_HELPER.get_32bit_abi())
-class TestExampleWithNativeForceArmRoot(TestExampleWithNativeRoot):
+class TestExampleWithNativeRootForce32Bit(TestExampleWithNativeRoot):
@classmethod
def setUpClass(cls):
cls.prepare("SimpleperfExampleWithNative",
"com.example.simpleperf.simpleperfexamplewithnative",
".MainActivity",
- abi="armeabi-v7a",
+ abi=TEST_HELPER.get_32bit_abi(),
adb_root=False)
-class TestExampleWithNativeTraceOffCpuForceArm(TestExampleWithNativeTraceOffCpu):
+class TestExampleWithNativeTraceOffCpuForce32Bit(TestExampleWithNativeTraceOffCpu):
@classmethod
def setUpClass(cls):
cls.prepare("SimpleperfExampleWithNative",
"com.example.simpleperf.simpleperfexamplewithnative",
".SleepActivity",
- abi="armeabi-v7a")
+ abi=TEST_HELPER.get_32bit_abi())
class TestExampleOfKotlin(TestExampleBase):