From e3ab798f6e324bcbdfaf25963368273b43a569f0 Mon Sep 17 00:00:00 2001 From: Marc Bonnici Date: Tue, 3 Nov 2020 19:47:58 +0000 Subject: [PATCH] wl/speedometer: Ensure test package is installed. Check that the package specified for the test is installed on the device. --- wa/workloads/speedometer/__init__.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/wa/workloads/speedometer/__init__.py b/wa/workloads/speedometer/__init__.py index 321486b4..d6da15df 100755 --- a/wa/workloads/speedometer/__init__.py +++ b/wa/workloads/speedometer/__init__.py @@ -131,6 +131,12 @@ class Speedometer(Workload): "Device must be rooted for the speedometer workload currently" ) + if not self.target.package_is_installed(self.chrome_package): + raise WorkloadError( + "Could not find '{}' on the device. Please ensure it is installed, " + "or specify the correct package name using 'chrome_package' " + "parameter.".format(self.chrome_package)) + if self.target.adb_server is not None: raise WorkloadError( "Workload does not support the adb_server parameter, due to the webpage "