History log of /external/autotest/server/cros/host_lock_manager_unittest.py
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
a96ac8f5413a85ad0ff9ffdcff1ee1af6cde5e8a 04-Dec-2015 Tien Chang <tienchang@google.com> host_lock_manager: Pass in global AFE instance for autotest shards

BUG=chromium:540060
TEST=ran with trybot image; can successfully lock 'packet_capture'

Change-Id: Ie6197635648b32ff1b9ac2456404d342f0104c24
Reviewed-on: https://chromium-review.googlesource.com/315943
Commit-Ready: Tien Chang <tienchang@chromium.org>
Tested-by: Tien Chang <tienchang@chromium.org>
Reviewed-by: Fang Deng <fdeng@chromium.org>
/external/autotest/server/cros/host_lock_manager_unittest.py
580717f35931982b0a98fef941ecf445a8092348 24-Jul-2015 Don Garrett <dgarrett@google.com> unittests: Make all unittests directly runnable.

After this, you can run all of the unittests directly, though some of
them don't pass when run that way.

BUG=chromium:476304
TEST=Ran tests.

Change-Id: I07adeb8dbb6f1d2c0bd6287c4ede7300a8211275
Reviewed-on: https://chromium-review.googlesource.com/288372
Tested-by: Don Garrett <dgarrett@chromium.org>
Trybot-Ready: Don Garrett <dgarrett@chromium.org>
Reviewed-by: Mungyung Ryu <mkryu@google.com>
Commit-Queue: Don Garrett <dgarrett@chromium.org>
/external/autotest/server/cros/host_lock_manager_unittest.py
394c2be3e26b02ea859203ffcb72c1094ecb5e96 12-May-2015 Matthew Sartori <msartori@chromium.org> [autotest] host_lock_manager require lock_reason

Bug chromium:336805 enforced that a lock reason be provided
when locking a device. That worked missed the locking
done in host_lock_manager. This bug allows users of
host_lock_manager.HostLockManager to supply a lock_reason
when locking a device.

BUG=chromium:487042
TEST=Unittests were updated to reflect the change. An additional
unittest was added to check locking without a lock_reason.

Change-Id: I31a9cecfaedd031ac62a4441a1a462abc39be828
Reviewed-on: https://chromium-review.googlesource.com/270458
Tested-by: Matthew Sartori <msartori@chromium.org>
Reviewed-by: Dan Shi <dshi@chromium.org>
Commit-Queue: Matthew Sartori <msartori@chromium.org>
/external/autotest/server/cros/host_lock_manager_unittest.py
2e4e57453f2713d12f79734e2ab3f03b4371a99d 28-May-2013 Alex Miller <milleral@chromium.org> [autotest] Move host_lock_manager out of dynamic suites.

This code is no longer being used in dynamic suites, and is instead
being used by wifi testing code, so let's move it to reflect change of
ownership.

BUG=None
TEST=unit

Change-Id: Icd32da0411dfb6230af562d82ae3fb35dbb949ed
Reviewed-on: https://gerrit.chromium.org/gerrit/56837
Reviewed-by: Alex Miller <milleral@chromium.org>
Tested-by: Alex Miller <milleral@chromium.org>
Commit-Queue: Alex Miller <milleral@chromium.org>
/external/autotest/server/cros/host_lock_manager_unittest.py
b493555db2d43e79d96e793cae9d1ffb822dd6c1 14-Aug-2012 Chris Masone <cmasone@chromium.org> [autotest] Move dynamic suite code into its own module

No big rewrite, just moving files around

BUG=chromium-os:30266
TEST=unit
TEST=successful run_suite.py run
TEST=suite_enumerator.py, suite_preprocessor.py, and suite_scheduler.py

Change-Id: I2fbcae0332104ce3adcb10a1e90ce94cb209aca8
Reviewed-on: https://gerrit.chromium.org/gerrit/30267
Reviewed-by: Scott Zawalski <scottz@chromium.org>
Commit-Ready: Chris Masone <cmasone@chromium.org>
Tested-by: Chris Masone <cmasone@chromium.org>
/external/autotest/server/cros/host_lock_manager_unittest.py
275ec90494383ce0b39a5c3a8688899825d8c91a 11-Jul-2012 Chris Masone <cmasone@chromium.org> [autotest] Lock devices during reimaging, unlock after tests are scheduled.

When running multiple dynamic_suites simultaneously for the same
platform, we run into a race. This is because reimaging and testing are
performed by separate autotest jobs -- which we actually want for a number
of reasons. The following bad interleaving can occur, however:

Schedule reimaging for suite 1
Begin reimaging for suite 1
Schedule reimaging for suite 2
Complete reimaging for suite 1
Begin reimaging for suite 2
Schedule test jobs for suite 1

This is because there's a window of time where we've completed reimaging for
suite 1, but have not yet scheduled jobs to run its associated tests. As far
as the autotest scheduler knows, during that time, those machines are idle
and ready for other jobs -- like the job to reimage devices for suite 2.

Whoops.

This change makes the dynamic suites code Lock devices after a reimaging job
for a given suite starts running. It only unlocks them _after_ it has
scheduled the jobs to run that suite's tests. Since those jobs have a higher
priority than any reimaging job, they will all get run before the devices ever
get reimaged for some other suite.

The formerly bad interleaving above will now look like this:

Schedule reimaging for suite 1
Begin reimaging for suite 1
Schedule reimaging for suite 2
Lock devices being reimaged for suite 1
Complete reimaging for suite 1
Schedule test jobs for suite 1
Unlock devices reimaged for suite 1
Run test jobs for suite 1
Begin reimaging for suite 2

BUG=chromium-os:30978
TEST=unit
TEST=run_suite, see that hosts are Locked while reimaging is running, and remain so until test jobs are scheduled

Change-Id: I394dde8dd7b05a4f25e0d7e649e2dc68a4d8c368
Reviewed-on: https://gerrit.chromium.org/gerrit/27400
Reviewed-by: Chris Sosa <sosa@chromium.org>
Commit-Ready: Chris Masone <cmasone@chromium.org>
Tested-by: Chris Masone <cmasone@chromium.org>
/external/autotest/server/cros/host_lock_manager_unittest.py
9807bd6ce1d549c9a94d87f4dbb5e39ce597c697 11-Jul-2012 Chris Masone <cmasone@chromium.org> [autotest] Add HostLockManager class, for locking/unlockin DUTs

An instance of HostLockManager is intended to be bound to a set of
hostnames shortly after instantiation. Thereafter, it can be used to
lock/unlock those hosts freely, until it is destroyed. At that time,
it will unlock() the associated hosts for you and complain that you
should've done it yourself.

This class is intended for use with dynamic_suite.Reimager and
dynamic_suite.Suite. The purpose is to allow Reimager.attempt() to
lock some hosts while allowing Suite.run_and_wait() to unlock them
during the course of its run. Therefore, a HostLockManager must be
instantiated _before_ we know what hosts are being reimaged, and live
after Reimager.attempt() has finished execution. Hence, the prime()
method that takes an iterable of hostnames.

BUG=chromium-os:30978
TEST=unit

Change-Id: I806a39ccc4951b011b2f7664aa4e942506829bbb
Reviewed-on: https://gerrit.chromium.org/gerrit/27204
Tested-by: Chris Masone <cmasone@chromium.org>
Reviewed-by: Scott Zawalski <scottz@chromium.org>
Commit-Ready: Chris Masone <cmasone@chromium.org>
/external/autotest/server/cros/host_lock_manager_unittest.py