commit | 162a032f5f848d4a530eae1c314259076258bcd4 | [log] [tgz] |
---|---|---|
author | Mary Ruthven <mruthven@chromium.org> | Wed Mar 15 12:08:39 2017 -0700 |
committer | chrome-bot <chrome-bot@chromium.org> | Fri Mar 31 15:16:18 2017 -0700 |
tree | 6f73e343613d7d99418a66992079975e97f4538d | |
parent | 6273f5a63be4a2695b19cc76189607def69f5b27 [diff] |
add test to verify Cr50 update and recovery from erased nvmem This test can be used to verify the cr50-update process, or recovery from erased nvmem. This test will update to the given dev image. After that, each iteration of the test will start by rolling back to the oldest release image. It will then use the cr50-update script to update to each image in order of lowest to highest version. After all of the iterations are complete, the test will reflash the Cr50 image that the dut had at the start of the test. This test verifies that the device updated and the update script did not exit with any unexpected exit codes. If erase_nvmem is being tested then nvmem will also be erased during rollback. There are four parameters in each control file: test_type, dev_image release_image, and old_release_image. The image parameters are the locations of the test images. If the test type is erase_nvmem then cr50 will erase nvmem before rolling back to the release image. The old_release_image needs to have the oldest version if it is being used. dev_image needs to have a version higher than release_image, old_release_image, and whatever image is running on the DUT. If this is not the case, the test cannot guarantee the original state of the dut is restored. There are two control files: control and control.erase_nvmem. control.erase_nvmem will ignore 'old_release_image' and make sure the test_type is set to 'erase_nvmem'. CQ-DEPEND=CL:456624 BUG=b:35833679 BUG=b:35833781 BRANCH=none TEST=test_that $DUT_IP firmware_Cr50Update --args="iterations=3 old_release_image=$OLD_RELEASE release_image=$RELEASE_IMAGE dev_image=$DEV_IMAGE" Change-Id: I4e2f6c3a720f873e44caa6426f251fe0119cba30 Signed-off-by: Mary Ruthven <mruthven@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/456523 Reviewed-by: Wai-Hong Tam <waihong@google.com>
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.