commit | eb875d0acdf820a0c1fc665220c971ee47dce5fa | [log] [tgz] |
---|---|---|
author | Dawid Niedzwiecki <dn@semihalf.com> | Thu Oct 15 10:02:50 2020 +0200 |
committer | Commit Bot <commit-bot@chromium.org> | Mon Oct 26 17:46:54 2020 +0000 |
tree | 3c7741d8205cc7509e90258326ef21ed0789cc87 | |
parent | 163c77d444590731a9d204d9a4791a9eeb02778f [diff] |
mode_switcher: workaround the bug in RO with USB There is a well known bug that DUT does not see USB stick in the recovery mode during recovery tests. The root cause of that is an issue in EC RO firmware - it does not supply Vbus in SRC_ACCESSORY (DUT boots to recovery as SRC due to the assumption of no PD in RO). It has been fixed in 251212fb(removes ACCESSORY modes), but since we don't update RO it has to be workarounded in tests. Check if Servo is snk and if Vbus isn't supplied, then the issue occurs. In that case, change Servo PR to supply Vbus correctly and perform PD Data Swap(PD should be available because most boards used for testing purposes have WP disabled). If Servo is already SRC and EC if UFP(case after EC reboot), perform PD Data Swap as well. This can be done in the workaround placed in servod, but it may be removed in some time so make sure everything is correct. The workaround is used only for boards which have the faft_config ec_ro_vbus_bug to avoid hiding potentially new bugs in future devices. BUG=b:159938441 TEST=Run recovery tests Change-Id: Ia0d115bb46f21b3c38b3d2d0b6a22d6b61a9ffa2 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/third_party/autotest/+/2475053 Tested-by: Dawid Niedźwiecki <dn@semihalf.com> Commit-Queue: Dawid Niedźwiecki <dn@semihalf.com> Commit-Queue: Wai-Hong Tam <waihong@google.com> Reviewed-by: Patryk Duda <pdk@semihalf.com> Reviewed-by: Wai-Hong Tam <waihong@google.com> Reviewed-by: Greg Edelston <gredelston@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.
You need to run utils/build_externals.py
to set up the dependencies for pre-upload hook tests.