mirror of
https://github.com/ARM-software/workload-automation.git
synced 2025-05-08 02:15:21 +01:00
worklods: Fix whitespace
This commit is contained in:
parent
dead312ff7
commit
6b04cbffd2
wa/workloads
antutu/uiauto/app/src/main/java/com/arm/wa/uiauto/antutu
pcmark/uiauto/app/src/main/java/com/arm/wa/uiauto/pcmark
@ -59,7 +59,7 @@ public class UiAutomation extends BaseUiAutomation {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public void hitTest() throws Exception {
|
public void hitTest() throws Exception {
|
||||||
UiObject testbutton =
|
UiObject testbutton =
|
||||||
mDevice.findObject(new UiSelector().resourceId("com.antutu.ABenchMark:id/main_test_start_title"));
|
mDevice.findObject(new UiSelector().resourceId("com.antutu.ABenchMark:id/main_test_start_title"));
|
||||||
testbutton.click();
|
testbutton.click();
|
||||||
sleep(1);
|
sleep(1);
|
||||||
@ -73,14 +73,14 @@ public class UiAutomation extends BaseUiAutomation {
|
|||||||
|
|
||||||
public void getScores() throws Exception {
|
public void getScores() throws Exception {
|
||||||
//Expand, Extract and Close CPU sub scores
|
//Expand, Extract and Close CPU sub scores
|
||||||
UiObject cpuscores =
|
UiObject cpuscores =
|
||||||
mDevice.findObject(new UiSelector().text("CPU"));
|
mDevice.findObject(new UiSelector().text("CPU"));
|
||||||
cpuscores.click();
|
cpuscores.click();
|
||||||
UiObject cpumaths =
|
UiObject cpumaths =
|
||||||
mDevice.findObject(new UiSelector().text("CPU Mathematics Score").fromParent(new UiSelector().index(3)));
|
mDevice.findObject(new UiSelector().text("CPU Mathematics Score").fromParent(new UiSelector().index(3)));
|
||||||
UiObject cpucommon =
|
UiObject cpucommon =
|
||||||
mDevice.findObject(new UiSelector().text("CPU Common Use Score").fromParent(new UiSelector().index(3)));
|
mDevice.findObject(new UiSelector().text("CPU Common Use Score").fromParent(new UiSelector().index(3)));
|
||||||
UiObject cpumulti =
|
UiObject cpumulti =
|
||||||
mDevice.findObject(new UiSelector().text("CPU Multi-Core Score").fromParent(new UiSelector().index(3)));
|
mDevice.findObject(new UiSelector().text("CPU Multi-Core Score").fromParent(new UiSelector().index(3)));
|
||||||
Log.d(TAG, "CPU Maths Score " + cpumaths.getText());
|
Log.d(TAG, "CPU Maths Score " + cpumaths.getText());
|
||||||
Log.d(TAG, "CPU Common Score " + cpucommon.getText());
|
Log.d(TAG, "CPU Common Score " + cpucommon.getText());
|
||||||
@ -88,14 +88,14 @@ public class UiAutomation extends BaseUiAutomation {
|
|||||||
cpuscores.click();
|
cpuscores.click();
|
||||||
|
|
||||||
//Expand, Extract and Close GPU sub scores
|
//Expand, Extract and Close GPU sub scores
|
||||||
UiObject gpuscores =
|
UiObject gpuscores =
|
||||||
mDevice.findObject(new UiSelector().text("GPU"));
|
mDevice.findObject(new UiSelector().text("GPU"));
|
||||||
gpuscores.click();
|
gpuscores.click();
|
||||||
UiObject gpumaroon =
|
UiObject gpumaroon =
|
||||||
mDevice.findObject(new UiSelector().text("3D [Marooned] Score").fromParent(new UiSelector().index(3)));
|
mDevice.findObject(new UiSelector().text("3D [Marooned] Score").fromParent(new UiSelector().index(3)));
|
||||||
UiObject gpucoast =
|
UiObject gpucoast =
|
||||||
mDevice.findObject(new UiSelector().text("3D [Coastline] Score").fromParent(new UiSelector().index(3)));
|
mDevice.findObject(new UiSelector().text("3D [Coastline] Score").fromParent(new UiSelector().index(3)));
|
||||||
UiObject gpurefinery =
|
UiObject gpurefinery =
|
||||||
mDevice.findObject(new UiSelector().text("3D [Refinery] Score").fromParent(new UiSelector().index(3)));
|
mDevice.findObject(new UiSelector().text("3D [Refinery] Score").fromParent(new UiSelector().index(3)));
|
||||||
Log.d(TAG, "GPU Marooned Score " + gpumaroon.getText());
|
Log.d(TAG, "GPU Marooned Score " + gpumaroon.getText());
|
||||||
Log.d(TAG, "GPU Coastline Score " + gpucoast.getText());
|
Log.d(TAG, "GPU Coastline Score " + gpucoast.getText());
|
||||||
@ -103,16 +103,16 @@ public class UiAutomation extends BaseUiAutomation {
|
|||||||
gpuscores.click();
|
gpuscores.click();
|
||||||
|
|
||||||
//Expand, Extract and Close UX sub scores
|
//Expand, Extract and Close UX sub scores
|
||||||
UiObject uxscores =
|
UiObject uxscores =
|
||||||
mDevice.findObject(new UiSelector().text("UX"));
|
mDevice.findObject(new UiSelector().text("UX"));
|
||||||
uxscores.click();
|
uxscores.click();
|
||||||
UiObject security =
|
UiObject security =
|
||||||
mDevice.findObject(new UiSelector().text("Data Security Score").fromParent(new UiSelector().index(3)));
|
mDevice.findObject(new UiSelector().text("Data Security Score").fromParent(new UiSelector().index(3)));
|
||||||
UiObject dataprocessing =
|
UiObject dataprocessing =
|
||||||
mDevice.findObject(new UiSelector().text("Data Processing Score").fromParent(new UiSelector().index(3)));
|
mDevice.findObject(new UiSelector().text("Data Processing Score").fromParent(new UiSelector().index(3)));
|
||||||
UiObject imageprocessing =
|
UiObject imageprocessing =
|
||||||
mDevice.findObject(new UiSelector().text("Image Processing Score").fromParent(new UiSelector().index(3)));
|
mDevice.findObject(new UiSelector().text("Image Processing Score").fromParent(new UiSelector().index(3)));
|
||||||
UiObject uxscore =
|
UiObject uxscore =
|
||||||
mDevice.findObject(new UiSelector().text("User Experience Score").fromParent(new UiSelector().index(3)));
|
mDevice.findObject(new UiSelector().text("User Experience Score").fromParent(new UiSelector().index(3)));
|
||||||
Log.d(TAG, "Data Security Score " + security.getText());
|
Log.d(TAG, "Data Security Score " + security.getText());
|
||||||
Log.d(TAG, "Data Processing Score " + dataprocessing.getText());
|
Log.d(TAG, "Data Processing Score " + dataprocessing.getText());
|
||||||
@ -121,12 +121,12 @@ public class UiAutomation extends BaseUiAutomation {
|
|||||||
uxscores.click();
|
uxscores.click();
|
||||||
|
|
||||||
//Expand, Extract and Close MEM sub scores
|
//Expand, Extract and Close MEM sub scores
|
||||||
UiObject memscores =
|
UiObject memscores =
|
||||||
mDevice.findObject(new UiSelector().text("MEM"));
|
mDevice.findObject(new UiSelector().text("MEM"));
|
||||||
memscores.click();
|
memscores.click();
|
||||||
UiObject ramscore =
|
UiObject ramscore =
|
||||||
mDevice.findObject(new UiSelector().text("RAM Score").fromParent(new UiSelector().index(3)));
|
mDevice.findObject(new UiSelector().text("RAM Score").fromParent(new UiSelector().index(3)));
|
||||||
UiObject romscore =
|
UiObject romscore =
|
||||||
mDevice.findObject(new UiSelector().text("ROM Score").fromParent(new UiSelector().index(3)));
|
mDevice.findObject(new UiSelector().text("ROM Score").fromParent(new UiSelector().index(3)));
|
||||||
Log.d(TAG, "RAM Score " + ramscore.getText());
|
Log.d(TAG, "RAM Score " + ramscore.getText());
|
||||||
Log.d(TAG, "ROM Score " + romscore.getText());
|
Log.d(TAG, "ROM Score " + romscore.getText());
|
||||||
|
@ -64,7 +64,7 @@ public class UiAutomation extends BaseUiAutomation {
|
|||||||
|
|
||||||
//Swipe to benchmarks and back to initialise the app correctly
|
//Swipe to benchmarks and back to initialise the app correctly
|
||||||
private void loadBenchmarks() throws Exception {
|
private void loadBenchmarks() throws Exception {
|
||||||
UiObject title =
|
UiObject title =
|
||||||
mDevice.findObject(new UiSelector().text("PCMARK"));
|
mDevice.findObject(new UiSelector().text("PCMARK"));
|
||||||
title.waitForExists(300000);
|
title.waitForExists(300000);
|
||||||
if (title.exists()){
|
if (title.exists()){
|
||||||
@ -83,22 +83,22 @@ public class UiAutomation extends BaseUiAutomation {
|
|||||||
|
|
||||||
//Install the Work 2.0 Performance Benchmark
|
//Install the Work 2.0 Performance Benchmark
|
||||||
private void installBenchmark() throws Exception {
|
private void installBenchmark() throws Exception {
|
||||||
UiObject benchmark =
|
UiObject benchmark =
|
||||||
mDevice.findObject(new UiSelector().descriptionContains("INSTALL("));
|
mDevice.findObject(new UiSelector().descriptionContains("INSTALL("));
|
||||||
if (benchmark.exists()) {
|
if (benchmark.exists()) {
|
||||||
benchmark.click();
|
benchmark.click();
|
||||||
} else {
|
} else {
|
||||||
UiObject benchmarktext =
|
UiObject benchmarktext =
|
||||||
mDevice.findObject(new UiSelector().textContains("INSTALL("));
|
mDevice.findObject(new UiSelector().textContains("INSTALL("));
|
||||||
benchmarktext.click();
|
benchmarktext.click();
|
||||||
}
|
}
|
||||||
UiObject install =
|
UiObject install =
|
||||||
mDevice.findObject(new UiSelector().description("INSTALL")
|
mDevice.findObject(new UiSelector().description("INSTALL")
|
||||||
.className("android.view.View"));
|
.className("android.view.View"));
|
||||||
if (install.exists()) {
|
if (install.exists()) {
|
||||||
install.click();
|
install.click();
|
||||||
} else {
|
} else {
|
||||||
UiObject installtext =
|
UiObject installtext =
|
||||||
mDevice.findObject(new UiSelector().text("INSTALL")
|
mDevice.findObject(new UiSelector().text("INSTALL")
|
||||||
.className("android.view.View"));
|
.className("android.view.View"));
|
||||||
installtext.click();;
|
installtext.click();;
|
||||||
@ -114,7 +114,7 @@ public class UiAutomation extends BaseUiAutomation {
|
|||||||
installedtext.waitForExists(1000);
|
installedtext.waitForExists(1000);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
//Execute the Work 2.0 Performance Benchmark - wait up to ten minutes for this to complete
|
//Execute the Work 2.0 Performance Benchmark - wait up to ten minutes for this to complete
|
||||||
private void runBenchmark() throws Exception {
|
private void runBenchmark() throws Exception {
|
||||||
UiObject run =
|
UiObject run =
|
||||||
@ -125,17 +125,17 @@ public class UiAutomation extends BaseUiAutomation {
|
|||||||
if (run.exists()) {
|
if (run.exists()) {
|
||||||
run.click();
|
run.click();
|
||||||
} else {
|
} else {
|
||||||
UiObject runtext =
|
UiObject runtext =
|
||||||
mDevice.findObject(new UiSelector().text("RUN"));
|
mDevice.findObject(new UiSelector().text("RUN"));
|
||||||
if (runtext.exists()) {
|
if (runtext.exists()) {
|
||||||
runtext.click();
|
runtext.click();
|
||||||
} else {
|
} else {
|
||||||
UiObject rundesc =
|
UiObject rundesc =
|
||||||
mDevice.findObject(new UiSelector().description("RUN"));
|
mDevice.findObject(new UiSelector().description("RUN"));
|
||||||
rundesc.click();
|
rundesc.click();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
UiObject score =
|
UiObject score =
|
||||||
mDevice.findObject(new UiSelector().text("SCORE DETAILS")
|
mDevice.findObject(new UiSelector().text("SCORE DETAILS")
|
||||||
.className("android.widget.TextView"));
|
.className("android.widget.TextView"));
|
||||||
if (!score.waitForExists(3600000)){
|
if (!score.waitForExists(3600000)){
|
||||||
|
Loading…
x
Reference in New Issue
Block a user