1
0
mirror of https://github.com/ARM-software/workload-automation.git synced 2025-09-02 03:12:34 +01:00

Updating Geekbench workload to support the latest versions of both the standard and corporate application

This commit is contained in:
scott
2018-02-07 15:27:50 +00:00
committed by Marc Bonnici
parent efc7dc9326
commit 6e946a53dd
3 changed files with 21 additions and 32 deletions

View File

@@ -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");
}
}