mirror of
https://github.com/ARM-software/workload-automation.git
synced 2025-01-31 02:01:16 +00:00
workloads/gfxbench: Fix formatting
This commit is contained in:
parent
e40517ab95
commit
1b4fc68542
@ -63,15 +63,14 @@ public class UiAutomation extends BaseUiAutomation {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public void clearFirstRun() throws Exception {
|
public void clearFirstRun() throws Exception {
|
||||||
UiObject accept =
|
UiObject accept =
|
||||||
mDevice.findObject(new UiSelector().resourceId("android:id/button1")
|
mDevice.findObject(new UiSelector().resourceId("android:id/button1")
|
||||||
.className("android.widget.Button"));
|
.className("android.widget.Button"));
|
||||||
if (accept.exists()){
|
if (accept.exists()){
|
||||||
accept.click();
|
accept.click();
|
||||||
sleep(5);
|
sleep(5);
|
||||||
}
|
}
|
||||||
|
UiObject sync =
|
||||||
UiObject sync =
|
|
||||||
mDevice.findObject(new UiSelector().text("Data synchronization")
|
mDevice.findObject(new UiSelector().text("Data synchronization")
|
||||||
.className("android.widget.TextView"));
|
.className("android.widget.TextView"));
|
||||||
if (!sync.exists()){
|
if (!sync.exists()){
|
||||||
@ -93,7 +92,7 @@ public class UiAutomation extends BaseUiAutomation {
|
|||||||
|
|
||||||
public void runBenchmark() throws Exception {
|
public void runBenchmark() throws Exception {
|
||||||
//Calculate the location of the test selection button
|
//Calculate the location of the test selection button
|
||||||
UiObject circle =
|
UiObject circle =
|
||||||
mDevice.findObject(new UiSelector().resourceId("net.kishonti.gfxbench.gl.v50000.corporate:id/main_circleControl")
|
mDevice.findObject(new UiSelector().resourceId("net.kishonti.gfxbench.gl.v50000.corporate:id/main_circleControl")
|
||||||
.className("android.widget.RelativeLayout"));
|
.className("android.widget.RelativeLayout"));
|
||||||
Rect bounds = circle.getBounds();
|
Rect bounds = circle.getBounds();
|
||||||
@ -101,7 +100,7 @@ public class UiAutomation extends BaseUiAutomation {
|
|||||||
selectx = bounds.width() - selectx;
|
selectx = bounds.width() - selectx;
|
||||||
int selecty = bounds.height()/4;
|
int selecty = bounds.height()/4;
|
||||||
selecty = bounds.centerY() + selecty;
|
selecty = bounds.centerY() + selecty;
|
||||||
|
|
||||||
Log.d(TAG, "maxx " + selectx);
|
Log.d(TAG, "maxx " + selectx);
|
||||||
Log.d(TAG, "maxy " + selecty);
|
Log.d(TAG, "maxy " + selecty);
|
||||||
|
|
||||||
@ -123,7 +122,7 @@ public class UiAutomation extends BaseUiAutomation {
|
|||||||
toggleTest("1080p Tessellation Offscreen");
|
toggleTest("1080p Tessellation Offscreen");
|
||||||
|
|
||||||
//Start the tests
|
//Start the tests
|
||||||
UiObject start =
|
UiObject start =
|
||||||
mDevice.findObject(new UiSelector().text("Start"));
|
mDevice.findObject(new UiSelector().text("Start"));
|
||||||
start.click();
|
start.click();
|
||||||
|
|
||||||
@ -136,43 +135,43 @@ public class UiAutomation extends BaseUiAutomation {
|
|||||||
|
|
||||||
public void getScores() throws Exception {
|
public void getScores() throws Exception {
|
||||||
UiScrollable list = new UiScrollable(new UiSelector().scrollable(true));
|
UiScrollable list = new UiScrollable(new UiSelector().scrollable(true));
|
||||||
UiObject results =
|
UiObject results =
|
||||||
mDevice.findObject(new UiSelector().resourceId("net.kishonti.gfxbench.gl.v50000.corporate:id/results_testList"));
|
mDevice.findObject(new UiSelector().resourceId("net.kishonti.gfxbench.gl.v50000.corporate:id/results_testList"));
|
||||||
int number_of_results = results.getChildCount();
|
int number_of_results = results.getChildCount();
|
||||||
|
|
||||||
//High Level Tests
|
//High Level Tests
|
||||||
UiObject carchase =
|
UiObject carchase =
|
||||||
mDevice.findObject(new UiSelector().resourceId("net.kishonti.gfxbench.gl.v50000.corporate:id/results_testList"))
|
mDevice.findObject(new UiSelector().resourceId("net.kishonti.gfxbench.gl.v50000.corporate:id/results_testList"))
|
||||||
.getChild(new UiSelector().index(1))
|
.getChild(new UiSelector().index(1))
|
||||||
.getChild(new UiSelector().resourceId("net.kishonti.gfxbench.gl.v50000.corporate:id/updated_result_item_subresult"));
|
.getChild(new UiSelector().resourceId("net.kishonti.gfxbench.gl.v50000.corporate:id/updated_result_item_subresult"));
|
||||||
Log.d(TAG, "Car Chase score " + carchase.getText());
|
Log.d(TAG, "Car Chase score " + carchase.getText());
|
||||||
|
|
||||||
UiObject carchaseoff =
|
UiObject carchaseoff =
|
||||||
mDevice.findObject(new UiSelector().resourceId("net.kishonti.gfxbench.gl.v50000.corporate:id/results_testList"))
|
mDevice.findObject(new UiSelector().resourceId("net.kishonti.gfxbench.gl.v50000.corporate:id/results_testList"))
|
||||||
.getChild(new UiSelector().index(2))
|
.getChild(new UiSelector().index(2))
|
||||||
.getChild(new UiSelector().resourceId("net.kishonti.gfxbench.gl.v50000.corporate:id/updated_result_item_subresult"));
|
.getChild(new UiSelector().resourceId("net.kishonti.gfxbench.gl.v50000.corporate:id/updated_result_item_subresult"));
|
||||||
Log.d(TAG, "Car Chase Offscreen score " + carchaseoff.getText());
|
Log.d(TAG, "Car Chase Offscreen score " + carchaseoff.getText());
|
||||||
|
|
||||||
UiObject manhattan =
|
UiObject manhattan =
|
||||||
mDevice.findObject(new UiSelector().resourceId("net.kishonti.gfxbench.gl.v50000.corporate:id/results_testList"))
|
mDevice.findObject(new UiSelector().resourceId("net.kishonti.gfxbench.gl.v50000.corporate:id/results_testList"))
|
||||||
.getChild(new UiSelector().index(3))
|
.getChild(new UiSelector().index(3))
|
||||||
.getChild(new UiSelector().resourceId("net.kishonti.gfxbench.gl.v50000.corporate:id/updated_result_item_subresult"));
|
.getChild(new UiSelector().resourceId("net.kishonti.gfxbench.gl.v50000.corporate:id/updated_result_item_subresult"));
|
||||||
Log.d(TAG, "Manhattan 3.1 score " + manhattan.getText());
|
Log.d(TAG, "Manhattan 3.1 score " + manhattan.getText());
|
||||||
|
|
||||||
UiObject manhattan1080 =
|
UiObject manhattan1080 =
|
||||||
mDevice.findObject(new UiSelector().resourceId("net.kishonti.gfxbench.gl.v50000.corporate:id/results_testList"))
|
mDevice.findObject(new UiSelector().resourceId("net.kishonti.gfxbench.gl.v50000.corporate:id/results_testList"))
|
||||||
.getChild(new UiSelector().index(4))
|
.getChild(new UiSelector().index(4))
|
||||||
.getChild(new UiSelector().resourceId("net.kishonti.gfxbench.gl.v50000.corporate:id/updated_result_item_subresult"));
|
.getChild(new UiSelector().resourceId("net.kishonti.gfxbench.gl.v50000.corporate:id/updated_result_item_subresult"));
|
||||||
Log.d(TAG, "1080p Manhattan 3.1 Offscreen score " + manhattan1080.getText());
|
Log.d(TAG, "1080p Manhattan 3.1 Offscreen score " + manhattan1080.getText());
|
||||||
|
|
||||||
UiObject manhattan1440 =
|
UiObject manhattan1440 =
|
||||||
mDevice.findObject(new UiSelector().resourceId("net.kishonti.gfxbench.gl.v50000.corporate:id/results_testList"))
|
mDevice.findObject(new UiSelector().resourceId("net.kishonti.gfxbench.gl.v50000.corporate:id/results_testList"))
|
||||||
.getChild(new UiSelector().index(5))
|
.getChild(new UiSelector().index(5))
|
||||||
.getChild(new UiSelector().resourceId("net.kishonti.gfxbench.gl.v50000.corporate:id/updated_result_item_subresult"));
|
.getChild(new UiSelector().resourceId("net.kishonti.gfxbench.gl.v50000.corporate:id/updated_result_item_subresult"));
|
||||||
Log.d(TAG, "1440p Manhattan 3.1 Offscreen score " + manhattan1440.getText());
|
Log.d(TAG, "1440p Manhattan 3.1 Offscreen score " + manhattan1440.getText());
|
||||||
|
|
||||||
//Low Level Tests
|
//Low Level Tests
|
||||||
UiObject tess =
|
UiObject tess =
|
||||||
mDevice.findObject(new UiSelector().resourceId("net.kishonti.gfxbench.gl.v50000.corporate:id/results_testList"))
|
mDevice.findObject(new UiSelector().resourceId("net.kishonti.gfxbench.gl.v50000.corporate:id/results_testList"))
|
||||||
.getChild(new UiSelector().index(7))
|
.getChild(new UiSelector().index(7))
|
||||||
.getChild(new UiSelector().resourceId("net.kishonti.gfxbench.gl.v50000.corporate:id/updated_result_item_subresult"));
|
.getChild(new UiSelector().resourceId("net.kishonti.gfxbench.gl.v50000.corporate:id/updated_result_item_subresult"));
|
||||||
@ -181,7 +180,7 @@ public class UiAutomation extends BaseUiAutomation {
|
|||||||
}
|
}
|
||||||
Log.d(TAG, "Tessellation score " + tess.getText());
|
Log.d(TAG, "Tessellation score " + tess.getText());
|
||||||
|
|
||||||
UiObject tessoff =
|
UiObject tessoff =
|
||||||
mDevice.findObject(new UiSelector().resourceId("net.kishonti.gfxbench.gl.v50000.corporate:id/results_testList"))
|
mDevice.findObject(new UiSelector().resourceId("net.kishonti.gfxbench.gl.v50000.corporate:id/results_testList"))
|
||||||
.getChild(new UiSelector().index(8))
|
.getChild(new UiSelector().index(8))
|
||||||
.getChild(new UiSelector().resourceId("net.kishonti.gfxbench.gl.v50000.corporate:id/updated_result_item_subresult"));
|
.getChild(new UiSelector().resourceId("net.kishonti.gfxbench.gl.v50000.corporate:id/updated_result_item_subresult"));
|
||||||
@ -193,7 +192,7 @@ public class UiAutomation extends BaseUiAutomation {
|
|||||||
|
|
||||||
public void toggleTest(String testname) throws Exception {
|
public void toggleTest(String testname) throws Exception {
|
||||||
UiScrollable list = new UiScrollable(new UiSelector().scrollable(true));
|
UiScrollable list = new UiScrollable(new UiSelector().scrollable(true));
|
||||||
UiObject test =
|
UiObject test =
|
||||||
mDevice.findObject(new UiSelector().text(testname));
|
mDevice.findObject(new UiSelector().text(testname));
|
||||||
if (!test.exists() && list.waitForExists(60)) {
|
if (!test.exists() && list.waitForExists(60)) {
|
||||||
list.scrollIntoView(test);
|
list.scrollIntoView(test);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user