1
0
mirror of https://github.com/ARM-software/workload-automation.git synced 2024-10-06 02:41:11 +01:00

ApkWorkload: Support implicit activity path

If the activity field of an instance of ApkWorkload does not the '.'
character, it is assumed that it is in the Java namespace of the
application. This is similar to how activities can be referred to with
relative paths:
    com.domain.app/.activity
instead of
    com.domain.app/com.domain.app.activity
This commit is contained in:
Pierre-Clément Tosi 2019-05-20 17:59:01 +01:00 committed by Marc Bonnici
parent e398083f6e
commit 45af8c69b8

View File

@ -257,6 +257,12 @@ class ApkWorkload(Workload):
raise ConfigError('Target does not appear to support Android')
super(ApkWorkload, self).__init__(target, **kwargs)
if self.activity is not None and '.' not in self.activity:
# If we're receiving just the activity name, it's taken relative to
# the package namespace:
self.activity = '.' + self.activity
self.apk = PackageHandler(self,
package_name=self.package_name,
variant=self.variant,