Skip to content

Commit 98c0c4f

Browse files
simant01marcbonnici
authored andcommitted
workloads/antutu: Use apk.package instead of hardcoded package_name
1 parent 49c8fa0 commit 98c0c4f

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

wa/workloads/antutu/__init__.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -197,8 +197,8 @@ class AntutuBDP(ApkWorkload):
197197
198198
Known working version: 10.4.3-domesticAndroidFullBdp
199199
'''
200-
package_name = 'com.antutu.ABenchMark'
201200
activity = 'com.android.module.app.ui.start.ABenchMarkStart --ez isExternal true --es whereTo "test"'
201+
package_names = ['com.antutu.ABenchMark']
202202

203203
def initialize(self, context):
204204
super(AntutuBDP, self).initialize(context)
@@ -215,8 +215,8 @@ def setup(self, context):
215215
self.logger.info("Installing the supporting APK")
216216
self.target.install(self.supporting_apk)
217217
#Launch the apk to initialize the test dir, then kill it
218-
self.target.execute('am start {}/com.android.module.app.ui.test.activity.ActivityScoreBench'.format(self.package_name))
219-
self.target.execute('am force-stop {}'.format(self.package_name))
218+
self.target.execute('am start {}/com.android.module.app.ui.test.activity.ActivityScoreBench'.format(self.apk.package))
219+
self.target.execute('am force-stop {}'.format(self.apk.package))
220220
#Copy the settings.xml to the test dir
221221
self.target.push(self.settings_xml, self.test_dir)
222222
#Ensure the orientation is set to portrait
@@ -228,7 +228,7 @@ def setup(self, context):
228228
def run(self, context):
229229
super(AntutuBDP, self).run(context)
230230
#Launch the tests
231-
self.target.execute('am start -n {}/{}'.format(self.package_name, self.activity))
231+
self.target.execute('am start -n {}/{}'.format(self.apk.package, self.activity))
232232
#Wait 10 minutes, then begin polling every 30s for the test result to appear
233233
self.logger.debug("Waiting 10 minutes before starting to poll for the results file.")
234234
time.sleep(600)

0 commit comments

Comments
 (0)