aboutsummaryrefslogtreecommitdiff
path: root/crosperf/machine_manager.py
AgeCommit message (Collapse)Author
2015-05-22Remove run_remote_tests references.cmtice
run_remote_tests.sh is about to be removed from ChromeOS. This CL removes all references to run_remote_tests from toolchain-utils. It also updates unittests to make sure they work with recent changes. BUG=crbug:498778 TEST=Verifed results_cache_unittest (and all the other unittests) works with changes. Change-Id: Ic9413bf77a1679e1267b81b182fa7f64da2629b5 Reviewed-on: https://chrome-internal-review.googlesource.com/216884 Reviewed-by: David Sharp <dhsharp@google.com> Commit-Queue: Caroline Tice <cmtice@google.com> Tested-by: Caroline Tice <cmtice@google.com>
2015-04-26Fix current problem with machine locks.cmtice
Currently if crosperf can't access the default locks directory, it assumes that it is safe to proceed without locks and it uses machines without checking locks. This script does two things: It causes crosperf to fail if it can't access a locks directory; and it allows the user to specify an alternate locks directory. As a by-product it also adds a boolean prompting function to utils/misc.py BUG=None TEST=Tested with default directory accessible & inaccessible; tested using local locks directory. Change-Id: I6f24f772986813bf089f5f4e40335a15e8ee4837 Reviewed-on: https://chrome-internal-review.googlesource.com/214129 Reviewed-by: Luis Lozano <llozano@chromium.org> Commit-Queue: Caroline Tice <cmtice@google.com> Tested-by: Caroline Tice <cmtice@google.com>
2015-02-27crosperf: fix the problem on machine assignment.Yunlian Jiang
BUG=chromium:461628 TEST=it always reuses the image on the machine for test shown in bug. Change-Id: I8106eaa31395db3ee95507b2a9cd7ed0439bc890 Reviewed-on: https://chrome-internal-review.googlesource.com/202667 Reviewed-by: Caroline Tice <cmtice@google.com> Commit-Queue: Yunlian Jiang <yunlian@google.com> Tested-by: Yunlian Jiang <yunlian@google.com>
2014-06-05Update and expand machine_manager_unittest.cmtice
Expand machine_manager_unittest.py to test all functions in machine_manager.py. Modify MachineManager class to optionally take a command_executer and logger as arguments; also to make command executer and logger class member attributes (rather than external objects), to simplify testing. BUG=None TEST=Ran unittest to make sure it works; ran all the other unittests; ran several 'real' crosperf runs to verify that the changes didn't break crosperf. Change-Id: I29798457cb1f7572cb339722b572b9d95b21b989 Reviewed-on: https://chrome-internal-review.googlesource.com/165256 Reviewed-by: Yunlian Jiang <yunlian@google.com> Commit-Queue: Caroline Tice <cmtice@google.com> Tested-by: Caroline Tice <cmtice@google.com>
2014-05-31Fix problems found when running benchmark_run_unittest.cmtice
When the changes to benchmark_run_unittest got committed, somehow the changes to logger.py did not get committed (adding Mock functions to logger). Also, MockMachineManger.AcquireMachine needs an extra parameter, to match change to MachineManager.AcquireMachine. This CL fixes both of those problems. BUG=None TEST=Ran unittests successfully after these changes. Change-Id: I7ae35241ee62ddb484728ffc5c26ea14bc1f7c7f Reviewed-on: https://chrome-internal-review.googlesource.com/164889 Reviewed-by: Yunlian Jiang <yunlian@google.com> Tested-by: Caroline Tice <cmtice@google.com> Commit-Queue: Caroline Tice <cmtice@google.com>
2014-05-21Better handling of "not identical machines" failure.cmtice
Nightly tests, especially on the x86-generic boxes, fail frequently because the DUTs have different board images on them, so Crosperf decides the machines are not identical and refuses to run the tests. With this CL, if the machine_manager finds that the machines fail the "identical" test, it will try to push the same image onto all the machines, and then check them again to see if they are the same. It only tries this once; if they fail the check the second time around, it is still a fatal failure. This should eliminate many of the unnecessary failures in our nightly tests. This CL also fixes a small bug in the auto-delete script (this fix has been running for a while on mobiletc-prebuild, but never got committed). BUG=None TEST=Ran several iterations where I forced the first "identical" check to fail. The changes worked. Change-Id: Ied2a55e5d3e2789e58a503aef03269888954b579 Reviewed-on: https://chrome-internal-review.googlesource.com/163334 Reviewed-by: Luis Lozano <llozano@chromium.org> Commit-Queue: Caroline Tice <cmtice@google.com> Tested-by: Caroline Tice <cmtice@google.com>
2014-04-11Update unittests to all pass.cmtice
Fix the parameters to the various unittests so they match recent changes and the unittests all pass again. BUG=None TEST=I ran all the unittests with the changes. Change-Id: I083b5127a2ade8f1dbaf2bb173d82183871cb7c7 Reviewed-on: https://chrome-internal-review.googlesource.com/159915 Reviewed-by: Yunlian Jiang <yunlian@google.com> Commit-Queue: Caroline Tice <cmtice@google.com> Tested-by: Caroline Tice <cmtice@google.com>
2014-03-14Add --logging_level option to crosperf.cmtice
Add --logging_level={verbose, average, quiet} option to crosperf, optionally reducing the amount of logging output. "verbose" gives the same output Crosperf always gave; "quiet" gives minimal output, and "average" is in the middle. The default for now is "verbose". Doing this also involved adding logging levels to the command_executer, and to image_chromeos (again, with the default being "verbose"). BUG=None TEST=Tested all three levels of logging, with and without having to reimage the DUT. It all worked properly. Change-Id: Icf8c9a6831fe25202adcb624c6c7e1d1a7ac25a5 Reviewed-on: https://chrome-internal-review.googlesource.com/156883 Reviewed-by: Caroline Tice <cmtice@google.com> Commit-Queue: Caroline Tice <cmtice@google.com> Tested-by: Caroline Tice <cmtice@google.com>
2014-02-20Add 'build' settings option and xbuddy image format.cmtice
This patch updates Crosperf to add the 'build' tag in the experiment file, and to allow that field to contain xbuddy syntax for using trybot and/or official builds in the test runs. It also adds a bit more checking to make sure we have everything necessary for running 'cros flash' before attempting to use it. BUG=None TEST=I have run this using an experiment file that compares a local image, a trybot image and an official image against each other. It all worked. Change-Id: Ia896799061508fb5718a3201b1599d8622de0b3f Reviewed-on: https://chrome-internal-review.googlesource.com/154097 Reviewed-by: Yunlian Jiang <yunlian@google.com> Commit-Queue: Caroline Tice <cmtice@google.com> Tested-by: Caroline Tice <cmtice@google.com>
2013-12-02Update machine_manager.py to deal with new 'ifconfig' output.cmtice
BUG=None TEST=Tested in on updated lab parrot machines and it worked. Change-Id: I709989a977130bbeeb667e825acdc874c6bfaf50 Reviewed-on: https://chrome-internal-review.googlesource.com/148714 Reviewed-by: Yunlian Jiang <yunlian@google.com> Commit-Queue: Caroline Tice <cmtice@google.com> Tested-by: Caroline Tice <cmtice@google.com> Reviewed-by: Bhaskar Janakiraman <bjanakiraman@google.com>
2013-06-06Adding support of telemetry to crosperfYunlian Jiang
BUG=None TEST=run crosperf with pyauto/telemetry test with/without cache. all pass. Change-Id: If07ac020a9107a79d5780a58fd6dcc924d07f07f Reviewed-on: https://gerrit-int.chromium.org/36594 Reviewed-by: Luis Lozano <llozano@chromium.org> Commit-Queue: Yunlian Jiang <yunlian@google.com> Tested-by: Yunlian Jiang <yunlian@google.com> Reviewed-on: https://gerrit-int.chromium.org/39241 Reviewed-by: Yunlian Jiang <yunlian@google.com>
2013-06-03crosperf: use mac address as machine id if VPD is not available.Yunlian Jiang
For zgb machine, the dump_vpd_log --full --stdout does not return serial number, in this case, we use mac address instead. BUG=None TEST=It get machine id for zgb Change-Id: I1058dcd2a18638533c90a40d09adcc7a6bd8a660 Reviewed-on: https://gerrit-int.chromium.org/38900 Reviewed-by: Luis Lozano <llozano@chromium.org> Tested-by: Yunlian Jiang <yunlian@google.com> Commit-Queue: Yunlian Jiang <yunlian@google.com>
2013-05-23crosperf: remove dead machine in the runtime.Yunlian Jiang
This checks whether a machine is reacheable after a test run. If the machine is dead, we remove it from the machine list in the machine manager. BUG=None TEST=crosperf a simple case passes. Change-Id: Ie40a4a41715f2dc0349666079faa599b3c8aa667 Reviewed-on: https://gerrit-int.chromium.org/38578 Reviewed-by: Luis Lozano <llozano@chromium.org> Commit-Queue: Yunlian Jiang <yunlian@google.com> Tested-by: Yunlian Jiang <yunlian@google.com>
2013-05-23crosperf: keep alive if one machine is down.Yunlian Jiang
Originally, crosperf dies if any of machine in the machine list is unreachable, this patch just ignore the unreachable machine. BUG=None TEST=crosperf a simple testcase passes. Change-Id: I835b484f5378215da142d5e8e64471ce744aea30 Reviewed-on: https://gerrit-int.chromium.org/38475 Reviewed-by: Luis Lozano <llozano@chromium.org> Commit-Queue: Yunlian Jiang <yunlian@google.com> Tested-by: Yunlian Jiang <yunlian@google.com>
2013-04-10Reboot machine if imaging failedYunlian Jiang
BUG=None TEST=run crosperf, machine rebooted as expected Change-Id: I0ffb94d9cc96858d91fb5f8c277c91c8c836b0cf Reviewed-on: https://gerrit-int.chromium.org/34651 Reviewed-by: Han Shen <shenhan@google.com> Tested-by: Yunlian Jiang <yunlian@google.com> Commit-Queue: Yunlian Jiang <yunlian@google.com>
2013-03-15Cleaned up directory after copy of tools from perforce directoryLuis Lozano
Got rid of stale copies of some tools like "crosperf" and moved all files under v14 directory (that came from perforce) into the top directory. BUG=None TEST=None Change-Id: I408d17a36ceb00e74db71403d2351fd466a14f8e Reviewed-on: https://gerrit-int.chromium.org/33887 Tested-by: Luis Lozano <llozano@chromium.org> Reviewed-by: Yunlian Jiang <yunlian@google.com> Commit-Queue: Luis Lozano <llozano@chromium.org>
2012-12-20Synced repos to: 64740Ahmad Sharif
2012-10-09Synced repos to: 63271Ahmad Sharif
2012-02-06Synced repos to: 58247Ahmad Sharif
2012-02-02Synced repos to: 58208Ahmad Sharif