From 65db35be0c49f12e7b15a51bdc7129d906a58008 Mon Sep 17 00:00:00 2001 From: Jed Estep Date: Thu, 14 Apr 2016 14:07:45 -0700 Subject: 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 --- .../android/tradefed/build/OtatoolsBuildInfo.java | 85 ++++++++++++++++++++++ 1 file changed, 85 insertions(+) create mode 100644 src/com/android/tradefed/build/OtatoolsBuildInfo.java (limited to 'src/com/android/tradefed/build/OtatoolsBuildInfo.java') 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 -- cgit v1.2.3