1
0
mirror of https://github.com/ARM-software/workload-automation.git synced 2025-01-31 10:11:17 +00:00

UiautoWorkloads: Updated to use apk files for uiautoamtion tests.

This commit is contained in:
Marc Bonnici 2017-06-05 14:30:49 +01:00
parent bb17590689
commit cc641e8dac
59 changed files with 32 additions and 31 deletions

View File

@ -33,7 +33,7 @@ fi
package=com.arm.wlauto.uiauto.adobereader
rm -f ../$package
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
echo 'ERROR: UiAutomator apk could not be found!'
exit 9

View File

@ -33,7 +33,7 @@ fi
package=com.arm.wlauto.uiauto.andebench
rm -f ../$package
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
echo 'ERROR: UiAutomator apk could not be found!'
exit 9

View File

@ -33,7 +33,7 @@ fi
package=com.arm.wlauto.uiauto.androbench
rm -f ../$package
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
echo 'ERROR: UiAutomator apk could not be found!'
exit 9

View File

@ -33,7 +33,7 @@ fi
package=com.arm.wlauto.uiauto.antutu
rm -f ../$package
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
echo 'ERROR: UiAutomator apk could not be found!'
exit 9

View File

@ -116,7 +116,7 @@ class Applaunch(AndroidUxPerfWorkload):
self.package = self.workload.package
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:
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))

View File

@ -34,7 +34,7 @@ package=com.arm.wlauto.uiauto.applaunch
rm -f ../$package
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
echo 'ERROR: UiAutomator apk could not be found!'
exit 9

View File

@ -46,7 +46,7 @@ fi
package=com.arm.wlauto.uiauto.appshare
rm -f ../$package
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
echo 'ERROR: UiAutomator apk could not be found!'
exit 9

View File

@ -33,7 +33,7 @@ fi
package=com.arm.wlauto.uiauto.benchmarkpi
rm -f ../$package
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
echo 'ERROR: UiAutomator apk could not be found!'
exit 9

View File

@ -33,7 +33,7 @@ fi
package=com.arm.wlauto.uiauto.caffeinemark
rm -f ../$package
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
echo 'ERROR: UiAutomator apk could not be found!'
exit 9

View File

@ -33,7 +33,7 @@ fi
package=com.arm.wlauto.uiauto.cameracapture
rm -f ../$package
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
echo 'ERROR: UiAutomator apk could not be found!'
exit 9

View File

@ -33,7 +33,7 @@ fi
package=com.arm.wlauto.uiauto.camerarecord
rm -f ../$package
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
echo 'ERROR: UiAutomator apk could not be found!'
exit 9

View File

@ -33,7 +33,7 @@ fi
package=com.arm.wlauto.uiauto.cfbench
rm -f ../$package
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
echo 'ERROR: UiAutomator apk could not be found!'
exit 9

View File

@ -33,7 +33,7 @@ fi
package=com.arm.wlauto.uiauto.facebook
rm -f ../$package
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
echo 'ERROR: UiAutomator apk could not be found!'
exit 9

View File

@ -33,7 +33,7 @@ fi
package=com.arm.wlauto.uiauto.geekbench
rm -f ../$package
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
echo 'ERROR: UiAutomator apk could not be found!'
exit 9

View File

@ -33,7 +33,7 @@ fi
package=com.arm.wlauto.uiauto.glbenchmark
rm -f ../$package
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
echo 'ERROR: UiAutomator apk could not be found!'
exit 9

View File

@ -33,7 +33,7 @@ fi
package=com.arm.wlauto.uiauto.gmail
rm -f ../$package
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
echo 'ERROR: UiAutomator apk could not be found!'
exit 9

View File

@ -33,7 +33,7 @@ fi
package=com.arm.wlauto.uiauto.googlephotos
rm -f ../$package
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
echo 'ERROR: UiAutomator apk could not be found!'
exit 9

View File

@ -33,7 +33,7 @@ fi
package=com.arm.wlauto.uiauto.googleplaybooks
rm -f ../$package
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
echo 'ERROR: UiAutomator apk could not be found!'
exit 9

View File

@ -33,7 +33,7 @@ fi
package=com.arm.wlauto.uiauto.googleslides
rm -f ../$package
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
echo 'ERROR: UiAutomator apk could not be found!'
exit 9

View File

@ -33,7 +33,7 @@ fi
package=com.arm.wlauto.uiauto.linpack
rm -f ../$package
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
echo 'ERROR: UiAutomator apk could not be found!'
exit 9

View File

@ -33,7 +33,7 @@ fi
package=com.arm.wlauto.uiauto.peacekeeper
rm -f ../$package
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
echo 'ERROR: UiAutomator apk could not be found!'
exit 9

View File

@ -33,7 +33,7 @@ fi
package=com.arm.wlauto.uiauto.quadrant
rm -f ../$package
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
echo 'ERROR: UiAutomator apk could not be found!'
exit 9

View File

@ -33,7 +33,7 @@ fi
package=com.arm.wlauto.uiauto.reallinpack
rm -f ../$package
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
echo 'ERROR: UiAutomator apk could not be found!'
exit 9

View File

@ -33,7 +33,7 @@ fi
package=com.arm.wlauto.uiauto.skype
rm -f ../$package
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
echo 'ERROR: UiAutomator apk could not be found!'
exit 9

View File

@ -33,7 +33,7 @@ fi
package=com.arm.wlauto.uiauto.smartbench
rm -f ../$package
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
echo 'ERROR: UiAutomator apk could not be found!'
exit 9

View File

@ -33,7 +33,7 @@ fi
package=com.arm.wlauto.uiauto.sqlite
rm -f ../$package
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
echo 'ERROR: UiAutomator apk could not be found!'
exit 9

View File

@ -33,7 +33,7 @@ fi
package=com.arm.wlauto.uiauto.vellamo
rm -f ../$package
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
echo 'ERROR: UiAutomator apk could not be found!'
exit 9

View File

@ -17,6 +17,7 @@
import os
from wlauto import AndroidUiAutoBenchmark, Parameter
from wlauto.common.android.resources import ApkFile
import wlauto.common.android.resources
@ -65,8 +66,8 @@ class Videostreaming(AndroidUiAutoBenchmark):
self.uiauto_params['video_name'] = self.video_name
else:
self.uiauto_params['video_name'] = "abkk sathe {}".format(self.resolution)
self.apk_file = context.resolver.get(wlauto.common.android.resources.ApkFile(self))
self.uiauto_file = context.resolver.get(wlauto.common.android.resources.uiautoApkFile(self))
self.apk_file = context.resolver.get(ApkFile(self))
self.uiauto_file = context.resolver.get(ApkFile(self, uiauto=True))
self.device_uiauto_file = self.device.path.join(self.device.working_directory,
os.path.basename(self.uiauto_file))
if not self.uiauto_package:

View File

@ -33,7 +33,7 @@ fi
package=com.arm.wlauto.uiauto.videostreaming
rm -f ../$package
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
echo 'ERROR: UiAutomator apk could not be found!'
exit 9

View File

@ -33,7 +33,7 @@ fi
package=com.arm.wlauto.uiauto.youtube
rm -f ../$package
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
echo 'ERROR: UiAutomator apk could not be found!'
exit 9