mirror of
https://github.com/ARM-software/workload-automation.git
synced 2025-01-31 10:11:17 +00:00
workloads/gfxbench: Move test selection into setup phase
Previously the configuration of the tests was performed in the run stage instead of the setup.
This commit is contained in:
parent
0d9dbe8845
commit
285bc2cd0b
Binary file not shown.
@ -49,6 +49,36 @@ public class UiAutomation extends BaseUiAutomation {
|
|||||||
public void setup() throws Exception{
|
public void setup() throws Exception{
|
||||||
setScreenOrientation(ScreenOrientation.NATURAL);
|
setScreenOrientation(ScreenOrientation.NATURAL);
|
||||||
clearFirstRun();
|
clearFirstRun();
|
||||||
|
|
||||||
|
//Calculate the location of the test selection button
|
||||||
|
UiObject circle =
|
||||||
|
mDevice.findObject(new UiSelector().resourceId("net.kishonti.gfxbench.gl.v50000.corporate:id/main_circleControl")
|
||||||
|
.className("android.widget.RelativeLayout"));
|
||||||
|
Rect bounds = circle.getBounds();
|
||||||
|
int selectx = bounds.width()/4;
|
||||||
|
selectx = bounds.centerX() + selectx;
|
||||||
|
int selecty = bounds.height()/4;
|
||||||
|
selecty = bounds.centerY() + selecty;
|
||||||
|
|
||||||
|
Log.d(TAG, "maxx " + selectx);
|
||||||
|
Log.d(TAG, "maxy " + selecty);
|
||||||
|
|
||||||
|
mDevice.click(selectx,selecty);
|
||||||
|
|
||||||
|
//Disable the tests
|
||||||
|
toggleTest("High-Level Tests");
|
||||||
|
toggleTest("Low-Level Tests");
|
||||||
|
toggleTest("Special Tests");
|
||||||
|
toggleTest("Fixed Time Test");
|
||||||
|
|
||||||
|
//Enable sub tests
|
||||||
|
toggleTest("Car Chase");
|
||||||
|
toggleTest("1080p Car Chase Offscreen");
|
||||||
|
toggleTest("Manhattan 3.1");
|
||||||
|
toggleTest("1080p Manhattan 3.1 Offscreen");
|
||||||
|
toggleTest("1440p Manhattan 3.1.1 Offscreen");
|
||||||
|
toggleTest("Tessellation");
|
||||||
|
toggleTest("1080p Tessellation Offscreen");
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
@ -91,36 +121,6 @@ public class UiAutomation extends BaseUiAutomation {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public void runBenchmark() throws Exception {
|
public void runBenchmark() throws Exception {
|
||||||
//Calculate the location of the test selection button
|
|
||||||
UiObject circle =
|
|
||||||
mDevice.findObject(new UiSelector().resourceId("net.kishonti.gfxbench.gl.v50000.corporate:id/main_circleControl")
|
|
||||||
.className("android.widget.RelativeLayout"));
|
|
||||||
Rect bounds = circle.getBounds();
|
|
||||||
int selectx = bounds.width()/4;
|
|
||||||
selectx = bounds.centerX() + selectx;
|
|
||||||
int selecty = bounds.height()/4;
|
|
||||||
selecty = bounds.centerY() + selecty;
|
|
||||||
|
|
||||||
Log.d(TAG, "maxx " + selectx);
|
|
||||||
Log.d(TAG, "maxy " + selecty);
|
|
||||||
|
|
||||||
mDevice.click(selectx,selecty);
|
|
||||||
|
|
||||||
//Disable the tests
|
|
||||||
toggleTest("High-Level Tests");
|
|
||||||
toggleTest("Low-Level Tests");
|
|
||||||
toggleTest("Special Tests");
|
|
||||||
toggleTest("Fixed Time Test");
|
|
||||||
|
|
||||||
//Enable sub tests
|
|
||||||
toggleTest("Car Chase");
|
|
||||||
toggleTest("1080p Car Chase Offscreen");
|
|
||||||
toggleTest("Manhattan 3.1");
|
|
||||||
toggleTest("1080p Manhattan 3.1 Offscreen");
|
|
||||||
toggleTest("1440p Manhattan 3.1.1 Offscreen");
|
|
||||||
toggleTest("Tessellation");
|
|
||||||
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"));
|
||||||
|
Loading…
x
Reference in New Issue
Block a user