mirror of
https://github.com/ARM-software/workload-automation.git
synced 2025-09-02 19:32:34 +01:00
UiautoWorkloads: Updated to use apk files for uiautoamtion tests.
This commit is contained in:
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
|
||||||
|
Reference in New Issue
Block a user