History log of /external/autotest/client/common_lib/site_utils.py
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
71e94bd284ce7cb7c6feed21d85c120218aa1757 30-Jan-2016 Ralph Nathan <ralphnathan@google.com> brillo: Add checks to ensure the recorded audio matches what was played.

Compares what was played to the recorded audio to ensure they are the
same. Checks that the frequency is the same and that there are no
extraneous frequencies in the recorded audio.

BUG=b:25803625
TEST=test_droid.py suite:brillo-audio

Change-Id: Iaa0bf06f6da67c3af0fe715ec3f4d42fda99e637
Reviewed-on: https://chromium-review.googlesource.com/324636
Commit-Ready: Ralph Nathan <ralphnathan@chromium.org>
Tested-by: Ralph Nathan <ralphnathan@chromium.org>
Reviewed-by: Gilad Arnold <garnold@chromium.org>
/external/autotest/client/common_lib/site_utils.py
a44442fbeff945fdcf1f91aaf8bed21ccd214b77 25-Jan-2016 Gilad Arnold <garnold@google.com> Tester feedback: audio playback query delegate implementations.

First implementation of a query delegate, covering the two playback
queries. These can be used with existing interactive Brillo audio tests.

BUG=b:26769297
TEST=test_droid -i <dut-serial> brillo_OpenSLESPlaybackAudioTest

Change-Id: I4b9273168d49d8b660982b0537762d1d46a804fe
Reviewed-on: https://chromium-review.googlesource.com/324532
Commit-Ready: Gilad Arnold <garnold@chromium.org>
Tested-by: Gilad Arnold <garnold@chromium.org>
Reviewed-by: Gilad Arnold <garnold@chromium.org>
/external/autotest/client/common_lib/site_utils.py
42ffd3d0a235f8ab14af52142176c7bd7f299487 28-Jan-2016 Dan Shi <dshi@google.com> [autotest] Allow test to pick wireless ssid based on host's subnet

This change allows a test to choose wireless ssid from shadow config based on
its subnet. Global config has a fixed CLIENT/wireless_ssid config for test
to get the wireless ssid. To support different host with different wireless
ssid, we need to allow more flexible config, e.g.,
[CLIENT]
wireless_ssid: ssid_0
wireless_ssid_1.2.3.4/24: ssid_1
wireless_ssid_4.3.2.1/16: ssid_2

For hosts in subnet 1.2.3.4/24, ssid_1 will be used.
For hosts in subnet 4.3.2.1/16, ssid_2 will be used.
For hosts in other subnets, ssid_0 will be used.

BUG=chromium:577506
TEST=unittest

Change-Id: I03ee67c1d9efc40c78ab4947895b2dac886854dd
Reviewed-on: https://chromium-review.googlesource.com/324560
Commit-Ready: Dan Shi <dshi@google.com>
Tested-by: Dan Shi <dshi@google.com>
Reviewed-by: Dan Shi <dshi@google.com>
/external/autotest/client/common_lib/site_utils.py
54562ba80ed68d4ebdf912be9bc80efe5974ccf1 25-Jan-2016 Ralph Nathan <ralphnathan@google.com> brillo: Add test for recording using two channels.

Add test for stereo recording.

BUG=26747922
TEST=test_droid.py suite:brillo-audio passes

Change-Id: Ie6b05cc58324bc89230fc894e97e79c577aa5795
Reviewed-on: https://chromium-review.googlesource.com/323710
Commit-Ready: Ralph Nathan <ralphnathan@chromium.org>
Tested-by: Ralph Nathan <ralphnathan@chromium.org>
Reviewed-by: Ralph Nathan <ralphnathan@chromium.org>
/external/autotest/client/common_lib/site_utils.py
114e17228efd62ab595690be30cb1e3f26fabebe 11-Jan-2016 Dan Shi <dshi@google.com> [autotest] Support selecting drone in restricted subnet

For agent task uses host in restricted subnet, only use drone in the subnet.
For agent task uses host NOT in restricted subnet, only use drones NOT in any
restricted subnet.

BUG=chromium:574872
TEST=local run, unittest

Change-Id: I3492fe14660e7629f982937d428d230ca9dcf3dc
Reviewed-on: https://chromium-review.googlesource.com/321116
Commit-Ready: Dan Shi <dshi@google.com>
Tested-by: Dan Shi <dshi@chromium.org>
Reviewed-by: Fang Deng <fdeng@chromium.org>
Reviewed-by: Simran Basi <sbasi@chromium.org>
/external/autotest/client/common_lib/site_utils.py
b5746a102355b9a19e34518da636060fd7643d70 08-Dec-2015 Gilad Arnold <garnold@google.com> Closed-loop audio feedback client implementation.

This is an implementation of a feedback client for interactive audio
testing that is based on a closed-loop connection between the DUT's
audio-out/audio-in jacks. This includes logic for both playback and
recording queries.

BUG=b:26162596
TEST=None

Change-Id: I930630a9beedbdbc1d9c879aeb50c27285682116
Reviewed-on: https://chromium-review.googlesource.com/319198
Commit-Ready: Gilad Arnold <garnold@chromium.org>
Tested-by: Gilad Arnold <garnold@chromium.org>
Reviewed-by: Ralph Nathan <ralphnathan@chromium.org>
/external/autotest/client/common_lib/site_utils.py
216389cfb1c687a90581cfdd62cbff0535bb6c1f 22-Dec-2015 Dan Shi <dshi@google.com> [autotest] Locate devserver in restricted subnets

Add a new config (CROS/restricted_subnets) to specify a list of subnets that
requires devserver within the same subnet.

In devserver.ImageServer.resolve function, always pass in the hostname to check
subnet restriction. This does add a bit overhead to do IP lookup.

BUG=chromium:571651
TEST=local test

Change-Id: Id3e47c315523d6bc7d40e1c5fbedd1733147b8b9
Reviewed-on: https://chromium-review.googlesource.com/319612
Commit-Ready: Dan Shi <dshi@google.com>
Tested-by: Dan Shi <dshi@chromium.org>
Reviewed-by: Simran Basi <sbasi@chromium.org>
/external/autotest/client/common_lib/site_utils.py
225b90414c570404a1f71e6b12d2402ef2e32a20 18-Nov-2015 Dan Shi <dshi@google.com> [autotest] Add a dummy test for android device.

With this change, user can create a test from AFE to run the dummy test on an
Android device. Image specified in "image" box with format
branch/target/build_id will be installed in the android device during the test.

BUG=chromium:548881
TEST=local create test from AFE.

Change-Id: I2ca444c1824a838f4f4f9c5d3691d2a20288798a
Reviewed-on: https://chromium-review.googlesource.com/312976
Commit-Ready: Dan Shi <dshi@google.com>
Tested-by: Dan Shi <dshi@chromium.org>
Reviewed-by: Simran Basi <sbasi@chromium.org>
/external/autotest/client/common_lib/site_utils.py
ff3ebfe8d9434cf590ad798b80b285e94c37530c 01-Sep-2015 Dan Shi <dshi@chromium.org> [autotest] Collect stats about devserver assignment for provision job.

Collect stats about if a devsever is assigned to a dut in the same subnet or
not, during a provision job.
The stats will be used to evaluate how much cros-lab traffic can be alleviated
if a dut can only use devserver in the same lab.

BUG=chromium:421123
TEST=local

Change-Id: I7ef7e3ea77df99f8d5359b800e4dee4bf7b9eb36
Reviewed-on: https://chromium-review.googlesource.com/296761
Trybot-Ready: Dan Shi <dshi@chromium.org>
Tested-by: Dan Shi <dshi@chromium.org>
Reviewed-by: Don Garrett <dgarrett@chromium.org>
Commit-Queue: Dan Shi <dshi@chromium.org>
/external/autotest/client/common_lib/site_utils.py
e0b08e6170b57f90262726eb7f04e059cb47419c 11-Aug-2015 Hsinyu Chao <hychao@chromium.org> Revert "autotest: move constants to common_lib"

This reverts commit a4ac7a8f67d61f8a616724f9426dbc0fce71ce69.

BUG=chromium:519353

Change-Id: Iec2873ad22b5bb90e46a9e5b323f9626a2c07d9b
Reviewed-on: https://chromium-review.googlesource.com/292347
Reviewed-by: Hsinyu Chao <hychao@chromium.org>
Commit-Queue: Hsinyu Chao <hychao@chromium.org>
Tested-by: Hsinyu Chao <hychao@chromium.org>
Reviewed-by: Sonny Rao <sonnyrao@chromium.org>
Commit-Queue: Sonny Rao <sonnyrao@chromium.org>
Tested-by: Sonny Rao <sonnyrao@chromium.org>
/external/autotest/client/common_lib/site_utils.py
a4ac7a8f67d61f8a616724f9426dbc0fce71ce69 06-Aug-2015 Eric Caruso <ejcaruso@chromium.org> autotest: move constants to common_lib

This file gets imported from lots of server-side tests and
infrastructure so it shouldn't be hiding in client/cros. This
moves the file and fixes all imports.

BUG=chromium:485834
TEST=run many tests, make sure there are no problems importing
constants

Change-Id: I5c2b2a0bef6ebc998e62f40162a6ec9cc4436480
Reviewed-on: https://chromium-review.googlesource.com/291302
Trybot-Ready: Eric Caruso <ejcaruso@chromium.org>
Commit-Queue: Eric Caruso <ejcaruso@chromium.org>
Tested-by: Eric Caruso <ejcaruso@chromium.org>
Reviewed-by: Chris Sosa <sosa@google.com>
/external/autotest/client/common_lib/site_utils.py
b2d204bdfe899c01188cba532d5f61a98d38f509 04-Aug-2015 Rebecca Silberstein <silberst@chromium.org> autotest: update version check for test-ap builds

Update regex to cover test-ap builds when checking image versions after
an update. Also added unittest.

BUG=chromium:496868
TEST=ran network_WiFi_UpdateRouter test on DUT
TEST=python autoupdater_unittest.py

Change-Id: Ied31c18bfb087f40cd28729920d492a83dd81d22
Reviewed-on: https://chromium-review.googlesource.com/290436
Reviewed-by: Dan Shi <dshi@chromium.org>
Commit-Queue: Rebecca Silberstein <silberst@chromium.org>
Trybot-Ready: Rebecca Silberstein <silberst@chromium.org>
Tested-by: Rebecca Silberstein <silberst@chromium.org>
/external/autotest/client/common_lib/site_utils.py
e24761c537e04951e92d85f0878f2b6dbcc94caf 07-Jul-2015 Dan Shi <dshi@chromium.org> [autotest] Handle version comparison for builder trybot-*-pre-cq

trybot pre-cq build is similar to trybot paladin build that the build name ends
with -b#, and the release version in lsb-release ends with a date string, e.g.,
3837.0.2013_03_21_1340

This CL adds the support to compare the CrOS version from builder
trybot-*-pre-cq to the release name from lsb-release file.

BUG=chromium:507406
TEST=unittest

Change-Id: Ib57408a6e76715cd833daa58815f38c0c897938a
Reviewed-on: https://chromium-review.googlesource.com/283514
Tested-by: Dan Shi <dshi@chromium.org>
Reviewed-by: Tien Chang <tienchang@chromium.org>
Reviewed-by: Chris Sosa <sosa@chromium.org>
Commit-Queue: Dan Shi <dshi@chromium.org>
/external/autotest/client/common_lib/site_utils.py
5b35656e62acce8fd0fac341592670ad0145c8a9 26-Jun-2015 Ilja H. Friedel <ihf@chromium.org> Flash autotests: Add warning if Flash is not installed.

BUG=chrome-os-partner:41508
TEST=Ran locally with and without Flash binary.

Change-Id: Ifa0b6f95196565962a26392c7b7ebea11ab05da3
Reviewed-on: https://chromium-review.googlesource.com/282251
Commit-Queue: Ilja Friedel <ihf@chromium.org>
Trybot-Ready: Ilja Friedel <ihf@chromium.org>
Tested-by: Ilja Friedel <ihf@chromium.org>
Reviewed-by: Dan Erat <derat@chromium.org>
/external/autotest/client/common_lib/site_utils.py
8fbb4d188a7d5e3985467f65b371a8305da2436d 26-Jun-2015 J. Richard Barnette <jrbarnette@chromium.org> [autotest] Silence the stupid message in utils.is_in_container().

This changes site_utils.is_in_container() to change the arguments
passed to base_utils.run() so as not to log that it calls a shell
command. This is to prevent the message from showing up on every
'atest' invocation.

BUG=chromium:504984
TEST=`atest host list >/dev/null`, see no extra output

Change-Id: Iad9fb29cba327b6b564ecc9fd620cd190f6026c5
Reviewed-on: https://chromium-review.googlesource.com/282310
Tested-by: Richard Barnette <jrbarnette@google.com>
Reviewed-by: Prathmesh Prabhu <pprabhu@chromium.org>
Commit-Queue: Richard Barnette <jrbarnette@chromium.org>
/external/autotest/client/common_lib/site_utils.py
ff78f11ff85372a1e2f8ddf8eefbc8b772686148 12-Jun-2015 Dan Shi <dshi@chromium.org> [autotest] Pass current user into container for RPC usage

RPC is called using current OS user if not specified (frontend.py). This causes
an issue for autoserv running inside container, as the OS user is always root.
The root user may fail check_for_acl_violation_hosts if a host has special ACL
that does not allow `everyone`.

This CL add an SSP/user config in global config, lxc related code is updated so
that the OS user of autoserv running in host will be passed into the container
through shadow_config.ini. And frontend will use such user to make RPC.

BUG=chromium:480525,chromium:502897
TEST=local
sudo python site_utils/lxc_functional_test.py -v -s
attach to the container
update SSP/user with a user name (existing one should be root as the process
site_utils/lxc_functional_test.py is executed with sudo)
update frontend.py with code in this CL (this means only newer builds won't
be hit by this bug.)
run some RPC:
import common
from autotest_lib.server.cros.dynamic_suite import frontend_wrappers
_AFE = frontend_wrappers.RetryingAFE()
print _AFE.run('get_stable_version')

Also make sure afe in the host still works.

Change-Id: I9ba924e2652fadffa71d6298f74c5b82e8e26b4e
Reviewed-on: https://chromium-review.googlesource.com/281062
Trybot-Ready: Dan Shi <dshi@chromium.org>
Tested-by: Dan Shi <dshi@chromium.org>
Reviewed-by: Simran Basi <sbasi@chromium.org>
Commit-Queue: Dan Shi <dshi@chromium.org>
/external/autotest/client/common_lib/site_utils.py
ca3be48da9dd7882ba282d9e82413b4aad2a8364 06-May-2015 Dan Shi <dshi@chromium.org> [autotest] Add sudo -n option to avoid password prompt.

Also add a utility function to check if password is needed to run sudo command.

We can add -n option to all sudo command that SSP used. However, once the
property drone.support_ssp is set to False, no SSP code will be executed.
Therefore, there is no need to add -n everywhere.

BUG=chromium:484396
TEST=local run
Start scheduler, confirm no password promt, and drone.support_ssp is False.
Run sudo true, enter password.
Run scheduler again, confirm no password promt, and drone.support_ssp is True.

Change-Id: Ifbd302973db5d443499311e435ec99e32d24cb5b
Reviewed-on: https://chromium-review.googlesource.com/269740
Tested-by: Dan Shi <dshi@chromium.org>
Reviewed-by: Simran Basi <sbasi@chromium.org>
Tested-by: Richard Barnette <jrbarnette@chromium.org>
Reviewed-by: Richard Barnette <jrbarnette@chromium.org>
Commit-Queue: Dan Shi <dshi@chromium.org>
/external/autotest/client/common_lib/site_utils.py
17224dafbd49270ef5228595c489ee33a93680f2 19-May-2015 mukesh agrawal <quiche@chromium.org> autotest: add host_is_in_afe(), and have wifi code use it

Several parts of our WiFi test code attempt to contact the
autotest front-end, in order to fetch meta-data about DUTs.
These bits of code are guarded by calls to host_is_in_afe(),
to prevent us from wasting time for DUTs which are outside
the lab.

This was great, until the definition of "outside the lab"
became a bit fuzzier. In particular, there are some machines
which are in the lab zone (in DNS), but not managed by AFE
(autotest front-end).

For machines that are in the lab zone, but not managed by AFE,
calls to host_is_in_lab_zone() will return True. So we'll
waste time asking AFE about DUTs which AFE does not manage.

In the normal case, that's not a huge deal. But, when AFE is
down, things get really painful.

By adding host_is_in_afe(), and updating WiFi test code to use
it, we improve this situation. Namely, tests against DUTs in
developer cells won't be blocked due to AFE problems.

BUG=chromium:484442
TEST=test_that chromeos1-dev-host6.cros network_WiFi_RateControl
TEST=test_that chromeos1-row3-rack11-host1.cros network_WiFi_RateControl
TEST=test_that chromeos2-row6-rack4-host4.cros network_WiFi_RateControl
TEST=test_that chromeos1-dev-host6.cros network_WiFi_RateControl (AFE firewalled)
TEST=test_that chromeos1-row3-rack11-host1.cros network_WiFi_RateControl (AFE firewalled)

Observed test results:
- chromeos1-dev-host6: "Unable to determine if DUT has conducted..."
- chromeos1-row3-rack11-host1: TEST_NA
- chromeos2-row6-rack4-host4: PASS
- chromeos1-dev-host6 (AFE firewalled): "Unable to determine..."
- chromeos1-row3-rack11-host1 (AFE FW): "Unhandled URLError... Connection timed out"

Firewall setup:
- iptables -A INPUT --proto tcp --source 172.18.72.86 -j DROP

Change-Id: Id01f964ffe03f283e8b18743f677fa5fe7280e7a
Reviewed-on: https://chromium-review.googlesource.com/271856
Reviewed-by: mukesh agrawal <quiche@chromium.org>
Tested-by: mukesh agrawal <quiche@chromium.org>
Commit-Queue: mukesh agrawal <quiche@chromium.org>
/external/autotest/client/common_lib/site_utils.py
8f8cdb425db94473f50579e2123f61831fac7322 12-May-2015 MK Ryu <mkryu@google.com> [autotest] Getting mixed HQEs and special tasks fail on shard AFE

BUG=chromium:486926
TEST=Prepare shard testing cluster. Run a dummy suite on a DUT
that is sharded, and check if I can get mixed HQEs and special tasks
on the shard AFE.

Change-Id: I66449e07d6f5ae4c5e39ee87d4608b8eae9777f3
Reviewed-on: https://chromium-review.googlesource.com/270342
Reviewed-by: Dan Shi <dshi@chromium.org>
Tested-by: Mungyung Ryu <mkryu@google.com>
Commit-Queue: Mungyung Ryu <mkryu@google.com>
/external/autotest/client/common_lib/site_utils.py
7836d25b375a791ebc7b3d0d255c8732c4f35be2 28-Apr-2015 Dan Shi <dshi@chromium.org> [autotest] Add a generic config deployment module to handle configs for container.

For container to run a test, it needs some config files to be able to do
something like:
resolve hostname with dns configured in host.
ssh to dut.
ssh to devserver.

Currently we hard code to copy each file to container, and modify each file for
it to work within container.
This CL provides a generic way to manage a list of deploy config, each config
specifies what file needs to be copied to where and if the existing file should
be overwritten. For container to work in developer's workstation, the special
handling of some configure files is still available. For lab servers, puppet
should be used to push out the config files and shadow deploy config (
ssp_deploy_shadow_config).

BUG=chromium:481706
TEST=local test with and without shadow ssp deploy config
sudo python site_utils/lxc_functional_test.py -v -d chromeos1-dshi1.cros -r 172.17.40.27
also verify in moblab (python package install does not work in moblab yet due
to bug 483371)

Change-Id: I8bbe33a83262b7c746fbe0112cf61cea046931ea
Reviewed-on: https://chromium-review.googlesource.com/267569
Trybot-Ready: Dan Shi <dshi@chromium.org>
Tested-by: Dan Shi <dshi@chromium.org>
Reviewed-by: Simran Basi <sbasi@chromium.org>
Commit-Queue: Dan Shi <dshi@chromium.org>
/external/autotest/client/common_lib/site_utils.py
549fb82f8dd7ad8031fa451cb19bb1f56355f08c 25-Mar-2015 Dan Shi <dshi@chromium.org> [autotest] Add code in verify and cleanup to remove cros-version label if it doesn't match

Make sure the dut's cros-version label matches the actual version stored in
lsb-release under attribute CHROMEOS_RELEASE_VERSION.

It's added to both cleanup and verify because:
1. If a test failed by dut issue or autoserv crash, cleanup will be queued.
the lab gets a chance to verify the cros-version label before the dut being
assigned to another test.
2. verify is called before each test, so confirming the cros-version label
there is necessary.

The check takes only one ssh call to the dut. Making a duplicated check (reset
calls both cleanup and verify) should not lead too much overhead.

BUG=chromium:469895
TEST=unittest, run local test
1. Add a cros-version label that matches lsb-release, run dummy test, confirm
the label is preserved.
2. Add a cros-version label doesn't match lsb-release, run dummy test, confirm
the label is removed by verify task, and verify job failed.

Change-Id: Ia4760967118f2aacfe5c7f378bb482df7995cef3
Reviewed-on: https://chromium-review.googlesource.com/262390
Trybot-Ready: Dan Shi <dshi@chromium.org>
Tested-by: Dan Shi <dshi@chromium.org>
Reviewed-by: Fang Deng <fdeng@chromium.org>
Commit-Queue: Dan Shi <dshi@chromium.org>
Reviewed-by: Chris Sosa <sosa@chromium.org>
/external/autotest/client/common_lib/site_utils.py
767dced065c8918b5ff74c1347371a0f0f8d9c69 01-Feb-2015 Dan Shi <dshi@chromium.org> [autotest] Add a utility module to interact with LXC binaries.

Add a module (lxc.py) to interact with LXC binaries.

lxc_functional_test.py is a test script to test the module. It will
1. Set up base container in a tmp directory.
2. Create a test container from the base container.
3. Test site-packages and results directory can be mounted and shared between
host and test container.
4. Run autoserv in test mode.

Also add a utility function in client/common_lib/site_utils.py to get the value
of the given argument for the function. It's used in decorator to check function
parameters.

BUG=chromium:453621
CQ-DEPEND=CL:251140

TEST=unittest,
sudo python site_utils/lxc_functional_test.py
sudo python site_utils/lxc.py -s -p /tmp/container_123
sudo python site_utils/lxc.py -s -p /tmp/container_123 -f
sudo python site_utils/lxc.py -p /tmp/container_123 -f

Change-Id: Id7b259c4bc03977974af44d6d88420b220706589
Reviewed-on: https://chromium-review.googlesource.com/247271
Reviewed-by: Dan Shi <dshi@chromium.org>
Commit-Queue: Dan Shi <dshi@chromium.org>
Trybot-Ready: Dan Shi <dshi@chromium.org>
Tested-by: Dan Shi <dshi@chromium.org>
/external/autotest/client/common_lib/site_utils.py
60cf6a9294dc53a9fe11dc9b28eaaea1ee69ca92 30-Jan-2015 Dan Shi <dshi@chromium.org> [autotest] Add a moblab_config to override config value in global config when running in moblab.

The config value set in moblab_config.ini will override values in global
config only when running in moblab. Shadow config values can override
what's set in moblab config.

The config file can be used to disable particular function of autotest that
can be used in test lab but not moblab.

Also fix a bug in server management.

BUG=chromium:377210
TEST=unittest, local autoest setup to confirm shadow config not affected.
DEPLOY=apache

Change-Id: If199ba34f0047776ca8915a445b0d4fe5716e716
Reviewed-on: https://chromium-review.googlesource.com/244170
Tested-by: Dan Shi <dshi@chromium.org>
Reviewed-by: Simran Basi <sbasi@chromium.org>
Commit-Queue: Dan Shi <dshi@chromium.org>
/external/autotest/client/common_lib/site_utils.py
f77198b6b71c701b719bf28fc122c56116bc3a98 18-Nov-2014 David James <davidjames@google.com> Abort child process groups with SIGKILL.

Currently we unnecessarily sleep for 12 seconds every time we kill a process.
Here's how it works:
- Send SIGCONT to all processes.
- If any are still running, wait 6 seconds.
- Send SIGTERM to all processes.
- If any are still running, wait 6 seconds.
- Send SIGKILL to all processes.

There are several problems with the above algorithm:
- SIGCONT doesn't cause processes to exit, so waiting 6 seconds after
that is pointless.
- After sending SIGTERM, we check for whether any of the processes are
present immediately. This doesn't give children enough time to
actually clean up.
- We sleep for 6 seconds unconditionally without considering the fact
that the processes might exit early.

Instead of doing this, I've just updating it to send SIGKILL to the
entire process group and not have any sleep statements.

BUG=chromium:432191
DEPLOY=scheduler
TEST=Set up local scheduler, verified timeouts still work.

Change-Id: Ie41d10d0605851df61dd07789d0d4afffd9eef01
Reviewed-on: https://chromium-review.googlesource.com/230323
Reviewed-by: Mike Frysinger <vapier@chromium.org>
Reviewed-by: Prashanth B <beeps@chromium.org>
Commit-Queue: David James <davidjames@chromium.org>
Tested-by: David James <davidjames@chromium.org>
/external/autotest/client/common_lib/site_utils.py
6edaaf9f5d10cda21d1c7f2401eb1d0bef2192fa 25-Nov-2014 Prashanth Balasubramanian <beeps@google.com> [autotest] Disallow frontend jobs on hosts given to shards.

TEST=Ran jobs and checked exceptions.
Ran jobs on non-shard hosts.
BUG=chromium:431789
DEPLOY=apache
Change-Id: Ide385ed1db135a7e98ab0385df1f9a64d97bd631
Reviewed-on: https://chromium-review.googlesource.com/231735
Tested-by: Prashanth B <beeps@chromium.org>
Reviewed-by: Dan Shi <dshi@chromium.org>
Reviewed-by: Fang Deng <fdeng@chromium.org>
Commit-Queue: Prashanth B <beeps@chromium.org>
/external/autotest/client/common_lib/site_utils.py
8753d83937751e6d2eb2646ea5af68979bb76312 08-Oct-2014 Ilja H. Friedel <ihf@chromium.org> autotest: refactor graphics_utils.

Move screenshot code to graphics_utils.
Move xsystem et al to cros_ui.py.
Fail if X is used under freon.
Make pylint happy.

TODO: write a (unit/auto)test for graphics_utils.

BUG=chromium:422414
TEST=Ran graphics_GLMark2 power_Consumption power_Backlight ui_SystemTray
on nyan_big, verified that code got exercised and is not broken.
Ran camera_V4L2 desktopui_GmailLatency graphics_GLAPICheck graphics_Gbm
graphics_Piglit graphics_SanAngeles hardware_VideoOutSemiAuto on
link_freon and nyan_big and made sure we got reasonable pass/fail.

Change-Id: I31f49d8c7b7a4e899bf47ba0b3543fc8755eecb8
Reviewed-on: https://chromium-review.googlesource.com/222990
Reviewed-by: Haixia Shi <hshi@chromium.org>
Commit-Queue: Ilja Friedel <ihf@chromium.org>
Tested-by: Ilja Friedel <ihf@chromium.org>
/external/autotest/client/common_lib/site_utils.py
dd129979e8227c960f4c7a3d2a1665007f8a424e 11-Sep-2014 Simran Basi <sbasi@chromium.org> gs_offloader: Add Moblab support to gs_offloader.

Updates the gs_offloader to offload to a subdirectory of the
image_storage_server for Moblab devices. This subdirectory is
determined by the MAC address of the Moblab device and a UUID
stored on the stateful partition.

BUG=chromium:413383
TEST=Manually ran on Moblab, unittests. Ran locally to ensure
non-moblab usecase still works as expected.

Change-Id: Id4dc2a8b03eb6b174cb157e4d72f183dfaa39733
Reviewed-on: https://chromium-review.googlesource.com/217822
Reviewed-by: Simran Basi <sbasi@chromium.org>
Commit-Queue: Simran Basi <sbasi@chromium.org>
Tested-by: Simran Basi <sbasi@chromium.org>
/external/autotest/client/common_lib/site_utils.py
cbdd198200ab7ffa27b14fe5bcff450f52bc43b6 03-Sep-2014 Hung-ying Tyan <tyanh@chromium.org> Move dns_zone from CROS section to CLIENT in the global_config.ini

to make host_is_in_lab_zone() of client/common_lib/site_utils.py work.
For details, refer to the bug.

BUG=chromium:408458
TEST=manually print out fqdn in host_is_in_lab_zone(), run the
display_ClientChameleonConnection test and observe that the
retrieved dns_zone value is correct.

Change-Id: I7caa6a5e06af59bde8373ef3d10339bed3c6e85a
Reviewed-on: https://chromium-review.googlesource.com/216091
Tested-by: Hung-ying Tyan <tyanh@chromium.org>
Reviewed-by: Dan Shi <dshi@chromium.org>
Commit-Queue: Hung-ying Tyan <tyanh@chromium.org>
/external/autotest/client/common_lib/site_utils.py
f6c65bd150f50771145545b58b89b88ca97bb250 30-Aug-2014 Dan Shi <dshi@chromium.org> [autotest] Add a --production argument to stop scheduler from starting with database set to remote server

This is the first CL to add the option. Once this CL is merged and pushed to
prod. A second CL will update the upstart job in puppet to use the option.
Once puppet change is populated to prod, a third CL will remove the override
of production argument and make it effective in prod.

BUG=chromium:409091
TEST=local setup, change host in AUTOTEST_WEB to various settings and verify
the option works.
DEPLOY=scheduler,host-scheduler

Change-Id: I0b3b961db3ae7a95b887f5ae32b73c3a33b6e82c
Reviewed-on: https://chromium-review.googlesource.com/215672
Tested-by: Dan Shi <dshi@chromium.org>
Reviewed-by: Prashanth B <beeps@chromium.org>
Commit-Queue: Dan Shi <dshi@chromium.org>
/external/autotest/client/common_lib/site_utils.py
45745d81cc3c2c403092d1c320356fb47f660365 27-Aug-2014 Mussa <mussa@chromium.org> Add verification to ui_SystemTray tests.

Initially, we had the 'test' only collect screenshots of the
system tray with the intent to watch how the tray varies and
assess the general viability of image comparison based tests
in this area.

After watching the screenshots for a number of builds, it makes
sense to start with just the language indicator portion of the
tray.

This change collects this particular portion of the system tray,
pulls down a golden version of it and runs the comparison.

Comparisons are done locally first with a simple pixel by pixel
array walk. Failures are uploaded to bp for later viewing.

BUG=chromium:374981
TEST=Ran tests against a local link.
TEST=Ran video glitch detection tests also.

Change-Id: Ic5316d4d17a125b878c3c22b86568c554cf41186
Reviewed-on: https://chromium-review.googlesource.com/214380
Reviewed-by: Tracy Turchetto <tturchetto@chromium.org>
Tested-by: Mussa Kiroga <mussa@chromium.org>
Commit-Queue: Mussa Kiroga <mussa@chromium.org>
/external/autotest/client/common_lib/site_utils.py
56b94dfee71960e880a6fb0e331d07511e24f018 14-Aug-2014 Mussa <mussa@chromium.org> Remove colorspace RGB flag from screen capture command.

This flag was intended to ensure that we always end up with RGB images.

However, it had unintended consequences because the test images had a
somewhat different profile that their golden counterparts.

We individually investigate cases where we don't end up with
RGB images.

BUG=chromium:393684
TEST=Ran local test.

Change-Id: Ifba6d0ae8d43a891042b7325eccefa43e3439280
Reviewed-on: https://chromium-review.googlesource.com/212345
Reviewed-by: Rohit Makasana <rohitbm@chromium.org>
Commit-Queue: Mussa Kiroga <mussa@chromium.org>
Tested-by: Mussa Kiroga <mussa@chromium.org>
/external/autotest/client/common_lib/site_utils.py
40adf8893728144e89da20ebac1b351e836cd9e1 13-Aug-2014 Mussa <mussa@chromium.org> Crop images to desired dimensions before comparison.

Images contain a text label showing the time at which the video was sampled.
This was left to assist later analysis. However, it takes a dependency on
text rendering that changes and breaks the tests.

We are cropping the images to exclude this label when doing a local RGB
comparison. If the comparison is successful then we return, if it is not
then we upload to bp as before.

** Together with this change, force images collected to be RGB.

BUG=chromium:393684
TEST=Ran local test. Should get more coverage from lab.

Change-Id: Ia95679066fc44a3970ff014cee1c113b032a1145
Reviewed-on: https://chromium-review.googlesource.com/212190
Reviewed-by: Rohit Makasana <rohitbm@chromium.org>
Commit-Queue: Mussa Kiroga <mussa@chromium.org>
Tested-by: Mussa Kiroga <mussa@chromium.org>
/external/autotest/client/common_lib/site_utils.py
cf731e31a5a63f1d795286330afb87038093f795 11-Aug-2014 Prashanth B <beeps@google.com> [autotest] Scheduler, drone_manager, drone_utility stats.

Adds some useful stats to drone manager, handle agents and
drone utility. These stats should help us track processes,
figure out where the drone_manager latency is coming from
and draw correlations between the number of agents scheduled
and drone refresh time.

This cl also moves site_drone_utility's kill_process method
into drone_utility, and modifies the nuke_pids function to only
wait on and kill processes that haven't already died.

TEST=Ran suites.
BUG=chromium:400486
DEPLOY=scheduler

Change-Id: I56e6ee05fa2ae1935435dbc2055d7f99a9a89e5e
Reviewed-on: https://chromium-review.googlesource.com/211769
Reviewed-by: Prashanth B <beeps@chromium.org>
Commit-Queue: Prashanth B <beeps@chromium.org>
Tested-by: Prashanth B <beeps@chromium.org>
/external/autotest/client/common_lib/site_utils.py
3eeab769e44fd18139235b8b2d354296748405d4 24-Jul-2014 Mussa <mussa@chromium.org> Add utility function to find DUT's resolution.

We have two nyan_big devices one with standard definition
and one with high definition.

The only way to distinguish them is by querying for their resolution.

BUG=chromium:393678
TEST=Called the function on a nyan_big, got the right resolution.

Change-Id: I63c3d34c90aee459a252ea5b709e117726be9a26
Reviewed-on: https://chromium-review.googlesource.com/209706
Reviewed-by: Dan Shi <dshi@chromium.org>
Reviewed-by: Rohit Makasana <rohitbm@chromium.org>
Tested-by: Mussa Kiroga <mussa@chromium.org>
/external/autotest/client/common_lib/site_utils.py
1d8803b92bb74d3c9cf6eb17fa3ee8eee112357e 19-Jun-2014 Dan Shi <dshi@chromium.org> [autotest] Take a screenshot when a test fails.

If X is not running, no screenshot will be taken.

BUG=chromium:383605
TEST=test_that 172.22.30.146 dummy_Fail
confirm screenshot is created, e.g.,
/tmp/test_that_results_rQiKvU/results-1-dummy_Fail/dummy_Fail.Fail/debug/dummy_Fail.Fail-fail-0.png

Change-Id: Ic044f611ab6f5d65d8ca973f9847346b3599891c
Reviewed-on: https://chromium-review.googlesource.com/204689
Commit-Queue: Dan Shi <dshi@chromium.org>
Tested-by: Dan Shi <dshi@chromium.org>
Reviewed-by: Dan Shi <dshi@chromium.org>
/external/autotest/client/common_lib/site_utils.py
9f6a0ae94b7e8739ced5931241fe9e482e142628 05-Jun-2014 mussa <mussa@google.com> Add method to get the chromeos release version.

BUG=chromium:374981
TEST=Used the api and appended result to a filename. Checked that filename
contained the expected build number.

Change-Id: I10446b6d050a14d59f77b1eb793a1fc0d9bc9ade
Reviewed-on: https://chromium-review.googlesource.com/202774
Reviewed-by: Alex Miller <milleral@chromium.org>
Reviewed-by: Rohit Makasana <rohitbm@chromium.org>
Commit-Queue: Rohit Makasana <rohitbm@chromium.org>
Tested-by: Rohit Makasana <rohitbm@chromium.org>
/external/autotest/client/common_lib/site_utils.py
fd5b805a7c4b2ede054a7b82f8be2d0ba8200baf 06-May-2014 mussa <mussa@google.com> Add file utilities to support screenshot capturing.

Adds a file_utils.py file which provides methods to create and remove file/dirs.
These are wrappers around python utilies, however, the create method for example,
will not fail if the file/directory already exists.

BUG=chromium:363815
TEST=Ran local tests that use file_utils.py. Need to run existing tests that use site_utils.py

Adds a method in site_utils.py to take a cropped screenshots. We are only cropping
by height, adjusting width to retain aspect ratio.
We don't need a crop by width method at this time and so we do not provide it with this change.

Change-Id: I9f0943dc518c7ad96044d0a314c4422bba0a087f
Reviewed-on: https://chromium-review.googlesource.com/198395
Reviewed-by: Kris Rambish <krisr@chromium.org>
Reviewed-by: Rohit Makasana <rohitbm@chromium.org>
Commit-Queue: Rohit Makasana <rohitbm@chromium.org>
Tested-by: Rohit Makasana <rohitbm@chromium.org>
/external/autotest/client/common_lib/site_utils.py
85f4c36b14448d8fd707b34107c7688f13f258f2 08-Apr-2014 Simran Basi <sbasi@chromium.org> Moblab: Display 'moblab' user as default in AFE.

Currently there are 2 separate users for Moblab: 'default_user' for
kicking off jobs from the AFE and 'moblab' for kicking off jobs from
the run_suite command.

This change defaults the AFE to use 'moblab'. And allows jobs to be
aborted from the AFE.

BUG=chromium:358579
TEST=Moblab AFE defaults to 'moblab' user and is able to abort jobs
created by run_suite. Also verified get_current_board() still works
on a moblab.

Change-Id: Ic9a0a7bfc745a670796863629d070056e1dfd69f
Reviewed-on: https://chromium-review.googlesource.com/193657
Reviewed-by: Prashanth B <beeps@chromium.org>
Tested-by: Simran Basi <sbasi@chromium.org>
Commit-Queue: Simran Basi <sbasi@chromium.org>
/external/autotest/client/common_lib/site_utils.py
bff9f9d0c4bf77f09a41262061d1a9310d94db2f 06-Dec-2013 beeps <beeps@chromium.org> [autotest] Adds chromecast deps, server, client test for sonic.

Adds an autotest dependency that installs the freshest
version of the chromecast extension as an autotest dep.

Also adds a server and client test for sonic that installs the
extension and performs a tab cast, and starts the youtube/netflix apps.
The tests will only work when the DUT and the sonic device are on
the same subnet.

TEST=emerge-lumpy autotest-deps, ran a test that uses it.
Ran the tests, visually verified results.
BUG=chromium:321177, chromium:321179, chromium:292640

Change-Id: I48a6149a11d3bb8167a1c766873e672b3523d769
Reviewed-on: https://chromium-review.googlesource.com/179407
Commit-Queue: Prashanth B <beeps@chromium.org>
Tested-by: Prashanth B <beeps@chromium.org>
Reviewed-by: Dan Shi <dshi@chromium.org>
/external/autotest/client/common_lib/site_utils.py
40b7d0d8a5da83d695903bd49c8deaa4572d309f 18-Jan-2014 Luis Lozano <llozano@chromium.org> Add current chrome version to generated AFDO perf data

Add the chrome version of the name of the generated AFDO perf.data
file. Had to add necessary support in cros_host class and in the
process commonized some code with site_sysinfo.py

BUG=None
TEST=Tested through test_that.

Change-Id: I4d6537c78f21febadc566b7ea8b3238dc809e135
Reviewed-on: https://chromium-review.googlesource.com/183132
Reviewed-by: Luis Lozano <llozano@chromium.org>
Commit-Queue: Luis Lozano <llozano@chromium.org>
Tested-by: Luis Lozano <llozano@chromium.org>
/external/autotest/client/common_lib/site_utils.py
3cbd76b06c383d8bc3e4ba959659a0bd04180761 27-Nov-2013 J. Richard Barnette <jrbarnette@chromium.org> Move certain content from client/ to server/site_utils.py

This moves the lab status functions and ParseBuildName(). They
were out of place in client/common_lib, as they're only needed/
meaningful in server side code.

BUG=None
TEST=run driver_unittest.py

Change-Id: I756291f27d7b041f0a907dee4004c3b447def929
Reviewed-on: https://chromium-review.googlesource.com/178306
Reviewed-by: Richard Barnette <jrbarnette@chromium.org>
Commit-Queue: Richard Barnette <jrbarnette@chromium.org>
Tested-by: Richard Barnette <jrbarnette@chromium.org>
/external/autotest/client/common_lib/site_utils.py
6c00dde741fb42fed2d8bb25c30990557b288097 30-Jul-2013 Dan Shi <dshi@chromium.org> [autotest] re-throw exceptions properly in urlopen_socket_timeout

urlopen_socket_timeout call handles all urllib2.URLError but only re-throw
timeout exception. Change the code to re-throw other type of exception so caller
can have a better idea of what went wrong.

BUG=none
TEST=tested with local devserver

Change-Id: I8c60f75c1fc2b8bff11a710735ce4ff8800ec15f
Reviewed-on: https://gerrit.chromium.org/gerrit/63679
Commit-Queue: Dan Shi <dshi@chromium.org>
Reviewed-by: Dan Shi <dshi@chromium.org>
Tested-by: Dan Shi <dshi@chromium.org>
/external/autotest/client/common_lib/site_utils.py
3197b39f82eb92afff33c7d44b805afe120c7627 26-Jun-2013 Fang Deng <fdeng@chromium.org> [autotest] Suite scheduler files bugs for exceptions raised in create_suite_job

This CL is to make suite scheduler file bugs using our bug filer for
several types of exceptions raised by create_suite_job. The exceptions are:
- ControlFileNotFound
- NoControlFileList
- ControlFileEmpty
- ControlFileMalformed

To enable bug filing, use '-b' option of suite_scheduler.py
Bug will be assgined to Lab sheriff.

This CL changes the private method _create_bug_report to public in
server/cros/dynamic_suite/reporting.py, so that we can file a general
bug that is not a test failure. After crbug.com/254256 is fixed,
the bug filing logic in deduping_scheduler.py should be modified.

This CL also moves ParseBuildName() from base_event.py to site_utils,
to avoid import loop. Callers of this methods are updated.

BUG=chromium:242569
TEST=deduping_scheduler_unittest.py;driver_unittest.py;base_event_unittest.py;
ran on chromeos-lab1.hot and confirm bug are properly filed.
DEPLOY=suite_scheduler

Change-Id: Ia57a2e625b7b39dcfe51892c208613c927f3a54e
Reviewed-on: https://gerrit.chromium.org/gerrit/60158
Commit-Queue: Fang Deng <fdeng@chromium.org>
Reviewed-by: Fang Deng <fdeng@chromium.org>
Tested-by: Fang Deng <fdeng@chromium.org>
/external/autotest/client/common_lib/site_utils.py
dadc2c21c0b0b904067ea6400e179a187c0247d4 09-Jul-2013 Alex Miller <milleral@chromium.org> [autotest] Move get_sheriffs() from common_lib's to server's utils.

This function pulls from a section other than client, which means that
it can never be run on a DUT, and thus has no point in being in
common_lib, which is meant for code that can be shared between client
and server, although those lines are a bit blurred at the moment.

TEST=unit?
BUG=None

Change-Id: Id92e1b344ff590c01d185bcd70ca67d7dba77938
Reviewed-on: https://gerrit.chromium.org/gerrit/61323
Reviewed-by: Prashanth Balasubramanian <beeps@chromium.org>
Reviewed-by: Alex Miller <milleral@chromium.org>
Tested-by: Alex Miller <milleral@chromium.org>
Commit-Queue: Alex Miller <milleral@chromium.org>
/external/autotest/client/common_lib/site_utils.py
60aec2423a2c2a14c46dc21757a6fd748931f428 26-Jun-2013 beeps <beeps@chromium.org> [autotest] Divorce the devserver retry requests and sigalarm.

All dev_server requests made from the client go through a retry
wrapper that uses sigalarm to expedite unresponsive calls. Since
we cannot register our signal handlers with mod wsgi, this cl
modifies the urlopen call to manage an internal socket timeout
instead. In order to continue retrying on other URLErrors, the
urlopen wrapper in site_utils converts socket timeouts to
TimeoutExceptions.

TEST=
1. Added a bad devserver, tried to run_suite on a build that hashed
to said devserver with and without this change and verified that
it only worked in the latter case.
2. Sigalarm still fires when devserver's resolve is called outside wsgi,
and urlopen has a larger timeout.
3. Non TimeoutException URLErrors retry.
4. dev_server_unittest pass.
BUG=chromium:246209

Change-Id: Iec9ef39982f4c8b92e260cf27bf454e624bccfa9
Reviewed-on: https://gerrit.chromium.org/gerrit/58659
Tested-by: Prashanth Balasubramanian <beeps@chromium.org>
Reviewed-by: Alex Miller <milleral@chromium.org>
Commit-Queue: Prashanth Balasubramanian <beeps@chromium.org>
/external/autotest/client/common_lib/site_utils.py
c4fb1472ee2f8c76c7a561739a6fbfb85095bffa 09-May-2013 beeps <beeps@chromium.org> [autotest] Adds chrome version strings to autofiled bugs.

The reporting module now queries client job keyvals for
the chrome version string and includes it in the summary
of every autofiled bug.This change also fortifies the
reporting module against xml parser syntax errors,
fixes unittest, modifies the default link we use to
point to the buildbot stages, and embeds links to bugs
filed in the buildbot report.

TEST=Ran a suite and tried different permutations of
aborted tests to make sure we don't crash. Filed
bugs and checked the format of the version string.
Ran unittests. Ran run_suite and checked the STEP
LINKS in the report.
BUG=None

Change-Id: I9e418d543942b71afafc0c1a8084a02684f0cacf
Reviewed-on: https://gerrit.chromium.org/gerrit/50579
Reviewed-by: Prashanth Balasubramanian <beeps@chromium.org>
Tested-by: Prashanth Balasubramanian <beeps@chromium.org>
Commit-Queue: Prashanth Balasubramanian <beeps@chromium.org>
/external/autotest/client/common_lib/site_utils.py
fda8f41e6d022ed19aa4bdfd4dab993f8f39dd57 03-May-2013 beeps <beeps@chromium.org> [autotest] Cc sheriffs for bvt bugs.

Get a list of all the chromium.org email addresses of the
sheriffs of that day and cc them on the bug filed, if the
failure is a part of the bvt suite.

TEST=Checked that we retrieve the sheriff list accurately,
Checked that the cc list contains a consolidated list
of ldaps that include those specified in the template.
Filed bugs with a fake/malformed cc list.
BUG=None

Change-Id: I5fba5291ba7f0c2038b5e421cfaf53238a1971c0
Reviewed-on: https://gerrit.chromium.org/gerrit/50018
Tested-by: Prashanth Balasubramanian <beeps@chromium.org>
Reviewed-by: Scott Zawalski <scottz@chromium.org>
Commit-Queue: Prashanth Balasubramanian <beeps@chromium.org>
Reviewed-by: Prashanth Balasubramanian <beeps@chromium.org>
/external/autotest/client/common_lib/site_utils.py
6272320792885b0d1b545ab86fd6da12ac56c4a6 23-Jan-2013 Simran Basi <sbasi@chromium.org> Autotest: get_process_name undefined in site_utils

Nuke_pids was forked from nuke_pid in base_utils. get_process_name
exists inside of base_utils, so running it from that module
rather than just call the method name.

BUG=chromium-os:37976
TEST=ran pyflakes

Change-Id: I28e68dfdc790a8ebebe07182c7e53402a3cf3ac2
Reviewed-on: https://gerrit.chromium.org/gerrit/41781
Reviewed-by: Aviv Keshet <akeshet@chromium.org>
Reviewed-by: Alex Miller <milleral@chromium.org>
Commit-Queue: Simran Basi <sbasi@chromium.org>
Reviewed-by: Simran Basi <sbasi@chromium.org>
Tested-by: Simran Basi <sbasi@chromium.org>
/external/autotest/client/common_lib/site_utils.py
41bfae4ba63e7010e882d3de9fd8eea0612a4f8a 09-Jan-2013 Simran Basi <sbasi@chromium.org> Autotest: Use Lab Status to Disable Certain Boards

Now that we have the Lab Status Page up, we would like to make more
use of it by allowing it to be able to disable running new suites
on certain boards.

This becomes useful should a bug starts bringing down DUT's for a
specific subset of boards.

Now the status message should follow the format of:
Lab is 'status' [boards_disabled] (comment)

For example:
Lab is Open [stumpy, kiev, x86-alex] (power_resume bug bringing down
DUT's)

BUG=chromium-os:37346
TEST=local setup

Change-Id: Ib2e4960f8cac427db1606f56477305d82bc110d4
Reviewed-on: https://gerrit.chromium.org/gerrit/40940
Reviewed-by: Scott Zawalski <scottz@chromium.org>
Reviewed-by: Simran Basi <sbasi@chromium.org>
Tested-by: Simran Basi <sbasi@chromium.org>
Commit-Queue: Brian Harring <ferringb@chromium.org>
/external/autotest/client/common_lib/site_utils.py
22aa9fe678bec0e6a1451922f96b6973ea3586f1 08-Dec-2012 Simran Basi <sbasi@chromium.org> Autotest: Be able to grab the lab status and add it to run_suites

Now that the lab status page is up, we need to be able check when the
lab is not up and in that case stop run_suite from being able to schedule
jobs.

BUG=chromium-os:37095
TEST=Changed the lab status page to lab is closed and ensure that run_suites
did not schedule the job if that occured.

Change-Id: I0e0f80e872c4b94f5d6148eb5634298ff7263cbc
Reviewed-on: https://gerrit.chromium.org/gerrit/39449
Reviewed-by: Simran Basi <sbasi@chromium.org>
Tested-by: Simran Basi <sbasi@chromium.org>
Commit-Queue: Simran Basi <sbasi@chromium.org>
/external/autotest/client/common_lib/site_utils.py
0ed760cbee4ce839988585003d445465bb0b95b9 06-Nov-2012 Gilad Arnold <garnold@chromium.org> autotest: end-to-end autoupdate test

This implements an autotest test for the Chrome OS autoupdate
functionality. It receives a single test configuration and performs an
end-to-end test of the update process specified by it, which includes:

* Initializing the DUT to a known start state (source version)

* Spawning a local Omaha/devserver instance.

* Triggering an update process.

* Tracking the progress of the update.

* Rebooting the DUT after the update.

* Ensuring that the update has succeeded (target version running).

BUG=chromium-os:33760,chromium-os:33761,chromium-os:33762
TEST=Running with run_remote_tests.sh works

Change-Id: I215e8214d3239f525f062a27a4d97806451c9736
Reviewed-on: https://gerrit.chromium.org/gerrit/37432
Commit-Ready: Gilad Arnold <garnold@chromium.org>
Reviewed-by: Gilad Arnold <garnold@chromium.org>
Tested-by: Gilad Arnold <garnold@chromium.org>
/external/autotest/client/common_lib/site_utils.py
af9b8e7a29a4de8e76581afb51986b8afd9a11c4 13-Oct-2012 Simran Basi <sbasi@chromium.org> Autotest: Parallelize Aborting so that Large Aborts are faster

Currently when we try to abort a large number of jobs, the process
is slow as for each PID we try to kill, we send the first signal,
wait 6 seconds, send the next signal and once its dead we go onto
the next PID.

In order to speed up this process now we queue up all the processes
we want to kill on a given tick, send them all the first kill signal,
wait 6 seconds, then send them all the next kill signal.

BUG=chromium-os:35246
TEST=Ran on my local machine/scheduler and tested that multiple aborts
indeed run faster and still kill the PID's as expected.

Change-Id: I3d9f0ffd97142aeadd99295934b83bc624a1278d
Reviewed-on: https://gerrit.chromium.org/gerrit/35453
Reviewed-by: Scott Zawalski <scottz@chromium.org>
Commit-Ready: Simran Basi <sbasi@chromium.org>
Reviewed-by: Simran Basi <sbasi@chromium.org>
Tested-by: Simran Basi <sbasi@chromium.org>
/external/autotest/client/common_lib/site_utils.py
87d7a218c115d8021b21b8c3e1faa4ac33830279 27-Sep-2012 Simran Basi <sbasi@chromium.org> Chrome on Chromeos Perf: Upload Results to Google Storage

Added a post-processing step to the pyauto_perf suite to upload the necessary
perf results back to the google storage directory we downloaded the build
artifacts from.

The perf results are placed in the form of pyauto_perf.results

BUG=chromium-os:33964
TEST=Tested on ToT using remote trybots.
CQ-DEPENDS: I2b993c7b561c2abae9ed2717515c9b394bcecfa5
Change-Id: I6af12674c3cfa031b6382e4cc3fe2f735743486a
Reviewed-on: https://gerrit.chromium.org/gerrit/34199
Commit-Ready: Simran Basi <sbasi@chromium.org>
Reviewed-by: Simran Basi <sbasi@chromium.org>
Tested-by: Simran Basi <sbasi@chromium.org>
/external/autotest/client/common_lib/site_utils.py
7c2be10d28832487c11678fe18e3f96926b7f7c9 28-Aug-2012 Fang Deng <fdeng@chromium.org> Automatically detect perf regression by checking against perf expectations.

Adopt the idea of how currently Chrome team is detecting perf regression
(http://www.chromium.org/developers/tree-sheriffs/perf-sheriffs).

expectation_checker.py:
1. load expectation files
2. provide util functions that take one/multiple perf value(s), compare them against the expectations, and return comparison results(regress/improve/accept).
perf_expectations.json
Expectations are specified in this file.

TEST=None
BUG=None

Change-Id: If1867b60151e9472b6fead0472de1b7b4892f710
Reviewed-on: https://gerrit.chromium.org/gerrit/31521
Commit-Ready: Fang Deng <fdeng@chromium.org>
Reviewed-by: Fang Deng <fdeng@chromium.org>
Tested-by: Fang Deng <fdeng@chromium.org>
/external/autotest/client/common_lib/site_utils.py
347a0b890caae8759b37ddea8e70c39b2a31dea2 30-Mar-2012 Scott Zawalski <scottz@google.com> Update site_wifitest to automatically discover cell hosts.

The wifitests currently rely on a configuration file to find out the
ip address of the router and the rspro. This CL updates this pathway
to check if the machine is running in the lab dns zone. If it is, the
lab host naming conventions are followed for both the router and the
rspro hosts that are required for this test to work.

TEST=Local autoserv instance showing that the correct names were used
when run on a lab machine and that the previous behavior is intake when running
on a non-lab machine.
BUG=chromium-os:28738

Change-Id: Ia2d0dbe24405ac2dd6181a6306fc32b950be1be4
Reviewed-on: https://gerrit.chromium.org/gerrit/19380
Reviewed-by: Scott Zawalski <scottz@chromium.org>
Tested-by: Scott Zawalski <scottz@chromium.org>
Commit-Ready: Scott Zawalski <scottz@chromium.org>
/external/autotest/client/common_lib/site_utils.py
ae84354d058d9713d28bcc541cdce7e415e680af 20-Mar-2012 Scott Zawalski <scottz@google.com> Fix site_utils reference to utils.

base_utils is the import we are using and where TEE_TO_LOGS exists.
s/utils/base_utils/.

Fix a bug where we reference hosts without ensuring that it is defined.
This happened when testing the above fix.

TEST=./autoserv -m scottz-mario2.cros -c ../client/site_tests/network_Ping/control
BUG=chromium-os:28079

Change-Id: Ic57b96783f143053bfcf7642d867d25734fb9975
Reviewed-on: https://gerrit.chromium.org/gerrit/18535
Reviewed-by: Chris Masone <cmasone@chromium.org>
Commit-Ready: Scott Zawalski <scottz@chromium.org>
Reviewed-by: Scott Zawalski <scottz@chromium.org>
Tested-by: Scott Zawalski <scottz@chromium.org>
/external/autotest/client/common_lib/site_utils.py
6a0680f64c2d8adb609a890f1d80a89185ba4669 02-Mar-2012 Chris Masone <cmasone@chromium.org> [autotest] Add platform_CloseOpenSimple

Existing servo tests are very much intended to be run at a developer's desk.
This CL takes a first cut at a test intended to be run with servo in the lab.
We eschew the ServoTest class, as it seems to be mostly designed to allow
command line args that come in via run_remote_tests.sh

We will handle the at-a-desk case later.

BUG=chromium-os:26666
TEST=This is a new test; run it.

Change-Id: Ib6438b375fcef4f8798349fa16c1da50756457a5
Reviewed-on: https://gerrit.chromium.org/gerrit/17975
Commit-Ready: Chris Masone <cmasone@chromium.org>
Reviewed-by: Chris Masone <cmasone@chromium.org>
Tested-by: Chris Masone <cmasone@chromium.org>
/external/autotest/client/common_lib/site_utils.py