History log of /external/autotest/client/common_lib/hosts/repair_unittest.py
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
07c2e1d04c551dd6a0011243121340d49e562e81 26-Oct-2016 Richard Barnette <jrbarnette@chromium.org> [autotest] Keep servo repair events out of status.log in tests.

For tests that depend on servo, and use the standard recommended
boilerplate for ensuring that the servo host is created, the servo
host's repair() method will be called prior to the test. The
resulting log records in status.log cause wmatrix to report bogus
tests that pollute the UI.

This changes servo repair in this case not to write to status.log.

BUG=chromium:643703
TEST=unit tests

Change-Id: I293282b3e80c484dd8e636c1f3c104c3ecf9283c
Reviewed-on: https://chromium-review.googlesource.com/403453
Commit-Ready: Richard Barnette <jrbarnette@chromium.org>
Tested-by: Richard Barnette <jrbarnette@chromium.org>
Reviewed-by: danny chan <dchan@chromium.org>
/external/autotest/client/common_lib/hosts/repair_unittest.py
f6579937c953d9c6f72f8dcd9ed9f2003f7d2167 17-Aug-2016 Richard Barnette <jrbarnette@chromium.org> [autotest] Update exceptions typically raised by verify().

When verify() fails, typically it raises AutoservVerifyDependencyError.
Previously, such exceptions would contain the description of every
verifier that failed; this was useful for the debug logs. Upcoming
changes for servo repair will sometimes need to print the exceptions
raised by verify(); for the exceptions raised by verify() to be
useful for printing error messages, they need to contain the actual
errors.

This changes verify and repair so that their exceptions contain both
the description and the exception message. If the exception is
converted to a string, (i.e. for printing) it includes all the error
messages. Logging continues to use the verifier description.

This also tweaks the logging messages to be slightly more readable.

BUG=chromium:630018
TEST=Unit tests, plus tested the new servo repair with this code

Change-Id: I3988e9cd7422e7be5d9280b93589ca63184a450e
Reviewed-on: https://chromium-review.googlesource.com/371565
Commit-Ready: Richard Barnette <jrbarnette@chromium.org>
Tested-by: Richard Barnette <jrbarnette@chromium.org>
Reviewed-by: Kevin Cheng <kevcheng@chromium.org>
/external/autotest/client/common_lib/hosts/repair_unittest.py
5522861acc472b2dc9efe16924f41a0b736dc888 17-Feb-2016 J. Richard Barnette <jrbarnette@chromium.org> [autotest] Initial framework for the new Repair.

This adds repair to the new verify framework, with unit tests,
completing the new, combined framework.

Additional code will follow to convert specific repair code to the
new framework.

BUG=chromium:586317,chromium:586326
TEST=unit tests; test full verify with a local instance

Change-Id: Ie2a65d24109e164e0af88556b18706b3f2fecbdc
Reviewed-on: https://chromium-review.googlesource.com/327626
Commit-Ready: Richard Barnette <jrbarnette@chromium.org>
Tested-by: Richard Barnette <jrbarnette@chromium.org>
Reviewed-by: Richard Barnette <jrbarnette@chromium.org>
/external/autotest/client/common_lib/hosts/repair_unittest.py
cfe6b0d426e42bc74b6dac68e8e2662070838751 17-Mar-2016 J. Richard Barnette <jrbarnette@chromium.org> [autotest] Rename the exception for Verify errors.

This renames the exceptions to be raised when Verifiers fail.
AutotestHostVerifyError is renamed to AutoservVerifyError, and
AutotestVerifyDependencyError becomes AutoservVerifyDependencyError.
The change is being made for naming consistency with existing exception
classes, and with some upcoming names to be added with the new
repair framework.

BUG=None
TEST=unit tests; manually run verify to provoke selected errors.

Change-Id: I7c4520c8f87189aaf847c7391946872eddfcdd66
Reviewed-on: https://chromium-review.googlesource.com/333661
Commit-Ready: Richard Barnette <jrbarnette@chromium.org>
Tested-by: Richard Barnette <jrbarnette@chromium.org>
Reviewed-by: Aviv Keshet <akeshet@chromium.org>
/external/autotest/client/common_lib/hosts/repair_unittest.py
41bd6904869ad745a19a1ad7f89f2ca6c4c96a63 12-Mar-2016 J. Richard Barnette <jrbarnette@chromium.org> [autotest] Add unit test coverage for Verifier._reverify()

This adds explicit unit test coverage for the _reverify() method in
hosts.Verifier. Previously, there was only indirect coverage owing to
the fact that RepairStrategy objects call the method.

BUG=None
TEST=run the unit tests

Change-Id: Ie1b40635de683fe2da38fbbde994ada33c531a9c
Reviewed-on: https://chromium-review.googlesource.com/332243
Commit-Ready: Richard Barnette <jrbarnette@chromium.org>
Tested-by: Richard Barnette <jrbarnette@chromium.org>
Reviewed-by: Richard Barnette <jrbarnette@chromium.org>
/external/autotest/client/common_lib/hosts/repair_unittest.py
a4784066542331bd978b5a3ea522f7cf40ec17db 04-Mar-2016 J. Richard Barnette <jrbarnette@chromium.org> [autotest] For hosts.Verifier, assign tags at construction time.

This changes the hosts.Verifier class constructor to use a tag
provided at construction time, rather than have the class provide
its own tag.

BUG=None
TEST=Unit tests; run verify on a local instance.

Change-Id: I64a7b9af7f03cf70f62aea48db80223ebd27b654
Reviewed-on: https://chromium-review.googlesource.com/330950
Commit-Ready: Richard Barnette <jrbarnette@chromium.org>
Tested-by: Richard Barnette <jrbarnette@chromium.org>
Reviewed-by: Richard Barnette <jrbarnette@chromium.org>
/external/autotest/client/common_lib/hosts/repair_unittest.py
2654c55e199cf31f9e7d4ea30e278d779e2312d5 02-Mar-2016 J. Richard Barnette <jrbarnette@chromium.org> [autotest] Fix two bugs in the verification framework.

This fixes two bugs in the verification framework:
* The constructor for RepairStrategy had a bug such that all
Verify DAG nodes would be treated as roots of the DAG, whether
or not they actually were roots.
* If a failing node had more than one other verifier depending on
it, the AutotestVerifyDependencyError that was raised at the
highest level would include the failing node twice.

Additionally, there is improved unit test coverage to catch both
bugs.

BUG=None
TEST=run the new unit tests, with and without the fix.

Change-Id: Ie4c4737491ad827230a5a7d8e14df12ca499be02
Reviewed-on: https://chromium-review.googlesource.com/329991
Commit-Ready: Richard Barnette <jrbarnette@chromium.org>
Tested-by: Richard Barnette <jrbarnette@chromium.org>
Reviewed-by: Dan Shi <dshi@chromium.org>
Reviewed-by: Kevin Cheng <kevcheng@chromium.org>
/external/autotest/client/common_lib/hosts/repair_unittest.py
c542c43c022b33e3a05b2f20facb45267a4b2810 12-Feb-2016 J. Richard Barnette <jrbarnette@chromium.org> [autotest] Initial framework for the new Verify.

This CL is the first step in rewriting both the Repair and Verify
operations, starting with basic verification. The new framework is
meant to enable fixing two specific problems:
* We want consistent, useful log messages. Especially, we want
informative records written to status.log.
* We want to avoid unnecessary actions (like repeatedly trying to
ssh to a DUT that's known to be offline), both to avoid log
clutter, and to improve performance.

The framework will consists of three parts:
* The Verifier class, representing individual verification tests.
* The RepairAction class, representing a procedure that can fix
one or more failed Verifier tests.
* A RepairStrategy class used to organize a DAG of Verifier and
RepairAction objects, and invoke them in order.

This change does not include the RepairAction class or other related
pieces. Subsequent changes will build on this code, and add support
for repair.

BUG=chromium:586317,chromium:586326
TEST=unit tests

Change-Id: I433b9fc9cdbec2a90a7611f5f256aab2d247a4eb
Reviewed-on: https://chromium-review.googlesource.com/327394
Commit-Ready: Richard Barnette <jrbarnette@chromium.org>
Tested-by: Richard Barnette <jrbarnette@chromium.org>
Reviewed-by: Kevin Cheng <kevcheng@chromium.org>
/external/autotest/client/common_lib/hosts/repair_unittest.py