aboutsummaryrefslogtreecommitdiff
path: root/src/com/android/tradefed/targetprep
diff options
context:
space:
mode:
authorTsu Chiang Chuang <tsu@google.com>2016-04-07 23:37:42 +0000
committerTsu Chiang Chuang <tsu@google.com>2016-04-07 23:37:42 +0000
commit604b4f56fc9abffc4e5cc16a134838ca89de34aa (patch)
tree3ac5951b364c5358db3600b1d166696beae92229 /src/com/android/tradefed/targetprep
parent347da2c537c447664ef6400f367d096c73ddfcbc (diff)
downloadtradefederation-604b4f56fc9abffc4e5cc16a134838ca89de34aa.tar.gz
Revert "Adding a new preparer to initialize attenuator"
This reverts commit 347da2c537c447664ef6400f367d096c73ddfcbc. Change-Id: I7e8ebc258967869d066feb22034e2fa9f2b2a35f
Diffstat (limited to 'src/com/android/tradefed/targetprep')
-rw-r--r--src/com/android/tradefed/targetprep/AttenuatorPreparer.java57
1 files changed, 0 insertions, 57 deletions
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<String> mIpAddresses = new ArrayList<String>();
-
- /**
- * {@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);
- }
- }
-}
-