From 604b4f56fc9abffc4e5cc16a134838ca89de34aa Mon Sep 17 00:00:00 2001 From: Tsu Chiang Chuang Date: Thu, 7 Apr 2016 23:37:42 +0000 Subject: Revert "Adding a new preparer to initialize attenuator" This reverts commit 347da2c537c447664ef6400f367d096c73ddfcbc. Change-Id: I7e8ebc258967869d066feb22034e2fa9f2b2a35f --- .../tradefed/targetprep/AttenuatorPreparer.java | 57 ---------------------- 1 file changed, 57 deletions(-) delete mode 100644 src/com/android/tradefed/targetprep/AttenuatorPreparer.java (limited to 'src/com/android/tradefed/targetprep') diff --git a/src/com/android/tradefed/targetprep/AttenuatorPreparer.java b/src/com/android/tradefed/targetprep/AttenuatorPreparer.java deleted file mode 100644 index 6027d9fc0..000000000 --- a/src/com/android/tradefed/targetprep/AttenuatorPreparer.java +++ /dev/null @@ -1,57 +0,0 @@ -/* - * 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.targetprep; - -import com.android.tradefed.build.IBuildInfo; -import com.android.tradefed.config.Option; -import com.android.tradefed.config.OptionClass; -import com.android.tradefed.device.DeviceNotAvailableException; -import com.android.tradefed.device.ITestDevice; -import com.android.tradefed.log.LogUtil.CLog; -import com.android.tradefed.util.AttenuatorUtil; -import com.android.tradefed.util.RunUtil; - -import java.util.ArrayList; -import java.util.List; - -@OptionClass(alias = "attenuator") -public class AttenuatorPreparer implements ITargetPreparer { - @Option(name = "attenuator-value", description = "Initial value for the attenuator") - private int initValue = 0; - - @Option(name = "disable", description = "Disable this preparer") - private boolean mDisable = true; - - @Option(name = "attenuator-ip", description = "IP address for attenuators") - private List mIpAddresses = new ArrayList(); - - /** - * {@inheritDoc} - */ - @Override - public void setUp(ITestDevice device, IBuildInfo buildInfo) throws TargetSetupError, - DeviceNotAvailableException { - if (mDisable) - return; - for (String ipAddress : mIpAddresses) { - CLog.v("Initialize attenuator %s to %d at setup", mIpAddresses, initValue); - AttenuatorUtil att = new AttenuatorUtil(ipAddress); - att.setValue(initValue); - } - } -} - -- cgit v1.2.3