aboutsummaryrefslogtreecommitdiff
path: root/src/com/android/tradefed/build/OtatoolsBuildInfo.java
diff options
context:
space:
mode:
authorJed Estep <jestep@google.com>2016-04-14 14:07:45 -0700
committerJed Estep <jestep@google.com>2016-06-03 15:03:20 -0700
commit65db35be0c49f12e7b15a51bdc7129d906a58008 (patch)
treed5673b3b1341d57a38ae63429f9027d3a2e38d51 /src/com/android/tradefed/build/OtatoolsBuildInfo.java
parent8f81eacabbcd953eb4e3418eab084c1dd12ddd74 (diff)
downloadtradefederation-65db35be0c49f12e7b15a51bdc7129d906a58008.tar.gz
Add Python test runner
Additionally add a BuildInfo which holds otatools, since the first uses of this testtype will be for testing contents of this zip Bug: 28115108 Change-Id: I52f451165ba5ee1c72c8c50484403ec5b08116cf
Diffstat (limited to 'src/com/android/tradefed/build/OtatoolsBuildInfo.java')
-rw-r--r--src/com/android/tradefed/build/OtatoolsBuildInfo.java85
1 files changed, 85 insertions, 0 deletions
diff --git a/src/com/android/tradefed/build/OtatoolsBuildInfo.java b/src/com/android/tradefed/build/OtatoolsBuildInfo.java
new file mode 100644
index 000000000..3a3f7ad96
--- /dev/null
+++ b/src/com/android/tradefed/build/OtatoolsBuildInfo.java
@@ -0,0 +1,85 @@
+/*
+ * Copyright (C) 2016 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.tradefed.build;
+
+import java.io.File;
+
+/**
+ * An {@link IBuildInfo} that contains otatools artifacts.
+ */
+public class OtatoolsBuildInfo extends BuildInfo {
+ private static final String SECURITY_DIR_NAME = "otatools_security";
+ private static final String BIN_DIR_NAME = "otatools_bin";
+ private static final String FRAMEWORK_DIR_NAME = "otatools_framework";
+ private static final String RELEASETOOLS_DIR_NAME = "otatools_releasetools";
+
+ /**
+ * Add /build/target/product/security to this file map
+ */
+ public void setSecurityDir(File dir, String version) {
+ setFile(SECURITY_DIR_NAME, dir, version);
+ }
+
+ /**
+ * Get the {@link File} representing the /build/target/product/security directory.
+ */
+ public File getSecurityDir() {
+ return getFile(SECURITY_DIR_NAME);
+ }
+
+ /**
+ * Add /bin to this file map
+ */
+ public void setBinDir(File dir, String version) {
+ setFile(BIN_DIR_NAME, dir, version);
+ }
+
+ /**
+ * Get the {@link File} representing the /bin directory.
+ */
+ public File getBinDir() {
+ return getFile(BIN_DIR_NAME);
+ }
+
+ /**
+ * Add /framework to this file map
+ */
+ public void setFrameworkDir(File dir, String version) {
+ setFile(FRAMEWORK_DIR_NAME, dir, version);
+ }
+
+ /**
+ * Get the {@link File} representing the /framework directory.
+ */
+ public File getFrameworkDir() {
+ return getFile(FRAMEWORK_DIR_NAME);
+ }
+
+ /**
+ * Add /releasetools to this file map
+ */
+ public void setReleasetoolsDir(File dir, String version) {
+ setFile(RELEASETOOLS_DIR_NAME, dir, version);
+ }
+
+ /**
+ * Get the {@link File} representing the /releasetools directory.
+ */
+ public File getReleasetoolsDir() {
+ return getFile(RELEASETOOLS_DIR_NAME);
+ }
+} \ No newline at end of file