blob: ce120f00f34a8d20cf3516f713158694ce2a917e [file] [log] [blame]
# Copyright (c) 2013 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.client.common_lib import utils
AUTHOR = "Chromium OS"
NAME = "autoupdate_CatchBadSignatures"
TEST_CATEGORY = "Functional"
TEST_CLASS = "platform"
TEST_TYPE = "server"
SUITE = "bvt-cq, bvt, bvt_cq"
'cc': [''],
'labels': ['Cr-Internals-Installer'],
DOC = """
This is a test to verify that update_engine correctly checks
signatures in the metadata hash and the update payload itself. This is
achieved by feeding updates to update_engine where the private key
used to make the signature, intentionally does not match with the
public key used for verification.
To run locally, you must set up the file
with the following content
devserver_dir = <full repo path>/src/platform/dev
dev_server = http://<hostname>:8080
and then start outside the chroot:
$ src/platform/dev/
With this in place, you can now run the test:
$ ./ --fast \
--board=${BOARD} \
--remote=<DUT_IP> \
def run_test(machine):
"""Execute a test configuration on a given machine."""
host = hosts.create_host(machine)
job.run_test("autoupdate_CatchBadSignatures", host=host)
# Invoke parallel tests.
parallel_simple(run_test, machines)