faft_cr50: remove old ccd tests

BUG=none
BRANCH=none
TEST=none

Change-Id: I4f886563eb7c5b31aaddc7bd1dacc547f379ece8
Signed-off-by: Mary Ruthven <mruthven@google.com>
Reviewed-on: https://chromium-review.googlesource.com/1192339
Tested-by: Mary Ruthven <mruthven@chromium.org>
Reviewed-by: Kevin Shelton <kmshelton@chromium.org>
diff --git a/server/site_tests/firmware_Cr50Open/control b/server/site_tests/firmware_Cr50Open/control
deleted file mode 100644
index 7f0a7b7..0000000
--- a/server/site_tests/firmware_Cr50Open/control
+++ /dev/null
@@ -1,36 +0,0 @@
-# Copyright 2017 The Chromium OS Authors. All rights reserved.
-# Use of this source code is governed by a BSD-style license that can be
-# found in the LICENSE file.
-
-from autotest_lib.server import utils
-
-AUTHOR = "mruthven"
-NAME = "firmware_Cr50Open"
-PURPOSE = "Verify console unlock"
-ATTRIBUTES = "suite:cr50_stress_experimental"
-TIME = "SHORT"
-TEST_TYPE = "server"
-DEPENDENCIES = "servo"
-
-DOC = """
-Verify the console can be unlocked by pressing the power button.
-
-This must be done using servo instead of CCD, because we need to be able to
-control the power button while the console is locked.
-"""
-
-if 'args_dict' not in locals():
-    args_dict = {}
-
-args_dict.update(utils.args_to_dict(args))
-servo_args = hosts.CrosHost.get_servo_arguments(args_dict)
-
-def run(machine):
-    host = hosts.create_host(machine, servo_args=servo_args)
-
-    iterations = int(args_dict.get("iterations", 1))
-
-    job.run_test("firmware_Cr50Open", host=host, cmdline_args=args,
-                 full_args=args_dict, iterations=iterations)
-
-parallel_simple(run, machines)
diff --git a/server/site_tests/firmware_Cr50Open/firmware_Cr50Open.py b/server/site_tests/firmware_Cr50Open/firmware_Cr50Open.py
deleted file mode 100644
index 3f5a24d..0000000
--- a/server/site_tests/firmware_Cr50Open/firmware_Cr50Open.py
+++ /dev/null
@@ -1,50 +0,0 @@
-# Copyright 2017 The Chromium OS Authors. All rights reserved.
-# Use of this source code is governed by a BSD-style license that can be
-# found in the LICENSE file.
-
-import logging
-
-from autotest_lib.client.common_lib import error
-from autotest_lib.server.cros.faft.cr50_test import Cr50Test
-
-
-class firmware_Cr50Open(Cr50Test):
-    """Verify cr50 unlock.
-
-    Enable the lock on cr50, run 'lock disable', and then press the power
-    button until it is unlocked.
-    """
-    version = 1
-
-    def initialize(self, host, cmdline_args, full_args):
-        """Initialize the test"""
-        super(firmware_Cr50Open, self).initialize(host, cmdline_args, full_args)
-
-        if self.cr50.using_ccd():
-            raise error.TestNAError('Use a flex cable instead of CCD cable.')
-
-        if not self.cr50.has_command('ccdstate'):
-            raise error.TestNAError('Cannot test on Cr50 with old CCD version')
-
-
-    def run_once(self):
-        """Lock CCD and then Open it."""
-        self.cr50.set_ccd_level('lock')
-        try:
-            self.cr50.set_ccd_level('open')
-            success = True
-        except error.TestFail, e:
-            logging.debug(e)
-            if 'Access Denied' in e.message:
-                success = False
-            else:
-                raise
-
-        ccd_status_str =  'locked out' if self.ccd_lockout else 'accessible'
-        # Make sure we only got 'Access Denied' when ccd is locked out and open
-        # was successful only when ccd is accessible.
-        if success == self.ccd_lockout:
-            raise error.TestFail('ccd open %sed with ccd %s' % ('succeed'
-                    if success else 'fail', ccd_status_str))
-        logging.info('ccd open is %s', ccd_status_str)
-
diff --git a/server/site_tests/firmware_Cr50Unlock/control b/server/site_tests/firmware_Cr50Unlock/control
deleted file mode 100644
index e0cb703..0000000
--- a/server/site_tests/firmware_Cr50Unlock/control
+++ /dev/null
@@ -1,34 +0,0 @@
-# Copyright 2017 The Chromium OS Authors. All rights reserved.
-# Use of this source code is governed by a BSD-style license that can be
-# found in the LICENSE file.
-
-from autotest_lib.server import utils
-
-AUTHOR = "mruthven"
-NAME = "firmware_Cr50Unlock"
-PURPOSE = "Verify console unlock"
-ATTRIBUTES = "suite:cr50_stress_experimental"
-TIME = "SHORT"
-TEST_TYPE = "server"
-DEPENDENCIES = "servo"
-
-DOC = """
-Verify the console can be unlocked with gsctool but not with the console command
-if the password isn't set.
-"""
-
-if 'args_dict' not in locals():
-    args_dict = {}
-
-args_dict.update(utils.args_to_dict(args))
-servo_args = hosts.CrosHost.get_servo_arguments(args_dict)
-
-def run(machine):
-    host = hosts.create_host(machine, servo_args=servo_args)
-
-    iterations = int(args_dict.get("iterations", 1))
-
-    job.run_test("firmware_Cr50Unlock", host=host, cmdline_args=args,
-                 full_args=args_dict, iterations=iterations)
-
-parallel_simple(run, machines)
diff --git a/server/site_tests/firmware_Cr50Unlock/firmware_Cr50Unlock.py b/server/site_tests/firmware_Cr50Unlock/firmware_Cr50Unlock.py
deleted file mode 100644
index 5f58ead..0000000
--- a/server/site_tests/firmware_Cr50Unlock/firmware_Cr50Unlock.py
+++ /dev/null
@@ -1,101 +0,0 @@
-# Copyright 2017 The Chromium OS Authors. All rights reserved.
-# Use of this source code is governed by a BSD-style license that can be
-# found in the LICENSE file.
-
-import logging
-
-from autotest_lib.client.common_lib import error
-from autotest_lib.client.common_lib.cros import tpm_utils
-from autotest_lib.server.cros.faft.cr50_test import Cr50Test
-
-
-class firmware_Cr50Unlock(Cr50Test):
-    """Verify cr50 unlock using the console and gsctool.
-
-    Enable the lock on cr50, run the different forms of unlock, making sure
-    cr50 can or cannot be unlocked.
-
-    This does not verify unlock with password.
-    """
-    version = 1
-
-    def initialize(self, host, cmdline_args, full_args):
-        """Initialize servo and check that it has access to cr50 with ccd"""
-        super(firmware_Cr50Unlock, self).initialize(host, cmdline_args,
-                full_args)
-
-        if self.cr50.using_ccd():
-            raise error.TestNAError('Use a flex cable instead of CCD cable.')
-
-        self.host = host
-
-
-    def gsctool_unlock(self, unlock_allowed):
-        """Unlock cr50 using the gsctool command"""
-        result = self.host.run('gsctool -a -U',
-                ignore_status=not unlock_allowed)
-        if not unlock_allowed and (result.exit_status != 3 or
-            'Error: rv 7, response 7' not in result.stderr):
-            raise error.TestFail('unexpected lockout result %r' % result)
-        self.check_unlock(unlock_allowed)
-
-
-    def console_unlock(self, unlock_allowed):
-        """Unlock cr50 using the console command"""
-        try:
-            self.cr50.set_ccd_level('unlock')
-        except error.TestFail, e:
-            # The console cannot be used to unlock cr50 unless a password is
-            # is set.
-            if 'Unlock only allowed after password is set' in e.message:
-                logging.info('Unlock unsupported without password')
-            else:
-                raise
-        self.check_unlock(unlock_allowed)
-
-
-    def check_unlock(self, unlock_allowed):
-        """Check that cr50 is unlocked or locked
-
-        Args:
-            unlock_allowed: True or False on whether Cr50 should be able to
-                            be unlocked.
-        Raises:
-            TestFail if the cr50 ccd state does not match unlock_allowed
-        """
-        unlocked = self.cr50.get_ccd_level() == 'unlock'
-        if unlocked and not unlock_allowed:
-            raise error.TestFail("Cr50 was unlocked when it shouldn't have "
-                    "been")
-        elif not unlocked and unlock_allowed:
-            raise error.TestFail('Cr50 was not unlocked when it should have '
-                    'been')
-
-
-    def unlock_test(self, unlock_func, unlock_allowed):
-        """Verify cr50 can or cannot be unlocked with the given unlock_func"""
-        self.cr50.set_ccd_level('lock')
-
-        # Clear the TPM owner. The login state can affect unlock abilities
-        tpm_utils.ClearTPMOwnerRequest(self.host, wait_for_ready=True)
-
-        unlock_func(unlock_allowed)
-
-        # TODO: set password and try to unlock again. Make sure it succeeds.
-        # no matter how it is being set.
-
-
-    def run_once(self):
-        """Verify cr50 lock behavior on v1 images and v0 images"""
-        logging.info('ccd should %sbe locked out',
-                '' if self.ccd_lockout else 'not ')
-        if self.cr50.has_command('ccdstate'):
-            self.unlock_test(self.gsctool_unlock, not self.ccd_lockout)
-            self.unlock_test(self.console_unlock, False)
-            logging.info('ccd unlock is %s', 'locked out' if self.ccd_lockout
-                    else 'accessible')
-        else:
-            # pre-v1, cr50 cannot be unlocked. Make sure that's true
-            logging.info(self.cr50.send_command_get_output('lock disable',
-                    ['Access Denied\s+Usage: lock']))
-            logging.info('Cr50 cannot be unlocked with ccd v0')