mirror of
				https://github.com/ARM-software/workload-automation.git
				synced 2025-10-30 22:54:18 +00:00 
			
		
		
		
	Updating Geekbench workload to support the latest versions of both the standard and corporate application
This commit is contained in:
		| @@ -22,6 +22,7 @@ import android.support.test.runner.AndroidJUnit4; | ||||
| import android.support.test.uiautomator.UiObject; | ||||
| import android.support.test.uiautomator.UiObjectNotFoundException; | ||||
| import android.support.test.uiautomator.UiSelector; | ||||
| import android.support.test.uiautomator.UiScrollable; | ||||
| import android.view.KeyEvent; | ||||
|  | ||||
| import com.arm.wa.uiauto.BaseUiAutomation; | ||||
| @@ -91,7 +92,8 @@ public class UiAutomation extends BaseUiAutomation { | ||||
|                         shareResults(); | ||||
|                     } | ||||
|                     break; | ||||
|                 case 4: | ||||
|                 case 4:  | ||||
|                 case 5: | ||||
|                     runCpuBenchmarks(isCorporate); | ||||
|                     waitForResultsv3onwards(); | ||||
|                     break; | ||||
| @@ -134,6 +136,7 @@ public class UiAutomation extends BaseUiAutomation { | ||||
|     public void runCpuBenchmarks(boolean isCorporate) throws Exception { | ||||
|         // The run button is at the bottom of the view and may be off the screen so swipe to be sure | ||||
|         uiDeviceSwipe(Direction.DOWN, 50); | ||||
|         scrollPage(); | ||||
|  | ||||
|         String packageName = isCorporate ? "com.primatelabs.geekbench4.corporate" | ||||
|                                          : "com.primatelabs.geekbench"; | ||||
| @@ -184,4 +187,10 @@ public class UiAutomation extends BaseUiAutomation { | ||||
|         shareButton.waitForExists(WAIT_TIMEOUT_5SEC); | ||||
|         shareButton.click(); | ||||
|     } | ||||
|  | ||||
|     public void scrollPage() throws Exception { | ||||
|         UiScrollable listView = new UiScrollable(new UiSelector().className("android.widget.ScrollView")); | ||||
|         listView.setMaxSearchSwipes(3); | ||||
|         listView.scrollTextIntoView("RUN CPU BENCHMARK"); | ||||
|     } | ||||
| } | ||||
|   | ||||
		Reference in New Issue
	
	Block a user