aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEric Rowe <erowe@google.com>2014-09-16 11:22:35 -0700
committerEric Rowe <erowe@google.com>2014-09-16 11:22:35 -0700
commit9b18fef13173d91be428f1a466a9c77f757d3885 (patch)
tree6dc1780f97fbee792d29d87a10791a840bf285b7
parent7a39182cc35e5a792b19a952fb16bcf52e40319f (diff)
downloadtradefederation-9b18fef13173d91be428f1a466a9c77f757d3885.tar.gz
Add option to turn screen off for sensor tests
Change-Id: I9b3ae318a45eccc7beb0e4d29ba94a58fcada137
-rw-r--r--prod-tests/src/com/android/sensor/tests/SingleSensorTests.java7
1 files changed, 6 insertions, 1 deletions
diff --git a/prod-tests/src/com/android/sensor/tests/SingleSensorTests.java b/prod-tests/src/com/android/sensor/tests/SingleSensorTests.java
index 88bbb0bfb..c6389dc7b 100644
--- a/prod-tests/src/com/android/sensor/tests/SingleSensorTests.java
+++ b/prod-tests/src/com/android/sensor/tests/SingleSensorTests.java
@@ -41,6 +41,9 @@ public class SingleSensorTests extends InstrumentationTest {
+ "files will be pulled, uploaded, and deleted from the device.")
private String mOutputPrefix = "single_sensor_";
+ @Option(name = "screen-off", description = "Whether to run the tests with the screen off")
+ private boolean mScreenOff = false;
+
/**
* Run the instrumentation tests, pull the test generated files, and clean up.
*/
@@ -49,7 +52,9 @@ public class SingleSensorTests extends InstrumentationTest {
Assert.assertNotNull(getDevice());
try {
- turnScreenOff();
+ if (mScreenOff) {
+ turnScreenOff();
+ }
super.run(listener);
pullFiles(listener);
} finally {