commit | 232f5bb139f53944ae2f28a27c349bb0ed539e28 | [log] [tgz] |
---|---|---|
author | Katherine Threlkeld <kathrelkeld@google.com> | Thu Jul 19 11:26:37 2018 -0700 |
committer | chrome-bot <chrome-bot@chromium.org> | Tue Aug 07 01:50:46 2018 -0700 |
tree | e996a38a375cab6cae089d51adc14b57a83427bd | |
parent | dfc2de264ce2ba34dfbf6f07d0961d9d51911733 [diff] |
[Autotest] Add test for DeviceAutoUpdateDisabled policy Add an AU test which checks the behavior of the DeviceAutoUpdateDisabled device policy. Server test wrapper policy_AUServer: - clears the TPM (both before and after the test to ensure no lab machines are left in an enrolled state) - stages a payload in a reachable location - kicks off the client test Client test policy_DeviceAutoUpdateDisabled: - fake-enrolls the device and sets the policy as desired - sets up a NanoOmaha server to respond to update requests - verifies that update request is or is not sent, as per policy - verifies that update does or does not start, as per policy There are three control files, each with a different policy value. When the policy is set to True, update is disabled and no update requests are sent. When the policy is set to False or not set at all (here None is used to represent that), update is not disabled and device can update. enterprise_au_context adds some helpful functions that are useful for policy AU tests but are likely too specific for update_engine_util. The enterprise_policy_base changes are to handle the difference between what the FakeDMS expects and the policy name from the policy template (which is also what is listed in chrome://policy). This dict will not be difficult to maintain in the long term. TEST=ran on several lab machines with no issue BUG=None Change-Id: Iee6cf840e09e0705b166636dbf896c46d3382662 Reviewed-on: https://chromium-review.googlesource.com/1144536 Commit-Ready: Katherine Threlkeld <kathrelkeld@chromium.org> Tested-by: Katherine Threlkeld <kathrelkeld@chromium.org> Reviewed-by: David Haddock <dhaddock@chromium.org>
Autotest is a framework for fully automated testing. It was originally designed to test the Linux kernel, and expanded by the Chrome OS team to validate complete system images of Chrome OS and Android.
Autotest is composed of a number of modules that will help you to do stand alone tests or setup a fully automated test grid, depending on what you are up to. A non extensive list of functionality is:
A body of code to run tests on the device under test. In this setup, test logic executes on the machine being tested, and results are written to files for later collection from a development machine or lab infrastructure.
A body of code to run tests against a remote device under test. In this setup, test logic executes on a development machine or piece of lab infrastructure, and the device under test is controlled remotely via SSH/adb/some combination of the above.
Developer tools to execute one or more tests. test_that
for Chrome OS and test_droid
for Android allow developers to run tests against a device connected to their development machine on their desk. These tools are written so that the same test logic that runs in the lab will run at their desk, reducing the number of configurations under which tests are run.
Lab infrastructure to automate the running of tests. This infrastructure is capable of managing and running tests against thousands of devices in various lab environments. This includes code for both synchronous and asynchronous scheduling of tests. Tests are run against this hardware daily to validate every build of Chrome OS.
Infrastructure to set up miniature replicas of a full lab. A full lab does entail a certain amount of administrative work which isn't appropriate for a work group interested in automated tests against a small set of devices. Since this scale is common during device bringup, a special setup, called Moblab, allows a natural progressing from desk -> mini lab -> full lab.
See the guides to test_that
and test_droid
:
See the best practices guide, existing tests, and comments in the code.
git clone https://chromium.googlesource.com/chromiumos/third_party/autotest
See the coding style guide for guidance on submitting patches.
You need to run utils/build_externals.py
to set up the dependencies for pre-upload hook tests.