mirror of
https://github.com/ARM-software/workload-automation.git
synced 2025-02-22 12:58:36 +00:00
Merge pull request #397 from marcbonnici/uiauto2
Uiautomator2: Fix for newer adb versions.
This commit is contained in:
commit
a4e27128e5
@ -390,10 +390,10 @@ class AndroidDevice(BaseLinuxDevice): # pylint: disable=W0223
|
|||||||
else:
|
else:
|
||||||
return self.install_executable(filepath, with_name)
|
return self.install_executable(filepath, with_name)
|
||||||
|
|
||||||
def install_apk(self, filepath, timeout=default_timeout, replace=False, allow_downgrade=False, force=False): # pylint: disable=W0221
|
def install_apk(self, filepath, timeout=default_timeout, replace=False, allow_downgrade=False): # pylint: disable=W0221
|
||||||
self._check_ready()
|
self._check_ready()
|
||||||
ext = os.path.splitext(filepath)[1].lower()
|
ext = os.path.splitext(filepath)[1].lower()
|
||||||
if ext == '.apk' or force:
|
if ext == '.apk':
|
||||||
flags = []
|
flags = []
|
||||||
if replace:
|
if replace:
|
||||||
flags.append('-r') # Replace existing APK
|
flags.append('-r') # Replace existing APK
|
||||||
|
@ -35,21 +35,11 @@ class ApkFile(FileResource):
|
|||||||
|
|
||||||
name = 'apk'
|
name = 'apk'
|
||||||
|
|
||||||
def __init__(self, owner, platform=None):
|
def __init__(self, owner, platform=None, uiauto=False):
|
||||||
super(ApkFile, self).__init__(owner)
|
super(ApkFile, self).__init__(owner)
|
||||||
self.platform = platform
|
self.platform = platform
|
||||||
|
self.uiauto = uiauto
|
||||||
|
|
||||||
def __str__(self):
|
def __str__(self):
|
||||||
return '<{}\'s {} APK>'.format(self.owner, self.platform)
|
apk_type = 'uiautomator ' if self.uiauto else ''
|
||||||
|
return '<{}\'s {} {}APK>'.format(self.owner, self.platform, apk_type)
|
||||||
|
|
||||||
class uiautoApkFile(FileResource):
|
|
||||||
|
|
||||||
name = 'uiautoapk'
|
|
||||||
|
|
||||||
def __init__(self, owner, platform=None):
|
|
||||||
super(uiautoApkFile, self).__init__(owner)
|
|
||||||
self.platform = platform
|
|
||||||
|
|
||||||
def __str__(self):
|
|
||||||
return '<{}\'s {} UiAuto APK>'.format(self.owner, self.platform)
|
|
||||||
|
@ -84,7 +84,7 @@ class UiAutomatorWorkload(Workload):
|
|||||||
self.uiauto_params = ParameterDict()
|
self.uiauto_params = ParameterDict()
|
||||||
|
|
||||||
def init_resources(self, context):
|
def init_resources(self, context):
|
||||||
self.uiauto_file = context.resolver.get(wlauto.common.android.resources.uiautoApkFile(self))
|
self.uiauto_file = context.resolver.get(ApkFile(self, uiauto=True))
|
||||||
if not self.uiauto_file:
|
if not self.uiauto_file:
|
||||||
raise ResourceError('No UI automation APK file found for workload {}.'.format(self.name))
|
raise ResourceError('No UI automation APK file found for workload {}.'.format(self.name))
|
||||||
|
|
||||||
@ -99,7 +99,7 @@ class UiAutomatorWorkload(Workload):
|
|||||||
for k, v in self.uiauto_params.iter_encoded_items():
|
for k, v in self.uiauto_params.iter_encoded_items():
|
||||||
params += ' -e {} "{}"'.format(k, v)
|
params += ' -e {} "{}"'.format(k, v)
|
||||||
|
|
||||||
self.device.install_apk(self.uiauto_file, replace=True, force=True)
|
self.device.install_apk(self.uiauto_file, replace=True)
|
||||||
|
|
||||||
instrumention_string = 'am instrument -w -r {} -e class {}.{} {}/{}'
|
instrumention_string = 'am instrument -w -r {} -e class {}.{} {}/{}'
|
||||||
self.command = instrumention_string.format(params, self.uiauto_package,
|
self.command = instrumention_string.format(params, self.uiauto_package,
|
||||||
|
@ -122,11 +122,6 @@ class PackageApkGetter(PackageFileGetter):
|
|||||||
return get_from_location_by_extension(resource, resource_dir, self.extension, version, variant=variant)
|
return get_from_location_by_extension(resource, resource_dir, self.extension, version, variant=variant)
|
||||||
|
|
||||||
|
|
||||||
class PackageUiautoApkGetter(PackageApkGetter):
|
|
||||||
name = 'uiautoapk'
|
|
||||||
extension = 'uiautoapk'
|
|
||||||
|
|
||||||
|
|
||||||
class PackageJarGetter(PackageFileGetter):
|
class PackageJarGetter(PackageFileGetter):
|
||||||
name = 'package_jar'
|
name = 'package_jar'
|
||||||
extension = 'jar'
|
extension = 'jar'
|
||||||
@ -412,7 +407,7 @@ class HttpGetter(ResourceGetter):
|
|||||||
assets = self.index.get(resource.owner.name, {})
|
assets = self.index.get(resource.owner.name, {})
|
||||||
if not assets:
|
if not assets:
|
||||||
return {}
|
return {}
|
||||||
if resource.name in ['apk', 'jar', 'uiautoapk']:
|
if resource.name in ['apk', 'jar']:
|
||||||
paths = [a['path'] for a in assets]
|
paths = [a['path'] for a in assets]
|
||||||
version = getattr(resource, 'version', None)
|
version = getattr(resource, 'version', None)
|
||||||
found = get_from_list_by_extension(resource, paths, resource.name, version)
|
found = get_from_list_by_extension(resource, paths, resource.name, version)
|
||||||
@ -457,7 +452,7 @@ class RemoteFilerGetter(ResourceGetter):
|
|||||||
|
|
||||||
"""
|
"""
|
||||||
priority = GetterPriority.remote
|
priority = GetterPriority.remote
|
||||||
resource_type = ['apk', 'file', 'jar', 'revent', 'uiautoapk']
|
resource_type = ['apk', 'file', 'jar', 'revent']
|
||||||
|
|
||||||
parameters = [
|
parameters = [
|
||||||
Parameter('remote_path', global_alias='remote_assets_path', default='',
|
Parameter('remote_path', global_alias='remote_assets_path', default='',
|
||||||
@ -505,7 +500,7 @@ class RemoteFilerGetter(ResourceGetter):
|
|||||||
|
|
||||||
def get_from(self, resource, version, location): # pylint: disable=no-self-use
|
def get_from(self, resource, version, location): # pylint: disable=no-self-use
|
||||||
# pylint: disable=too-many-branches
|
# pylint: disable=too-many-branches
|
||||||
if resource.name in ['apk', 'jar', 'uiautoapk']:
|
if resource.name in ['apk', 'jar']:
|
||||||
return get_from_location_by_extension(resource, location, resource.name, version)
|
return get_from_location_by_extension(resource, location, resource.name, version)
|
||||||
elif resource.name == 'file':
|
elif resource.name == 'file':
|
||||||
filepath = os.path.join(location, resource.path)
|
filepath = os.path.join(location, resource.path)
|
||||||
@ -562,12 +557,13 @@ def get_from_list_by_extension(resource, filelist, extension, version=None, vari
|
|||||||
if variant:
|
if variant:
|
||||||
filelist = [ff for ff in filelist if variant.lower() in os.path.basename(ff).lower()]
|
filelist = [ff for ff in filelist if variant.lower() in os.path.basename(ff).lower()]
|
||||||
if version:
|
if version:
|
||||||
if extension in ['apk', 'uiautoapk']:
|
if extension == 'apk':
|
||||||
filelist = [ff for ff in filelist if version.lower() in ApkInfo(ff).version_name.lower()]
|
filelist = [ff for ff in filelist if version.lower() in ApkInfo(ff).version_name.lower()]
|
||||||
else:
|
else:
|
||||||
filelist = [ff for ff in filelist if version.lower() in os.path.basename(ff).lower()]
|
filelist = [ff for ff in filelist if version.lower() in os.path.basename(ff).lower()]
|
||||||
if extension in ['apk', 'uiautoapk']:
|
if extension == 'apk':
|
||||||
filelist = [ff for ff in filelist if not ApkInfo(ff).native_code or resource.platform in ApkInfo(ff).native_code]
|
filelist = [ff for ff in filelist if not ApkInfo(ff).native_code or resource.platform in ApkInfo(ff).native_code]
|
||||||
|
filelist = [ff for ff in filelist if resource.uiauto == ('com.arm.wlauto.uiauto' in ApkInfo(ff).package)]
|
||||||
if len(filelist) == 1:
|
if len(filelist) == 1:
|
||||||
return filelist[0]
|
return filelist[0]
|
||||||
elif not filelist:
|
elif not filelist:
|
||||||
|
Binary file not shown.
Binary file not shown.
@ -33,7 +33,7 @@ fi
|
|||||||
package=com.arm.wlauto.uiauto.adobereader
|
package=com.arm.wlauto.uiauto.adobereader
|
||||||
rm -f ../$package
|
rm -f ../$package
|
||||||
if [[ -f app/build/apk/$package.apk ]]; then
|
if [[ -f app/build/apk/$package.apk ]]; then
|
||||||
cp app/build/apk/$package.apk ../$package.uiautoapk
|
cp app/build/apk/$package.apk ../$package.apk
|
||||||
else
|
else
|
||||||
echo 'ERROR: UiAutomator apk could not be found!'
|
echo 'ERROR: UiAutomator apk could not be found!'
|
||||||
exit 9
|
exit 9
|
||||||
|
@ -33,7 +33,7 @@ fi
|
|||||||
package=com.arm.wlauto.uiauto.andebench
|
package=com.arm.wlauto.uiauto.andebench
|
||||||
rm -f ../$package
|
rm -f ../$package
|
||||||
if [[ -f app/build/apk/$package.apk ]]; then
|
if [[ -f app/build/apk/$package.apk ]]; then
|
||||||
cp app/build/apk/$package.apk ../$package.uiautoapk
|
cp app/build/apk/$package.apk ../$package.apk
|
||||||
else
|
else
|
||||||
echo 'ERROR: UiAutomator apk could not be found!'
|
echo 'ERROR: UiAutomator apk could not be found!'
|
||||||
exit 9
|
exit 9
|
||||||
|
@ -33,7 +33,7 @@ fi
|
|||||||
package=com.arm.wlauto.uiauto.androbench
|
package=com.arm.wlauto.uiauto.androbench
|
||||||
rm -f ../$package
|
rm -f ../$package
|
||||||
if [[ -f app/build/apk/$package.apk ]]; then
|
if [[ -f app/build/apk/$package.apk ]]; then
|
||||||
cp app/build/apk/$package.apk ../$package.uiautoapk
|
cp app/build/apk/$package.apk ../$package.apk
|
||||||
else
|
else
|
||||||
echo 'ERROR: UiAutomator apk could not be found!'
|
echo 'ERROR: UiAutomator apk could not be found!'
|
||||||
exit 9
|
exit 9
|
||||||
|
@ -33,7 +33,7 @@ fi
|
|||||||
package=com.arm.wlauto.uiauto.antutu
|
package=com.arm.wlauto.uiauto.antutu
|
||||||
rm -f ../$package
|
rm -f ../$package
|
||||||
if [[ -f app/build/apk/$package.apk ]]; then
|
if [[ -f app/build/apk/$package.apk ]]; then
|
||||||
cp app/build/apk/$package.apk ../$package.uiautoapk
|
cp app/build/apk/$package.apk ../$package.apk
|
||||||
else
|
else
|
||||||
echo 'ERROR: UiAutomator apk could not be found!'
|
echo 'ERROR: UiAutomator apk could not be found!'
|
||||||
exit 9
|
exit 9
|
||||||
|
@ -116,7 +116,7 @@ class Applaunch(AndroidUxPerfWorkload):
|
|||||||
self.package = self.workload.package
|
self.package = self.workload.package
|
||||||
|
|
||||||
def init_workload_resources(self, context):
|
def init_workload_resources(self, context):
|
||||||
self.workload.uiauto_file = context.resolver.get(wlauto.common.android.resources.uiautoApkFile(self.workload))
|
self.workload.uiauto_file = context.resolver.get(wlauto.common.android.resources.ApkFile(self.workload, uiauto=True))
|
||||||
if not self.workload.uiauto_file:
|
if not self.workload.uiauto_file:
|
||||||
raise ResourceError('No UI automation Uiauto APK file found for workload {}.'.format(self.workload.name))
|
raise ResourceError('No UI automation Uiauto APK file found for workload {}.'.format(self.workload.name))
|
||||||
self.workload.device_uiauto_file = self.device.path.join(self.device.working_directory, os.path.basename(self.workload.uiauto_file))
|
self.workload.device_uiauto_file = self.device.path.join(self.device.working_directory, os.path.basename(self.workload.uiauto_file))
|
||||||
|
@ -34,7 +34,7 @@ package=com.arm.wlauto.uiauto.applaunch
|
|||||||
|
|
||||||
rm -f ../$package
|
rm -f ../$package
|
||||||
if [[ -f app/build/apk/$package.apk ]]; then
|
if [[ -f app/build/apk/$package.apk ]]; then
|
||||||
cp app/build/apk/$package.apk ../$package.uiautoapk
|
cp app/build/apk/$package.apk ../$package.apk
|
||||||
else
|
else
|
||||||
echo 'ERROR: UiAutomator apk could not be found!'
|
echo 'ERROR: UiAutomator apk could not be found!'
|
||||||
exit 9
|
exit 9
|
||||||
|
@ -46,7 +46,7 @@ fi
|
|||||||
package=com.arm.wlauto.uiauto.appshare
|
package=com.arm.wlauto.uiauto.appshare
|
||||||
rm -f ../$package
|
rm -f ../$package
|
||||||
if [[ -f app/build/apk/$package.apk ]]; then
|
if [[ -f app/build/apk/$package.apk ]]; then
|
||||||
cp app/build/apk/$package.apk ../$package.uiautoapk
|
cp app/build/apk/$package.apk ../$package.apk
|
||||||
else
|
else
|
||||||
echo 'ERROR: UiAutomator apk could not be found!'
|
echo 'ERROR: UiAutomator apk could not be found!'
|
||||||
exit 9
|
exit 9
|
||||||
|
@ -33,7 +33,7 @@ fi
|
|||||||
package=com.arm.wlauto.uiauto.benchmarkpi
|
package=com.arm.wlauto.uiauto.benchmarkpi
|
||||||
rm -f ../$package
|
rm -f ../$package
|
||||||
if [[ -f app/build/apk/$package.apk ]]; then
|
if [[ -f app/build/apk/$package.apk ]]; then
|
||||||
cp app/build/apk/$package.apk ../$package.uiautoapk
|
cp app/build/apk/$package.apk ../$package.apk
|
||||||
else
|
else
|
||||||
echo 'ERROR: UiAutomator apk could not be found!'
|
echo 'ERROR: UiAutomator apk could not be found!'
|
||||||
exit 9
|
exit 9
|
||||||
|
@ -33,7 +33,7 @@ fi
|
|||||||
package=com.arm.wlauto.uiauto.caffeinemark
|
package=com.arm.wlauto.uiauto.caffeinemark
|
||||||
rm -f ../$package
|
rm -f ../$package
|
||||||
if [[ -f app/build/apk/$package.apk ]]; then
|
if [[ -f app/build/apk/$package.apk ]]; then
|
||||||
cp app/build/apk/$package.apk ../$package.uiautoapk
|
cp app/build/apk/$package.apk ../$package.apk
|
||||||
else
|
else
|
||||||
echo 'ERROR: UiAutomator apk could not be found!'
|
echo 'ERROR: UiAutomator apk could not be found!'
|
||||||
exit 9
|
exit 9
|
||||||
|
@ -33,7 +33,7 @@ fi
|
|||||||
package=com.arm.wlauto.uiauto.cameracapture
|
package=com.arm.wlauto.uiauto.cameracapture
|
||||||
rm -f ../$package
|
rm -f ../$package
|
||||||
if [[ -f app/build/apk/$package.apk ]]; then
|
if [[ -f app/build/apk/$package.apk ]]; then
|
||||||
cp app/build/apk/$package.apk ../$package.uiautoapk
|
cp app/build/apk/$package.apk ../$package.apk
|
||||||
else
|
else
|
||||||
echo 'ERROR: UiAutomator apk could not be found!'
|
echo 'ERROR: UiAutomator apk could not be found!'
|
||||||
exit 9
|
exit 9
|
||||||
|
@ -33,7 +33,7 @@ fi
|
|||||||
package=com.arm.wlauto.uiauto.camerarecord
|
package=com.arm.wlauto.uiauto.camerarecord
|
||||||
rm -f ../$package
|
rm -f ../$package
|
||||||
if [[ -f app/build/apk/$package.apk ]]; then
|
if [[ -f app/build/apk/$package.apk ]]; then
|
||||||
cp app/build/apk/$package.apk ../$package.uiautoapk
|
cp app/build/apk/$package.apk ../$package.apk
|
||||||
else
|
else
|
||||||
echo 'ERROR: UiAutomator apk could not be found!'
|
echo 'ERROR: UiAutomator apk could not be found!'
|
||||||
exit 9
|
exit 9
|
||||||
|
@ -33,7 +33,7 @@ fi
|
|||||||
package=com.arm.wlauto.uiauto.cfbench
|
package=com.arm.wlauto.uiauto.cfbench
|
||||||
rm -f ../$package
|
rm -f ../$package
|
||||||
if [[ -f app/build/apk/$package.apk ]]; then
|
if [[ -f app/build/apk/$package.apk ]]; then
|
||||||
cp app/build/apk/$package.apk ../$package.uiautoapk
|
cp app/build/apk/$package.apk ../$package.apk
|
||||||
else
|
else
|
||||||
echo 'ERROR: UiAutomator apk could not be found!'
|
echo 'ERROR: UiAutomator apk could not be found!'
|
||||||
exit 9
|
exit 9
|
||||||
|
@ -33,7 +33,7 @@ fi
|
|||||||
package=com.arm.wlauto.uiauto.facebook
|
package=com.arm.wlauto.uiauto.facebook
|
||||||
rm -f ../$package
|
rm -f ../$package
|
||||||
if [[ -f app/build/apk/$package.apk ]]; then
|
if [[ -f app/build/apk/$package.apk ]]; then
|
||||||
cp app/build/apk/$package.apk ../$package.uiautoapk
|
cp app/build/apk/$package.apk ../$package.apk
|
||||||
else
|
else
|
||||||
echo 'ERROR: UiAutomator apk could not be found!'
|
echo 'ERROR: UiAutomator apk could not be found!'
|
||||||
exit 9
|
exit 9
|
||||||
|
@ -33,7 +33,7 @@ fi
|
|||||||
package=com.arm.wlauto.uiauto.geekbench
|
package=com.arm.wlauto.uiauto.geekbench
|
||||||
rm -f ../$package
|
rm -f ../$package
|
||||||
if [[ -f app/build/apk/$package.apk ]]; then
|
if [[ -f app/build/apk/$package.apk ]]; then
|
||||||
cp app/build/apk/$package.apk ../$package.uiautoapk
|
cp app/build/apk/$package.apk ../$package.apk
|
||||||
else
|
else
|
||||||
echo 'ERROR: UiAutomator apk could not be found!'
|
echo 'ERROR: UiAutomator apk could not be found!'
|
||||||
exit 9
|
exit 9
|
||||||
|
@ -33,7 +33,7 @@ fi
|
|||||||
package=com.arm.wlauto.uiauto.glbenchmark
|
package=com.arm.wlauto.uiauto.glbenchmark
|
||||||
rm -f ../$package
|
rm -f ../$package
|
||||||
if [[ -f app/build/apk/$package.apk ]]; then
|
if [[ -f app/build/apk/$package.apk ]]; then
|
||||||
cp app/build/apk/$package.apk ../$package.uiautoapk
|
cp app/build/apk/$package.apk ../$package.apk
|
||||||
else
|
else
|
||||||
echo 'ERROR: UiAutomator apk could not be found!'
|
echo 'ERROR: UiAutomator apk could not be found!'
|
||||||
exit 9
|
exit 9
|
||||||
|
@ -33,7 +33,7 @@ fi
|
|||||||
package=com.arm.wlauto.uiauto.gmail
|
package=com.arm.wlauto.uiauto.gmail
|
||||||
rm -f ../$package
|
rm -f ../$package
|
||||||
if [[ -f app/build/apk/$package.apk ]]; then
|
if [[ -f app/build/apk/$package.apk ]]; then
|
||||||
cp app/build/apk/$package.apk ../$package.uiautoapk
|
cp app/build/apk/$package.apk ../$package.apk
|
||||||
else
|
else
|
||||||
echo 'ERROR: UiAutomator apk could not be found!'
|
echo 'ERROR: UiAutomator apk could not be found!'
|
||||||
exit 9
|
exit 9
|
||||||
|
@ -33,7 +33,7 @@ fi
|
|||||||
package=com.arm.wlauto.uiauto.googlephotos
|
package=com.arm.wlauto.uiauto.googlephotos
|
||||||
rm -f ../$package
|
rm -f ../$package
|
||||||
if [[ -f app/build/apk/$package.apk ]]; then
|
if [[ -f app/build/apk/$package.apk ]]; then
|
||||||
cp app/build/apk/$package.apk ../$package.uiautoapk
|
cp app/build/apk/$package.apk ../$package.apk
|
||||||
else
|
else
|
||||||
echo 'ERROR: UiAutomator apk could not be found!'
|
echo 'ERROR: UiAutomator apk could not be found!'
|
||||||
exit 9
|
exit 9
|
||||||
|
@ -33,7 +33,7 @@ fi
|
|||||||
package=com.arm.wlauto.uiauto.googleplaybooks
|
package=com.arm.wlauto.uiauto.googleplaybooks
|
||||||
rm -f ../$package
|
rm -f ../$package
|
||||||
if [[ -f app/build/apk/$package.apk ]]; then
|
if [[ -f app/build/apk/$package.apk ]]; then
|
||||||
cp app/build/apk/$package.apk ../$package.uiautoapk
|
cp app/build/apk/$package.apk ../$package.apk
|
||||||
else
|
else
|
||||||
echo 'ERROR: UiAutomator apk could not be found!'
|
echo 'ERROR: UiAutomator apk could not be found!'
|
||||||
exit 9
|
exit 9
|
||||||
|
@ -33,7 +33,7 @@ fi
|
|||||||
package=com.arm.wlauto.uiauto.googleslides
|
package=com.arm.wlauto.uiauto.googleslides
|
||||||
rm -f ../$package
|
rm -f ../$package
|
||||||
if [[ -f app/build/apk/$package.apk ]]; then
|
if [[ -f app/build/apk/$package.apk ]]; then
|
||||||
cp app/build/apk/$package.apk ../$package.uiautoapk
|
cp app/build/apk/$package.apk ../$package.apk
|
||||||
else
|
else
|
||||||
echo 'ERROR: UiAutomator apk could not be found!'
|
echo 'ERROR: UiAutomator apk could not be found!'
|
||||||
exit 9
|
exit 9
|
||||||
|
@ -33,7 +33,7 @@ fi
|
|||||||
package=com.arm.wlauto.uiauto.linpack
|
package=com.arm.wlauto.uiauto.linpack
|
||||||
rm -f ../$package
|
rm -f ../$package
|
||||||
if [[ -f app/build/apk/$package.apk ]]; then
|
if [[ -f app/build/apk/$package.apk ]]; then
|
||||||
cp app/build/apk/$package.apk ../$package.uiautoapk
|
cp app/build/apk/$package.apk ../$package.apk
|
||||||
else
|
else
|
||||||
echo 'ERROR: UiAutomator apk could not be found!'
|
echo 'ERROR: UiAutomator apk could not be found!'
|
||||||
exit 9
|
exit 9
|
||||||
|
@ -33,7 +33,7 @@ fi
|
|||||||
package=com.arm.wlauto.uiauto.peacekeeper
|
package=com.arm.wlauto.uiauto.peacekeeper
|
||||||
rm -f ../$package
|
rm -f ../$package
|
||||||
if [[ -f app/build/apk/$package.apk ]]; then
|
if [[ -f app/build/apk/$package.apk ]]; then
|
||||||
cp app/build/apk/$package.apk ../$package.uiautoapk
|
cp app/build/apk/$package.apk ../$package.apk
|
||||||
else
|
else
|
||||||
echo 'ERROR: UiAutomator apk could not be found!'
|
echo 'ERROR: UiAutomator apk could not be found!'
|
||||||
exit 9
|
exit 9
|
||||||
|
@ -33,7 +33,7 @@ fi
|
|||||||
package=com.arm.wlauto.uiauto.quadrant
|
package=com.arm.wlauto.uiauto.quadrant
|
||||||
rm -f ../$package
|
rm -f ../$package
|
||||||
if [[ -f app/build/apk/$package.apk ]]; then
|
if [[ -f app/build/apk/$package.apk ]]; then
|
||||||
cp app/build/apk/$package.apk ../$package.uiautoapk
|
cp app/build/apk/$package.apk ../$package.apk
|
||||||
else
|
else
|
||||||
echo 'ERROR: UiAutomator apk could not be found!'
|
echo 'ERROR: UiAutomator apk could not be found!'
|
||||||
exit 9
|
exit 9
|
||||||
|
@ -33,7 +33,7 @@ fi
|
|||||||
package=com.arm.wlauto.uiauto.reallinpack
|
package=com.arm.wlauto.uiauto.reallinpack
|
||||||
rm -f ../$package
|
rm -f ../$package
|
||||||
if [[ -f app/build/apk/$package.apk ]]; then
|
if [[ -f app/build/apk/$package.apk ]]; then
|
||||||
cp app/build/apk/$package.apk ../$package.uiautoapk
|
cp app/build/apk/$package.apk ../$package.apk
|
||||||
else
|
else
|
||||||
echo 'ERROR: UiAutomator apk could not be found!'
|
echo 'ERROR: UiAutomator apk could not be found!'
|
||||||
exit 9
|
exit 9
|
||||||
|
@ -33,7 +33,7 @@ fi
|
|||||||
package=com.arm.wlauto.uiauto.skype
|
package=com.arm.wlauto.uiauto.skype
|
||||||
rm -f ../$package
|
rm -f ../$package
|
||||||
if [[ -f app/build/apk/$package.apk ]]; then
|
if [[ -f app/build/apk/$package.apk ]]; then
|
||||||
cp app/build/apk/$package.apk ../$package.uiautoapk
|
cp app/build/apk/$package.apk ../$package.apk
|
||||||
else
|
else
|
||||||
echo 'ERROR: UiAutomator apk could not be found!'
|
echo 'ERROR: UiAutomator apk could not be found!'
|
||||||
exit 9
|
exit 9
|
||||||
|
@ -33,7 +33,7 @@ fi
|
|||||||
package=com.arm.wlauto.uiauto.smartbench
|
package=com.arm.wlauto.uiauto.smartbench
|
||||||
rm -f ../$package
|
rm -f ../$package
|
||||||
if [[ -f app/build/apk/$package.apk ]]; then
|
if [[ -f app/build/apk/$package.apk ]]; then
|
||||||
cp app/build/apk/$package.apk ../$package.uiautoapk
|
cp app/build/apk/$package.apk ../$package.apk
|
||||||
else
|
else
|
||||||
echo 'ERROR: UiAutomator apk could not be found!'
|
echo 'ERROR: UiAutomator apk could not be found!'
|
||||||
exit 9
|
exit 9
|
||||||
|
@ -33,7 +33,7 @@ fi
|
|||||||
package=com.arm.wlauto.uiauto.sqlite
|
package=com.arm.wlauto.uiauto.sqlite
|
||||||
rm -f ../$package
|
rm -f ../$package
|
||||||
if [[ -f app/build/apk/$package.apk ]]; then
|
if [[ -f app/build/apk/$package.apk ]]; then
|
||||||
cp app/build/apk/$package.apk ../$package.uiautoapk
|
cp app/build/apk/$package.apk ../$package.apk
|
||||||
else
|
else
|
||||||
echo 'ERROR: UiAutomator apk could not be found!'
|
echo 'ERROR: UiAutomator apk could not be found!'
|
||||||
exit 9
|
exit 9
|
||||||
|
@ -33,7 +33,7 @@ fi
|
|||||||
package=com.arm.wlauto.uiauto.vellamo
|
package=com.arm.wlauto.uiauto.vellamo
|
||||||
rm -f ../$package
|
rm -f ../$package
|
||||||
if [[ -f app/build/apk/$package.apk ]]; then
|
if [[ -f app/build/apk/$package.apk ]]; then
|
||||||
cp app/build/apk/$package.apk ../$package.uiautoapk
|
cp app/build/apk/$package.apk ../$package.apk
|
||||||
else
|
else
|
||||||
echo 'ERROR: UiAutomator apk could not be found!'
|
echo 'ERROR: UiAutomator apk could not be found!'
|
||||||
exit 9
|
exit 9
|
||||||
|
@ -17,6 +17,7 @@
|
|||||||
import os
|
import os
|
||||||
|
|
||||||
from wlauto import AndroidUiAutoBenchmark, Parameter
|
from wlauto import AndroidUiAutoBenchmark, Parameter
|
||||||
|
from wlauto.common.android.resources import ApkFile
|
||||||
import wlauto.common.android.resources
|
import wlauto.common.android.resources
|
||||||
|
|
||||||
|
|
||||||
@ -65,8 +66,8 @@ class Videostreaming(AndroidUiAutoBenchmark):
|
|||||||
self.uiauto_params['video_name'] = self.video_name
|
self.uiauto_params['video_name'] = self.video_name
|
||||||
else:
|
else:
|
||||||
self.uiauto_params['video_name'] = "abkk sathe {}".format(self.resolution)
|
self.uiauto_params['video_name'] = "abkk sathe {}".format(self.resolution)
|
||||||
self.apk_file = context.resolver.get(wlauto.common.android.resources.ApkFile(self))
|
self.apk_file = context.resolver.get(ApkFile(self))
|
||||||
self.uiauto_file = context.resolver.get(wlauto.common.android.resources.uiautoApkFile(self))
|
self.uiauto_file = context.resolver.get(ApkFile(self, uiauto=True))
|
||||||
self.device_uiauto_file = self.device.path.join(self.device.working_directory,
|
self.device_uiauto_file = self.device.path.join(self.device.working_directory,
|
||||||
os.path.basename(self.uiauto_file))
|
os.path.basename(self.uiauto_file))
|
||||||
if not self.uiauto_package:
|
if not self.uiauto_package:
|
||||||
|
@ -33,7 +33,7 @@ fi
|
|||||||
package=com.arm.wlauto.uiauto.videostreaming
|
package=com.arm.wlauto.uiauto.videostreaming
|
||||||
rm -f ../$package
|
rm -f ../$package
|
||||||
if [[ -f app/build/apk/$package.apk ]]; then
|
if [[ -f app/build/apk/$package.apk ]]; then
|
||||||
cp app/build/apk/$package.apk ../$package.uiautoapk
|
cp app/build/apk/$package.apk ../$package.apk
|
||||||
else
|
else
|
||||||
echo 'ERROR: UiAutomator apk could not be found!'
|
echo 'ERROR: UiAutomator apk could not be found!'
|
||||||
exit 9
|
exit 9
|
||||||
|
@ -33,7 +33,7 @@ fi
|
|||||||
package=com.arm.wlauto.uiauto.youtube
|
package=com.arm.wlauto.uiauto.youtube
|
||||||
rm -f ../$package
|
rm -f ../$package
|
||||||
if [[ -f app/build/apk/$package.apk ]]; then
|
if [[ -f app/build/apk/$package.apk ]]; then
|
||||||
cp app/build/apk/$package.apk ../$package.uiautoapk
|
cp app/build/apk/$package.apk ../$package.apk
|
||||||
else
|
else
|
||||||
echo 'ERROR: UiAutomator apk could not be found!'
|
echo 'ERROR: UiAutomator apk could not be found!'
|
||||||
exit 9
|
exit 9
|
||||||
|
Loading…
x
Reference in New Issue
Block a user