aboutsummaryrefslogtreecommitdiff
path: root/builder-test-api
diff options
context:
space:
mode:
authorXavier Ducrohet <xav@android.com>2013-05-03 14:18:49 -0700
committerXavier Ducrohet <xav@android.com>2013-05-03 16:34:54 -0700
commitb79e0afe5f5d69a32b7ac9fc0587baa11bf54d65 (patch)
treed6e617ff733bcdf8d55112bc3bc93121d6888f21 /builder-test-api
parent4f6d97fc336e329acfe305f0908f475823770697 (diff)
downloadbuild-b79e0afe5f5d69a32b7ac9fc0587baa11bf54d65.tar.gz
Update DeviceProvider API
DeviceConnector can now be queried for device info allowing the test runner to only deploy to compatible devices. Change-Id: I4dbd29ce37e50c6294592405b7602df494f3b566
Diffstat (limited to 'builder-test-api')
-rw-r--r--builder-test-api/src/main/java/com/android/builder/testing/api/DeviceConnector.java11
-rw-r--r--builder-test-api/src/main/java/com/android/builder/testing/api/TestRunner.java45
2 files changed, 11 insertions, 45 deletions
diff --git a/builder-test-api/src/main/java/com/android/builder/testing/api/DeviceConnector.java b/builder-test-api/src/main/java/com/android/builder/testing/api/DeviceConnector.java
index b447c11..243bdc2 100644
--- a/builder-test-api/src/main/java/com/android/builder/testing/api/DeviceConnector.java
+++ b/builder-test-api/src/main/java/com/android/builder/testing/api/DeviceConnector.java
@@ -59,4 +59,15 @@ public abstract class DeviceConnector implements IShellEnabledDevice {
* @throws DeviceException
*/
public abstract void uninstallPackage(@NonNull String packageName, int timeout, ILogger logger) throws DeviceException;
+
+ public abstract int getApiLevel();
+
+ @NonNull
+ public abstract String getAbi();
+
+ public abstract int getDensity();
+
+ public abstract int getHeight();
+
+ public abstract int getWidth();
}
diff --git a/builder-test-api/src/main/java/com/android/builder/testing/api/TestRunner.java b/builder-test-api/src/main/java/com/android/builder/testing/api/TestRunner.java
deleted file mode 100644
index 1291aa5..0000000
--- a/builder-test-api/src/main/java/com/android/builder/testing/api/TestRunner.java
+++ /dev/null
@@ -1,45 +0,0 @@
-/*
- * Copyright (C) 2013 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package com.android.builder.testing.api;
-
-import com.android.annotations.NonNull;
-import com.android.annotations.Nullable;
-import com.android.utils.ILogger;
-import com.google.common.annotations.Beta;
-
-import java.io.File;
-import java.util.List;
-
-/**
- * A test runner able to run tests on a list of {@link DeviceConnector}
- */
-@Beta
-public interface TestRunner {
-
- boolean runTests(
- @NonNull String projectName,
- @NonNull String variantName,
- @NonNull File testApk,
- @NonNull String testPackageName,
- @NonNull String testInstrumentationRunner,
- @Nullable File testedApk,
- @Nullable String testedPackageName,
- @NonNull List<? extends DeviceConnector> deviceList,
- int timeout,
- @NonNull File resultsDir,
- @NonNull ILogger logger) throws TestException;
-}