chromiumos/third_party/autotest.git
2 hours ago[autotest] remove dependencies on /home/chronos/user 50/56050/8 master prod
Elly Fong-Jones [Tue, 21 May 2013 16:09:23 +0000 (12:09 -0400)]
[autotest] remove dependencies on /home/chronos/user

BUG=chromium:212419
TEST=suite_Smoke

Change-Id: I8849e3eb6e76a3a3358422f1c2269a926d35994f
Signed-off-by: Elly Fong-Jones <ellyjones@chromium.org>
Reviewed-on: https://gerrit.chromium.org/gerrit/56050
Reviewed-by: Will Drewry <wad@chromium.org>
3 hours agoDisable medialink in config file 46/56346/2
Viral Modi [Thu, 23 May 2013 01:30:53 +0000 (18:30 -0700)]
Disable medialink in config file

BUG=chromium:243069
TEST=None

Change-Id: Ib016d947437c2778e01a2cf167e957269e71c2ab
Reviewed-on: https://gerrit.chromium.org/gerrit/56346
Reviewed-by: Kris Rambish <krisr@chromium.org>
Commit-Queue: Viral Modi <viralmodi@chromium.org>
Tested-by: Viral Modi <viralmodi@chromium.org>
3 hours agocellular: Use cell_tools.AutoConnectContext in network_3GSafetyDance 47/56347/2
Arman Uguray [Thu, 23 May 2013 01:46:55 +0000 (18:46 -0700)]
cellular: Use cell_tools.AutoConnectContext in network_3GSafetyDance

Updated network_3GSafetyDance.py to use cell_tools.AutoConnectContext to
disable auto-connect, instead of disabling and restoring auto-connect
state manually.

BUG=chromium:242648
TEST=network_3GSafetyDance/control.pseudomodem should pass.

Change-Id: I9282239444279a8def4286b3b2519b4e579b4962
Reviewed-on: https://gerrit.chromium.org/gerrit/56347
Reviewed-by: Thieu Le <thieule@chromium.org>
Commit-Queue: Arman Uguray <armansito@chromium.org>
Tested-by: Arman Uguray <armansito@chromium.org>
8 hours agoRemove webrtc emailing from dash_config. 87/56387/2
Scott Zawalski [Thu, 23 May 2013 12:45:26 +0000 (08:45 -0400)]
Remove webrtc emailing from dash_config.

BUG=None
TEST=None

Change-Id: Ie835299dbed55d594af0747ba26d27c9905d85ce
Reviewed-on: https://gerrit.chromium.org/gerrit/56387
Tested-by: Scott Zawalski <scottz@chromium.org>
Reviewed-by: Henrik Kjellander <kjellander@chromium.org>
Commit-Queue: Scott Zawalski <scottz@chromium.org>
Reviewed-by: Scott Zawalski <scottz@chromium.org>
20 hours agoFAFT: Capture the CPU and EC UART output 63/55763/4
Tom Wai-Hong Tam [Mon, 20 May 2013 15:08:10 +0000 (23:08 +0800)]
FAFT: Capture the CPU and EC UART output

For the debug purpose, FAFT by default enables the CPU and EC UART capturing
functions and records their UART output to the files in the results directory.

The CPU UART output comes to results/cpu_uart.txt.
The EC UART output comes to results/ec_uart.txt.

BUG=chrome-os-partner:19288
TEST=Manaul
Run the FAFT BIOS suites, check the tests without broken due to this CL.
In the results directory of each test, see cpu_uart.txt and ec_uart.txt.

Change-Id: I080c1aa6d22e2b00099502c2b5a91236c8a9f622
Reviewed-on: https://gerrit.chromium.org/gerrit/55763
Reviewed-by: Yusuf Mohsinally <mohsinally@chromium.org>
Commit-Queue: Tom Wai-Hong Tam <waihong@chromium.org>
Tested-by: Tom Wai-Hong Tam <waihong@chromium.org>
20 hours ago[autotest] pull _autoserv_command_line functionality into utility module 36/56136/5
Aviv Keshet [Tue, 21 May 2013 21:43:16 +0000 (14:43 -0700)]
[autotest] pull _autoserv_command_line functionality into utility module

This CL pulls the logic used by monitor_db.py to create an autoserv
command line from a job into its own function, in a separate new module
-- autoserv_utils.py. This will allow for code reuse with test_that.

monitor_db still contains a number of other functions which create
autoserv command lines for other tasks like log collection. These have
not yet been pulled out to shared utility functions, because those parts
of the scheduler didn't seem to have any unit test coverage. A future CL
may pull some of these out as well.

BUG=chromium:236471
TEST=unit tests pass. Ran a smoke suite in local autotest.
DEPLOY=scheduler

Change-Id: I6317b70aa9fb7e9968739582b9379112baa4507b
Reviewed-on: https://gerrit.chromium.org/gerrit/56136
Reviewed-by: Aviv Keshet <akeshet@chromium.org>
Tested-by: Aviv Keshet <akeshet@chromium.org>
Commit-Queue: Aviv Keshet <akeshet@chromium.org>

26 hours agoIncrease the timeout in test network_MobileSuspendResume 77/56077/2
Prathmesh Prabhu [Tue, 21 May 2013 18:29:56 +0000 (11:29 -0700)]
Increase the timeout in test network_MobileSuspendResume

Unfortunately, modems often need more than 30s to get fully enabled and
connected. Bump up the timeout for service creation etc to 60s.

BUG=chromium:241709, chromium:242206, chromium:242081
TEST=Test that network_MobileSuspendResume passes on a bunch of try
jobs.

Change-Id: I42c92146553827d272d5178128ac758ea296b314
Reviewed-on: https://gerrit.chromium.org/gerrit/56077
Reviewed-by: Thieu Le <thieule@chromium.org>
Commit-Queue: Prathmesh Prabhu <pprabhu@chromium.org>
Tested-by: Prathmesh Prabhu <pprabhu@chromium.org>
26 hours agocellular: Fix network_3GDisconnectFailure.3GPP auto-connect issue. 98/56098/3
Arman Uguray [Tue, 21 May 2013 21:22:54 +0000 (14:22 -0700)]
cellular: Fix network_3GDisconnectFailure.3GPP auto-connect issue.

Since a 3GPP service is set to auto-connect by default, the modem gets
connected before the initial call to |network.ResetAllModems|. As this
explicitly disables the modem, and a disable will by default try to
Disconnect, however, since the pseudomodems used in this test fail to
disconnect, the exception raised propagate to the test and cause a test
failure.

This CL addresses this by making the custom Disconnect implementations
not fail if they were initiated by a Disable operation.

BUG=chromium:242648
TEST=Running network_3GDisconnectFailure should pass.

Change-Id: I359c03c419dac11a2a1c583adfd19216a6db05f8
Reviewed-on: https://gerrit.chromium.org/gerrit/56098
Commit-Queue: Arman Uguray <armansito@chromium.org>
Reviewed-by: Arman Uguray <armansito@chromium.org>
Tested-by: Arman Uguray <armansito@chromium.org>
29 hours agoStage test images for servo automatically. 78/49778/9
J. Richard Barnette [Wed, 1 May 2013 20:16:12 +0000 (13:16 -0700)]
Stage test images for servo automatically.

Instead of using a hard-coded URL that must be manually updated,
stage test images on the devserver on demand for servo repair.  The
version to stage is selected by the "stable_cros_version" global
config setting; this is the same setting used when repairing via
machine_install().

BUG=chromium:215430
TEST=repair in a local autotest instance, plus platform_InstallTestImage

Change-Id: Id7cefa6fedf3ad0033f693b3e4e0ce231eda9d63
Reviewed-on: https://gerrit.chromium.org/gerrit/49778
Tested-by: Richard Barnette <jrbarnette@chromium.org>
Reviewed-by: Simran Basi <sbasi@chromium.org>
Reviewed-by: Scott Zawalski <scottz@chromium.org>
Commit-Queue: Richard Barnette <jrbarnette@chromium.org>

29 hours agoUpdate apache configuration to fit our environment. 48/55748/5
Scott Zawalski [Mon, 20 May 2013 12:54:59 +0000 (08:54 -0400)]
Update apache configuration to fit our environment.

Remove site-sso-directives include in all-directives and make
site-directives the include that should cover all changes to the site
(Disabled by default).

Commit the site-misc-directives that have been floating around servers
for a long time without being in revision control.

TKO add a DocumentRoot directive so we no longer need to symlink
/usr/local/autotest/apache/www/results as we did previously.

TEST=deployed to a server and checked dashboard, results, and
results redirect.
BUG=chromium:241547
DEPLOY=restart apache
To deploy this local change "scottz local change" will need to be
reverted (Or reset above git reset --hard HEAD^) and site-directives
will need to be uncommented in the apache/conf/all-directives file.

Change-Id: Ifdc5e2f1ce5ded84dc0a99db4daac7e595a3bc93
Reviewed-on: https://gerrit.chromium.org/gerrit/55748
Reviewed-by: Richard Barnette <jrbarnette@chromium.org>
Commit-Queue: Scott Zawalski <scottz@chromium.org>
Reviewed-by: Scott Zawalski <scottz@chromium.org>
Tested-by: Scott Zawalski <scottz@chromium.org>
29 hours agoUpload chromeOS Telemetry perf test results for all platforms to perf dash. 11/56111/2
Dennis Jeffrey [Tue, 21 May 2013 22:46:12 +0000 (15:46 -0700)]
Upload chromeOS Telemetry perf test results for all platforms to perf dash.

Previously, we only uploaded chromeOS Telemetry perf test results for
the "lumpy" platform.  Now, we upload results for all platforms.

By default, the perf dashboard considers platforms to be internal-only
unless they are explicitly whitelisted by an authorized user through the
dashboard UI.  Internal-only test results can only be viewed by people
who are logged into the dashboard using an @google.com account.

BUG=chromium:237598
TEST=Verified that Telemetry perf results for all platforms can be uploaded
to a local instance of the chrome perf dashboard.  Also verified that the
results are only displayed on the dashboard when logged in to an @google.com
account.

Change-Id: Icb1de793540ed13267e78e247c668517f9135405
Reviewed-on: https://gerrit.chromium.org/gerrit/56111
Reviewed-by: Scott Zawalski <scottz@chromium.org>
Commit-Queue: Dennis Jeffrey <dennisjeffrey@chromium.org>
Tested-by: Dennis Jeffrey <dennisjeffrey@chromium.org>
29 hours agoRevert "[Autotest] correct au test name to comply with run_suite" 96/56296/2
Chris Sosa [Wed, 22 May 2013 19:25:37 +0000 (12:25 -0700)]
Revert "[Autotest] correct au test name to comply with run_suite"

This is breaking the AU test suite where autotest can't find the test.

This reverts commit b3748a2f4a87e58572b61dd9ce28d1613bb9a534

Change-Id: Idb8c05f03d00ec4bf448eae240578cc558cd29a3
Reviewed-on: https://gerrit.chromium.org/gerrit/56296
Reviewed-by: Chris Sosa <sosa@chromium.org>
Tested-by: Chris Sosa <sosa@chromium.org>
32 hours ago[Autotest] correct au test name to comply with run_suite 10/55810/3
Dan Shi [Mon, 20 May 2013 17:37:10 +0000 (10:37 -0700)]
[Autotest] correct au test name to comply with run_suite

run_suite has special use of |.| in test name. If a test name has dot in it,
run_suite will fail to locate its job from keyvals in tko view.
keyvals are keyed by the hash of job name. Based on method run_suite/
get_view_info, the test name is parsed out from view['test_name'] with build
and suite info stripped. And, the job name is parsed out from test name with
the section before first |.|: std_job_name = test_name.split('.')[0]

In another CL (55598), the test name was fixed for generating nmp and npo
control file. However, the same change should be made to the run_test call in
the control file.

BUG=chromium:226147
TEST=tested with run_suite in local machine
DEPLOY=none

Change-Id: Ia221c0fc509d21a5db4cd89d15587ff19c7ba6e2
Reviewed-on: https://gerrit.chromium.org/gerrit/55810
Tested-by: Dan Shi <dshi@chromium.org>
Reviewed-by: Chris Sosa <sosa@chromium.org>
Reviewed-by: Scott Zawalski <scottz@chromium.org>
Commit-Queue: Dan Shi <dshi@chromium.org>

39 hours ago[autotest] Enum get_value works when passed a long 16/56116/3
Aviv Keshet [Tue, 21 May 2013 22:53:41 +0000 (15:53 -0700)]
[autotest] Enum get_value works when passed a long

Prior to this CL:
> import common
> from autotest_lib.client.common_lib import control_data
> control_data.CONTROL_TYPE.get_value('client')
2
> control_data.CONTROL_TYPE.get_value(2)
2
> control_data.CONTROL_TYPE.get_value(2L)
AttributeError: 'long' object has to attribute 'upper'

After this CL:
[snip]
> control_data.CONTROL_TYPE.get_value(2L)
2L

The reason this matters is that, occasionally, enums stored in one of
our databases as an integer are being stored as a long. Hardening Enum
so it sanely handles long ints removes the need to sanity check whether
enums coming out of the db are ints or longs.

BUG=See above
TEST=unit tests pass; Also see above.

Change-Id: I3ae84e8593daa559f530c99c6454eb2336b51303
Reviewed-on: https://gerrit.chromium.org/gerrit/56116
Reviewed-by: Aviv Keshet <akeshet@chromium.org>
Tested-by: Aviv Keshet <akeshet@chromium.org>
Commit-Queue: Aviv Keshet <akeshet@chromium.org>

39 hours ago[autotest] reduce verbosity of unittests that use django 96/56096/4
Aviv Keshet [Tue, 21 May 2013 20:55:01 +0000 (13:55 -0700)]
[autotest] reduce verbosity of unittests that use django

Prior to this CL, running a unit test that uses a test django setup (for
instance with `utils/unittest_suite.py
autotest_lib.scheduler.monitor_db_unittest --debug`) results in a huge
amount of meaningless repetitions of messages like "No permission for
add_group", coming from repeated setups and teardowns of a test django
database without all of the prod admin groups set up. This CL silences
these messages behind a verbosity flag.

BUG=None
TEST=`utils/unittest_suite.py
autotest_lib.scheduler.monitor_db_unittest --debug`; no more "No
permission X" spam.

Change-Id: I64e0be1cb8e5864a22a0e7dd26aaa0d8a4c842cf
Reviewed-on: https://gerrit.chromium.org/gerrit/56096
Tested-by: Aviv Keshet <akeshet@chromium.org>
Reviewed-by: Simran Basi <sbasi@chromium.org>
Commit-Queue: Aviv Keshet <akeshet@chromium.org>

43 hours agofirmware_TouchMTB: introduce a geometry package 00/51300/4
Joseph Hwang [Wed, 15 May 2013 03:48:35 +0000 (11:48 +0800)]
firmware_TouchMTB: introduce a geometry package

The new requirement of the drumroll validator is that all points
from the same finger should be within 2 circles of radius X mm. We
could classify the points of the same finger into two clusters with
some method. For each cluster, calculate the minimal enclosing circle
of the points. As a first step, this patch implements an algorithm
proposed by Emo Welzl which is reasonably fast to compute such a
minimal enclosing circle.

In this patch, we introduce a geometry package which includes an
elements module to handle basic shapes, and a minicircle module
to calculate the minimal enclosing circle of a set of points.

We use the enclosingCircle funciton in octave's geometry package
to verify the correctness of the related unit tests.

BUG=chromium:241092
TEST=On a chromebook
$ cd /usr/local/autotest/tests/firmware_TouchMTB
Make sure that the following unit test pass.
$ python tests/geometry_unittest.py

Change-Id: I586d8dff6e825502e88873a951230e1335b19f99
Reviewed-on: https://gerrit.chromium.org/gerrit/51300
Reviewed-by: Charlie Mooney <charliemooney@chromium.org>
Commit-Queue: Joseph Shyh-In Hwang <josephsih@chromium.org>
Tested-by: Joseph Shyh-In Hwang <josephsih@chromium.org>
43 hours agofirmware_TouchMTB_next: Add a new control.next file 94/50594/3
Joseph Hwang [Thu, 9 May 2013 06:44:46 +0000 (14:44 +0800)]
firmware_TouchMTB_next: Add a new control.next file

This patch adds a new control.next file so that when executing
run_remote_tests, it will install firmware_TouchMTB_next instead
of firmware_TouchMTB on the remote machine.

BUG=chromium:238619
TEST=run the following commands in the chroot
(cr) ./run_remote_tests.sh --remote=$REMOTE_IP
     firmware_TouchMTB_next/control.next
This should install firmware_TouchMTB_next to the remote machine.

Change-Id: Iaad22f3153d74e9eb91a523f7b10419970d7cfd6
Reviewed-on: https://gerrit.chromium.org/gerrit/50594
Reviewed-by: Charlie Mooney <charliemooney@chromium.org>
Commit-Queue: Joseph Shyh-In Hwang <josephsih@chromium.org>
Tested-by: Joseph Shyh-In Hwang <josephsih@chromium.org>
44 hours agoFAFT: Catch the error which failed to get firmware sha 21/56021/3
Tom Wai-Hong Tam [Tue, 21 May 2013 13:51:42 +0000 (21:51 +0800)]
FAFT: Catch the error which failed to get firmware sha

We saw an index-out-of-range error on the firmware sha. Should catch the
error earlier by checking all the sha value valid.

BUG=chrome-os-partner:19140
TEST=None, trivial check.

Change-Id: I96da99a3a25f460c34bf5c8c02a1cc7bfa4f6ebd
Reviewed-on: https://gerrit.chromium.org/gerrit/56021
Reviewed-by: Yusuf Mohsinally <mohsinally@chromium.org>
Commit-Queue: Tom Wai-Hong Tam <waihong@chromium.org>
Tested-by: Tom Wai-Hong Tam <waihong@chromium.org>
46 hours agoUpdated Spring BVT usage to 6. 27/56127/3
John D Hong [Wed, 22 May 2013 00:18:40 +0000 (17:18 -0700)]
Updated Spring BVT usage to 6.

BUG=None
DEPLOY=suite_scheduler
TEST=site_utils/suite_scheduler/suite_scheduler.py -t

Change-Id: I4618fed913f4c615d314b9239a021c0e1ff5bf76
Reviewed-on: https://gerrit.chromium.org/gerrit/56127
Reviewed-by: Alex Miller <milleral@chromium.org>
Commit-Queue: John D Hong <johndhong@chromium.org>
Tested-by: John D Hong <johndhong@chromium.org>
2 days agoCorrecting bss for linksys wrt160nv3 and enabling medialink 00/56100/2
bmahadev [Tue, 21 May 2013 21:41:55 +0000 (14:41 -0700)]
Correcting bss for linksys wrt160nv3 and enabling medialink

BUG=chromium:241529
TEST=None

Change-Id: I9c150d635853f9964de33a4411659de1d5a294dc
Reviewed-on: https://gerrit.chromium.org/gerrit/56100
Reviewed-by: Kris Rambish <krisr@chromium.org>
Commit-Queue: Bindu Mahadev <bmahadev@chromium.org>
Tested-by: Bindu Mahadev <bmahadev@chromium.org>
2 days agoCorrect the syntax error in medialink configurator. 89/56089/2
Deepak Gopal [Tue, 21 May 2013 19:58:27 +0000 (12:58 -0700)]
Correct the syntax error in medialink configurator.

TEST=None
BUG=chromium:242639

Change-Id: I3afe099a92a0a35ac0743a145ccd0bcaeac54556
Reviewed-on: https://gerrit.chromium.org/gerrit/56089
Reviewed-by: Kris Rambish <krisr@chromium.org>
Commit-Queue: Deepak Gopal <deepakg@chromium.org>
Tested-by: Deepak Gopal <deepakg@chromium.org>
2 days agoRemove security alert email configuration 61/56061/2
Jim Hebert [Tue, 21 May 2013 17:26:56 +0000 (10:26 -0700)]
Remove security alert email configuration

BUG=none
TEST=none

Change-Id: I53610c00b655f16fb9d36eafdfb3b82ab19741ba
Reviewed-on: https://gerrit.chromium.org/gerrit/56061
Commit-Queue: Jim Hebert <jimhebert@chromium.org>
Reviewed-by: Jim Hebert <jimhebert@chromium.org>
Tested-by: Jim Hebert <jimhebert@chromium.org>
2 days agoFix bug in service_stopper. 25/56025/2
Todd Broch [Tue, 21 May 2013 14:39:25 +0000 (07:39 -0700)]
Fix bug in service_stopper.

https://gerrit.chromium.org/gerrit/51254 introduced bug into the
service stopper logic where is_stopped was always true.

For example the most likely upstart status strings will create the
following values for is_stopped:

out_arr = ['tcsd start/running, process 507',
   'tcsd stop/waiting',
           'status: Unknown job: tcsd_bogus'
          ]
for out in out_arr:
  is_stopped = 'start/running' not in out
  print is_stopped

>>> False
>>> True
>>> True

Previous change incorrectly assummed find would return 0 for a match
and 1 for not but it should have instead key'd off -1 for no match.

BUG=chrome-os-partner:19561
TEST=hardware_TPMCheck passes

Change-Id: I3f02cf74840ba834c6fe115d8852197532bf4686
Reviewed-on: https://gerrit.chromium.org/gerrit/56025
Reviewed-by: Scott Zawalski <scottz@chromium.org>
Commit-Queue: Todd Broch <tbroch@chromium.org>
Tested-by: Todd Broch <tbroch@chromium.org>
2 days agoRevert "Fix bug in service_stopper." 24/56024/2
Todd Broch [Tue, 21 May 2013 14:37:33 +0000 (07:37 -0700)]
Revert "Fix bug in service_stopper."

This reverts commit 8b72430b5cf2ba9918377de4149123a256b2fe89.

Change-Id: I9647e3007da8f71c0bf9138c17315ed1632e68e4
Reviewed-on: https://gerrit.chromium.org/gerrit/56024
Reviewed-by: Scott Zawalski <scottz@chromium.org>
Commit-Queue: Todd Broch <tbroch@chromium.org>
Tested-by: Todd Broch <tbroch@chromium.org>
2 days agoWait longer in dlink to avoid the scanning page 05/55605/2
Deepak Gopal [Sat, 18 May 2013 00:31:54 +0000 (17:31 -0700)]
Wait longer in dlink to avoid the scanning page

There is no other way for us to find out the scanning page,
since it does not show up always and when it shows up it stays
only for a few seconds.

TEST=None
BUG=chromium:235671

Change-Id: I151ab63fc92b82781087db08460a7bbf154c1747
Reviewed-on: https://gerrit.chromium.org/gerrit/55605
Reviewed-by: Kris Rambish <krisr@chromium.org>
Commit-Queue: Deepak Gopal <deepakg@chromium.org>
Tested-by: Deepak Gopal <deepakg@chromium.org>
2 days agoAdd signal handler in camera test fixture 76/55876/2
Justin Chuang [Tue, 21 May 2013 06:07:17 +0000 (14:07 +0800)]
Add signal handler in camera test fixture

The current autotest framework doesn't register signal handler by
default.  So it doesn't release python-level resources once a test is
killed with SIGTERM (for example, OpenCV doesn't release camera device
correctly with SIGTERM).

BUG=chrome-os-partner:19583
TEST=Manually
1. Run the test
2. Stop the test on the left pane when camera is capturing images.
3. On some platform, camera may stop working if it was not closed properly.

Change-Id: I40863e69a8541338e0aad0ec0c45273fdd5518fc
Reviewed-on: https://gerrit.chromium.org/gerrit/55876
Reviewed-by: Tai-Hsu Lin <sheckylin@chromium.org>
Tested-by: Justin Chuang <jchuang@chromium.org>
Commit-Queue: Justin Chuang <jchuang@chromium.org>

2 days agoUpdate stable image to R28-4100.7.0. 59/55759/2
Scott Zawalski [Mon, 20 May 2013 14:45:10 +0000 (10:45 -0400)]
Update stable image to R28-4100.7.0.

Update the stable image for repair. There have been some new board
additions that are no longer covered by the previous R25 release.

This image is a shipped image on daisy_spring and suite runs in the
autotest results db look green for other platforms.

TEST=repaired daisy_spring host
BUG=chromium:242184

Change-Id: I11138ab79b883fd295e1b93ebe362a109b9f9044
Reviewed-on: https://gerrit.chromium.org/gerrit/55759
Tested-by: Scott Zawalski <scottz@chromium.org>
Reviewed-by: Dan Shi <dshi@chromium.org>
Reviewed-by: Fang Deng <fdeng@chromium.org>
Commit-Queue: Scott Zawalski <scottz@chromium.org>
Reviewed-by: Scott Zawalski <scottz@chromium.org>
2 days agoUse set_get_all for key pressing 75/55875/2
Vic Yang [Tue, 21 May 2013 06:02:05 +0000 (14:02 +0800)]
Use set_get_all for key pressing

This reduces the number of RPC calls from 9 to 1, and also reduces the
delay between each servo control.

BUG=chrome-os-partner:19320
TEST=Run firmware_SelfSignedBoot and see key pressed with set_get_all.

Change-Id: I4d601d23bc487630ff68be1d2e6a9e83352b6fea
Signed-off-by: Vic Yang <victoryang@chromium.org>
Reviewed-on: https://gerrit.chromium.org/gerrit/55875
Reviewed-by: Tom Wai-Hong Tam <waihong@chromium.org>
2 days agoFix squeezing of ndarray of corners when there is only one corner 64/55764/2
Justin Chuang [Mon, 20 May 2013 14:26:26 +0000 (22:26 +0800)]
Fix squeezing of ndarray of corners when there is only one corner

OpenCV returns corners in ndarray with dimension as [num_corners, 1, 2].
We want to squeeze it to smaller dimension as [num_corners, 2].

The original method is np.squeeze(), which yields wrong results when
num_corners = 1.

BUG=chrome-os-partner:19584
TEST=Manually; use a white paper to cover camera and try to show only one corner

Change-Id: If793f303a64ce49b1b9f88c4573b4c8b541f2f15
Reviewed-on: https://gerrit.chromium.org/gerrit/55764
Reviewed-by: Tai-Hsu Lin <sheckylin@chromium.org>
Tested-by: Justin Chuang <jchuang@chromium.org>
Commit-Queue: Justin Chuang <jchuang@chromium.org>

2 days agoRecover DUT during cleanup if DUT is not responding 74/55874/3
Vic Yang [Tue, 21 May 2013 05:28:18 +0000 (13:28 +0800)]
Recover DUT during cleanup if DUT is not responding

If we cannot talk to DUT during cleanup, the subsequent tests are going
to fail. Let's recover DUT in this case.

BUG=chrome-os-partner:19172
TEST=Run firmware_SelfSignedBoot

Change-Id: I2d4f4c70cafe9fb772aa99e4cb6ae0e4a227f20c
Signed-off-by: Vic Yang <victoryang@chromium.org>
Reviewed-on: https://gerrit.chromium.org/gerrit/55874
Reviewed-by: Tom Wai-Hong Tam <waihong@chromium.org>
2 days agoFix bug in service_stopper. 34/55834/3
Todd Broch [Mon, 20 May 2013 22:09:09 +0000 (15:09 -0700)]
Fix bug in service_stopper.

https://gerrit.chromium.org/gerrit/51254 introduced bug into the
service stopper logic where is_stopped was always true.

For example the most likely upstart status strings will create the
following matches for is_stopped:

print 'tcsd start/running, process 507'.find('start/running')
>>>  5
print 'tcsd stop/waiting'.find('start/running')
>>> -1
print 'status: Unknown job: tcsd_bogus'.find('start/running')
>>> -1

Previous change incorrectly assummed find would return 0 for a match
and 1 for not but it should have instead key'd off -1 for no match.

BUG=chrome-os-partner:19561
TEST=hardware_TPMCheck passes

Change-Id: I7042512dd01589949167e5f4687fb850553b1ba4
Reviewed-on: https://gerrit.chromium.org/gerrit/55834
Reviewed-by: Luigi Semenzato <semenzato@chromium.org>
Reviewed-by: Mohammed Habibulla <moch@chromium.org>
Commit-Queue: Todd Broch <tbroch@chromium.org>
Tested-by: Todd Broch <tbroch@chromium.org>
2 days ago[autotest] add an ignore_deps parameter to Suite constructor 55/55855/3
Aviv Keshet [Fri, 17 May 2013 22:58:43 +0000 (15:58 -0700)]
[autotest] add an ignore_deps parameter to Suite constructor

This CL adds a ignore_deps flag to the Suite constructor. When the flag
is passed in as true, jobs will be scheduled without using any of the
dependencies specified in their control file's DEPENCENCY attribute.

This flag is useful in test_that, to avoid the need to add label objects
and assign labels to the (one-and-only) host that will exist in its
sqlite in-memory afe database.

BUG=chromium:236471
TEST=Modified suite unit tests to be sensitive to dependencies.
Added a test that uses the ignore_deps flag. All existing and new tests
pass.

Change-Id: I4a0de64fcc9e197f357106279fd8da35ab8ba90d
Reviewed-on: https://gerrit.chromium.org/gerrit/55855
Commit-Queue: Aviv Keshet <akeshet@chromium.org>
Reviewed-by: Aviv Keshet <akeshet@chromium.org>
Tested-by: Aviv Keshet <akeshet@chromium.org>
2 days agoFix for handling system error on Medialink AP 60/55560/2
bmahadev [Fri, 17 May 2013 19:09:55 +0000 (12:09 -0700)]
Fix for handling system error on Medialink AP

TEST=None
BUG=chromium:241583

Change-Id: Ic2bd9572f963a5dc1f9df9368206192f9ed0b79e
Reviewed-on: https://gerrit.chromium.org/gerrit/55560
Reviewed-by: Kris Rambish <krisr@chromium.org>
Commit-Queue: Bindu Mahadev <bmahadev@chromium.org>
Tested-by: Bindu Mahadev <bmahadev@chromium.org>
3 days agopower_suspend: Use lock_vt where system does too 17/55817/5
Olof Johansson [Mon, 20 May 2013 20:24:27 +0000 (13:24 -0700)]
power_suspend: Use lock_vt where system does too

Use the lock_vt functionality on systems where the regular suspend/resume
process does the same. This will ensure that we actually test the same
code paths that users are executing.

It would have been nice to pass in the lockvt USE flag all the way into
the testcase, since that is how we specify it per-board, but it seems
to be quite awkward to do all the way down to the library. So I'm doing
the second best for now, and adding a small dictionary for the platforms
that should not enable it.

BUG=chromium:241491
TEST=ran platform_SuspendStress for 20 iterations without seeing lockups
due to VT switching

Change-Id: Iff3e91695f2beccdffb21692d062731dcab5d40c
Signed-off-by: Olof Johansson <olofj@chromium.org>
Reviewed-on: https://gerrit.chromium.org/gerrit/55817
Reviewed-by: Daniel Erat <derat@chromium.org>
3 days agopseudomodem: Fix incorrect assertions in enable_machine.py 39/55839/2
Arman Uguray [Mon, 20 May 2013 22:27:50 +0000 (15:27 -0700)]
pseudomodem: Fix incorrect assertions in enable_machine.py

The EnableMachine incorrectly asserts that there is no active
ConnectMachine during each of its transitions. This is an incorrect
assertion, since calling Connect on a disabled modem will create a
ConnectMachine which in turn creates an EnableMachine to bring the modem
to the ENABLED state.

BUG=chromium:241457
TEST=Run network_3GModemControl/control.pseudomodem on an x86-alex many
times. The test shouldn't fail with "Unhandled DBusException:
org.freedesktop.ModemManager1.Core.InProgress: (MMCoreError(...),
('Modem enable has already been initiated, ignoring.',), {})".

Change-Id: Ice8fe2887cb40b46c83f78ffa4acfed5e6c872d3
Reviewed-on: https://gerrit.chromium.org/gerrit/55839
Reviewed-by: Thieu Le <thieule@chromium.org>
Commit-Queue: Arman Uguray <armansito@chromium.org>
Tested-by: Arman Uguray <armansito@chromium.org>
3 days agopower: USB auto-suspend is always enabled. 90/55590/5
Todd Broch [Fri, 17 May 2013 22:30:56 +0000 (15:30 -0700)]
power: USB auto-suspend is always enabled.

Decided to enable USB auto-suspend regardless of power supply (battery vs AC).

Note previously, test checked that all USB devices present comply with
expected value (Battery->autosuspend, AC->always one) which meant that
a DUT might have false failures with an externally attached device or
a device that had been omitted from the whitelist.  Now test flags
error for only those devices that are whitelisted while printing
warnings for those not.  This leaves the final burden of whitelisting
on the system designers but still identifies these power-hungry
devices.

There's not really any bullet-proof way to do this as we can't
identify whether a device is internal.  One possibility is also add a
blacklist for internal devices which we do NOT want autosuspend
enabled on or a don't care list for common external devices.

CQ-DEPEND=I82c926d6ca21591bc4518538214c8509a8cc2e35
BUG=chromium:217395
TEST=run power_x86Settings & power_ARMSettings and usb portion passes.

Change-Id: I7f717160d07c90732820d19eaf886ad8c1043c56
Reviewed-on: https://gerrit.chromium.org/gerrit/55590
Tested-by: Todd Broch <tbroch@chromium.org>
Reviewed-by: Sameer Nanda <snanda@chromium.org>
Commit-Queue: Todd Broch <tbroch@chromium.org>

3 days agopower: Refactor USB auto-suspend checking. 89/55589/3
Todd Broch [Fri, 17 May 2013 22:17:00 +0000 (15:17 -0700)]
power: Refactor USB auto-suspend checking.

We whitelist USB devices that are internal (built-in) to CrOS devices.
That fact had been implemented inside power_x86Settings but not
power_ARMSettings initially.

CL refactors that USB policy into power_utils and then calls that from
inside each of the respective architectures power tests.

BUG=chromium:241852
TEST=run power_x86Settings & power_ARMSettings from both AC & battery
and they pass.

Change-Id: I8a64a2cc5f2db0eb9a67cc68b4d0aace07359e89
Reviewed-on: https://gerrit.chromium.org/gerrit/55589
Tested-by: Todd Broch <tbroch@chromium.org>
Reviewed-by: Sameer Nanda <snanda@chromium.org>
Commit-Queue: Todd Broch <tbroch@chromium.org>

3 days agoFix broken unit test host_lock_manager_unittest.py. 04/55804/2
Tan Gao [Mon, 20 May 2013 18:40:48 +0000 (11:40 -0700)]
Fix broken unit test host_lock_manager_unittest.py.

BUG=chromium:242247
TEST=ran unit test and verified passing

Change-Id: Ide4683284a81f8113d64d7912287c3ffa74ca293
Reviewed-on: https://gerrit.chromium.org/gerrit/55804
Tested-by: Tan Gao <tgao@chromium.org>
Reviewed-by: Aviv Keshet <akeshet@chromium.org>
Commit-Queue: Tan Gao <tgao@chromium.org>

3 days agoRemove Jim and Kees from security email alerts 01/55801/2
Jim Hebert [Mon, 20 May 2013 17:55:36 +0000 (10:55 -0700)]
Remove Jim and Kees from security email alerts

BUG=none
TEST=none

Change-Id: Ia409958e853cb397ca52afb4e8a120599ae3ab2c
Reviewed-on: https://gerrit.chromium.org/gerrit/55801
Reviewed-by: Kees Cook <keescook@chromium.org>
Commit-Queue: Jim Hebert <jimhebert@chromium.org>
Tested-by: Jim Hebert <jimhebert@chromium.org>
3 days agoRestore hack due to build number issues. 99/55599/2
Chris Sosa [Fri, 17 May 2013 23:32:26 +0000 (16:32 -0700)]
Restore hack due to build number issues.

Release trybot images may have a -b suffix which confuses the heck
out of full_release_test when finding the source image payload.
I had this in before but removed it when I refactored this code (note
even the comment was leftover).

This code simply says if the version I'm finding the source image for
is a superset of the release, treat the archive_url as the whole
archive_url to find the source payload.

BUG=chromium:240907
TEST=Ran it against trybots, pgo-use and release images.

Change-Id: Icc3f9c344664a6732f297d43774fc6a80942e171
Reviewed-on: https://gerrit.chromium.org/gerrit/55599
Tested-by: Chris Sosa <sosa@chromium.org>
Reviewed-by: Alex Miller <milleral@chromium.org>
Commit-Queue: Chris Sosa <sosa@chromium.org>
Reviewed-by: Chris Sosa <sosa@chromium.org>
3 days agofirmware_TouchMTB: refactor firmware_log and firmware_summary modules 20/50320/7
Joseph Hwang [Tue, 7 May 2013 16:27:22 +0000 (00:27 +0800)]
firmware_TouchMTB: refactor firmware_log and firmware_summary modules

Some of the code about test logs was manipulated in firmware_summary
module which made this module become messy. In this patch, we do the
refactoring by moving those code to firmware_log module and create
classes for them. In addition, we also flatten the deep hierarchy of
log dictionaries so that it is much simpler to maintain.

BUG=chromium:238039
TEST=On a chromebook
$ cd /usr/local/autotest/tests/firmware_TouchMTB
Make sure that the following unit test pass.
$ python tests/firmware_summary_unittest.py

Change-Id: Idc5a70ed28745805a4221cc20780c23da0210fb0
Reviewed-on: https://gerrit.chromium.org/gerrit/50320
Commit-Queue: Joseph Shyh-In Hwang <josephsih@chromium.org>
Reviewed-by: Joseph Shyh-In Hwang <josephsih@chromium.org>
Tested-by: Joseph Shyh-In Hwang <josephsih@chromium.org>
5 days ago[autotest] Temporarily disable automated bug filing for network3g_pseudomoden suites. 18/55618/4
Ben Chan [Sat, 18 May 2013 06:30:27 +0000 (23:30 -0700)]
[autotest] Temporarily disable automated bug filing for network3g_pseudomoden suites.

BUG=None
TEST=None

Change-Id: I254f82c15c50ca6e9745083d5a71145adf70351e
Reviewed-on: https://gerrit.chromium.org/gerrit/55618
Commit-Queue: Ben Chan <benchan@chromium.org>
Tested-by: Ben Chan <benchan@chromium.org>
Reviewed-by: Arman Uguray <armansito@chromium.org>
5 days agoRework host locking code to unlock APs sooner. 76/51176/4
Tan Gao [Tue, 14 May 2013 00:24:17 +0000 (17:24 -0700)]
Rework host locking code to unlock APs sooner.

 - revised host lock implementation to support more flexible lock/unlock
   usage patterns
 - rewrote and added unit tests
 - updated existing call points of host_lock_manager

BUG=chromium:237590
TEST=Manual (run ChaosPSK test using a modified control file w/ batch_size=2,
             verified 2.4GHz-only APs are unlocked as soon as we're done using
             them and dual-band APs are unlocked after we test its 5GHz band.)

Change-Id: I0bcf35675d08cc43b088d148d7be44f37e93e4e2
Reviewed-on: https://gerrit.chromium.org/gerrit/51176
Tested-by: Tan Gao <tgao@chromium.org>
Reviewed-by: Kris Rambish <krisr@chromium.org>
Commit-Queue: Tan Gao <tgao@chromium.org>

5 days agocellular: pseudomodem: Fix invocation of RegisterMachine.Cancel() 15/55615/2
Ben Chan [Sat, 18 May 2013 05:56:45 +0000 (22:56 -0700)]
cellular: pseudomodem: Fix invocation of RegisterMachine.Cancel()

This CL fixes a typo in RegisterMachineCdma when it tries to invoke
its parent class's Cancel() method (i.e. RegisterMachine.Cancel()).

BUG=chromium:241554
TEST=Running ./utils/run_pylint.py inside the client/cros/cellular/pseudomodem

Change-Id: I5d1d503635b3ce8d3e24d04a02be18486dad9642
Reviewed-on: https://gerrit.chromium.org/gerrit/55615
Commit-Queue: Ben Chan <benchan@chromium.org>
Reviewed-by: Ben Chan <benchan@chromium.org>
Tested-by: Ben Chan <benchan@chromium.org>
Reviewed-by: Alex Miller <milleral@chromium.org>
6 days ago[Autotest] correct au test name to comply with run_suite 98/55598/2
Dan Shi [Fri, 17 May 2013 22:19:59 +0000 (15:19 -0700)]
[Autotest] correct au test name to comply with run_suite

run_suite has special use of |.| in test name. If a test name has dot in it,
run_suite will fail to locate its job from keyvals in tko view.

keyvals are keyed by the hash of job name. Based on method run_suite/
get_view_info, the test name is parsed out from view['test_name'] with build
and suite info stripped. And, the job name is parsed out from test name with
the section before first |.|: std_job_name = test_name.split('.')[0]

BUG=chromium:226147
TEST=tested with run_suite in local machine
DEPLOY=none

Change-Id: I5aac665c012357d3161538cd4211d32c041af498
Reviewed-on: https://gerrit.chromium.org/gerrit/55598
Tested-by: Dan Shi <dshi@chromium.org>
Reviewed-by: Chris Sosa <sosa@chromium.org>
Commit-Queue: Dan Shi <dshi@chromium.org>

6 days ago[autotest] Adding common.py to the chaos_configurator. 53/49153/2
beeps [Thu, 25 Apr 2013 00:49:33 +0000 (17:49 -0700)]
[autotest] Adding common.py to the chaos_configurator.

BUG=None
TEST=None

Change-Id: I571f4b051376b6504dfce0d1cec7f4152aa1b4ab
Reviewed-on: https://gerrit.chromium.org/gerrit/49153
Reviewed-by: Prashanth Balasubramanian <beeps@chromium.org>
Tested-by: Prashanth Balasubramanian <beeps@chromium.org>
Commit-Queue: Prashanth Balasubramanian <beeps@chromium.org>

6 days ago[autotest] Server jobs include the hostname in their job_status. 52/51352/2
beeps [Wed, 15 May 2013 20:18:47 +0000 (13:18 -0700)]
[autotest] Server jobs include the hostname in their job_status.

Three attributes are essential to create a link to the logs
of a failure, the job_id, the owner and hostname. This change
includes the hostname in the status returned when a server job
fails. The status will always have the hostname attribute,
and even if it's set to None the reporter won't fail, so we
can blidly include it in the result we return to dynamic_suite.
This only affects server jobs that fail, not ones that Abort.

TEST=Raised an exception in the server job and checked that
     the bug filed includes a link to the log.
BUG=None

Change-Id: I23fa5eadcf6d969a923159255c62ace9d5f8432b
Reviewed-on: https://gerrit.chromium.org/gerrit/51352
Tested-by: Prashanth Balasubramanian <beeps@chromium.org>
Reviewed-by: Scott Zawalski <scottz@chromium.org>
Commit-Queue: Prashanth Balasubramanian <beeps@chromium.org>

6 days agopower_utils: recognize Core 4th gen 61/55561/2
Sameer Nanda [Fri, 17 May 2013 19:51:27 +0000 (12:51 -0700)]
power_utils: recognize Core 4th gen

Added check for Core 4th gen.

BUG=none
TEST=run this test on a Core 4 system and make sure the test doesn't
return Test NA error

Change-Id: I7b9689dd53f39156a59a1c75ea8a5f3eb28b30f9
Reviewed-on: https://gerrit.chromium.org/gerrit/55561
Reviewed-by: Todd Broch <tbroch@chromium.org>
Commit-Queue: Sameer Nanda <snanda@chromium.org>
Tested-by: Sameer Nanda <snanda@chromium.org>
6 days ago[autotest] Fix Cr label of automated bug filing for network3g suites. 53/55553/2
Ben Chan [Fri, 17 May 2013 18:57:08 +0000 (11:57 -0700)]
[autotest] Fix Cr label of automated bug filing for network3g suites.

The Cr label was incorrectly spelled. It should be Cr-OS-Systems-Mobile
instead of Cr-OS-System-Mobile.

BUG=chromium:240793
TEST=Schedule suite runs with failed tests and check filed bugs for
sensible default labels.

Change-Id: Ibaf585e5208c8fd883e0a2449513ed42e8b97c2f
Reviewed-on: https://gerrit.chromium.org/gerrit/55553
Commit-Queue: Ben Chan <benchan@chromium.org>
Tested-by: Ben Chan <benchan@chromium.org>
Reviewed-by: Prathmesh Prabhu <pprabhu@chromium.org>
6 days ago[autotest] Check host locking on batch most modifications. 27/51227/2
Alex Miller [Tue, 14 May 2013 23:40:02 +0000 (16:40 -0700)]
[autotest] Check host locking on batch most modifications.

If a batch host modify RPC would lock a host that is already locked,
fail hard and do not modify any of the hosts.

BUG=chromium:238025
TEST=restarted apache, modify_hosts now throws ValidationError
DEPLOY=apache

Change-Id: Ia12ba1346743c6b9608ca497ba60cb5cd25e829e
Reviewed-on: https://gerrit.chromium.org/gerrit/51227
Tested-by: Alex Miller <milleral@chromium.org>
Reviewed-by: Tan Gao <tgao@chromium.org>
Commit-Queue: Alex Miller <milleral@chromium.org>

6 days agoBring apache sso config up to the latest requirements. 73/51573/2
Scott Zawalski [Fri, 17 May 2013 11:52:50 +0000 (07:52 -0400)]
Bring apache sso config up to the latest requirements.

Standardize on crt path provided by sso package.
Fix random error messages thrown by sso module.

BUG=chromium:241614
TEST=Tested deployed version.

Change-Id: I5fe1559323ab5e295fa62a2cffd7654b3865ecf2
Reviewed-on: https://gerrit.chromium.org/gerrit/51573
Tested-by: Scott Zawalski <scottz@chromium.org>
Reviewed-by: Richard Barnette <jrbarnette@chromium.org>
Commit-Queue: Scott Zawalski <scottz@chromium.org>
Reviewed-by: Scott Zawalski <scottz@chromium.org>
6 days agolabconfig.py only checks eth0 to find the IP address 87/49687/10
Byron Kubert [Fri, 19 Apr 2013 19:48:49 +0000 (12:48 -0700)]
labconfig.py only checks eth0 to find the IP address

The eth ports may come up with different names. Checking only eth0 crashes
the test when the active ethernet port is called eth1.

Added eth1 to the list of names to check, and added a meaningful error message.

TEST=python *test*.py all pass
BUG=chromium:233816

Change-Id: Icbf40d9c753faee43132f335efb9ed8f766b0a22
Reviewed-on: https://gerrit.chromium.org/gerrit/49687
Reviewed-by: Ben Chan <benchan@chromium.org>
Commit-Queue: Ben Chan <benchan@chromium.org>
Tested-by: Ben Chan <benchan@chromium.org>
6 days agoAdd robustness to the port creation of the devserver. 27/51327/3
Chris Sosa [Wed, 15 May 2013 18:19:18 +0000 (11:19 -0700)]
Add robustness to the port creation of the devserver.

The devserver was really never intended to be rapidly created/destroyed.
Given that this may happen (and that we are doing this more and more as
we scale), we should add robustness around devserver creation because
the port might still be being cleaned up while we are starting a new
omaha server.

This CL just loops around the devserver creation component and cleans
up a little of the code around it.

BUG=chromium:234725
TEST=pylint,pyflakes,running test now.

Change-Id: I6df57222f4fffd1f02e7c7f3fd0b4a5253f7a5f9
Reviewed-on: https://gerrit.chromium.org/gerrit/51327
Commit-Queue: Chris Sosa <sosa@chromium.org>
Reviewed-by: Chris Sosa <sosa@chromium.org>
Tested-by: Chris Sosa <sosa@chromium.org>
6 days agoautotest: Sync times on hosts in new WiFi tests 24/51224/2
Christopher Wiley [Tue, 14 May 2013 23:02:14 +0000 (16:02 -0700)]
autotest: Sync times on hosts in new WiFi tests

Refactor site_wifitest logic to sync times on hosts out to
wifi_test_utils.  Call it from both old and new wifi tests.  Also
removed the site_wifitest method which exposes this to tests.  It had no
uses.

TEST=Ran:
./run_remote_tests.sh --remote=chromeos1-shelf1-host3 check11b
This exercises this code.
BUG=None

Change-Id: I3ee730f9d7b81b7fe361385f5deb6648fdb8f6d6
Reviewed-on: https://gerrit.chromium.org/gerrit/51224
Tested-by: Christopher Wiley <wiley@chromium.org>
Reviewed-by: Paul Stewart <pstew@chromium.org>
Commit-Queue: Christopher Wiley <wiley@chromium.org>

7 days agoautotest: Refactor netperf related WiFi logic into a delegate 18/51418/3
Christopher Wiley [Thu, 16 May 2013 02:20:33 +0000 (19:20 -0700)]
autotest: Refactor netperf related WiFi logic into a delegate

Move netperf related logic from site_wifitest to a delegate object.
This object takes the client and server objects and can decide who
should host and who should act as client for the test.  This delegate
returns a struct representing the results of the test.

While we're here, punch holes in the CrosRouter firewall to let netperf
tests pass.  They didn't before.

BUG=chromium:230660
TEST=network_WiFiMatFunc/034CheckTxAmpdu still passes, and now passes
on stumpy cells.

Change-Id: Ifb1d2620c308acf49da1170b869fa1f47ea6c728
Reviewed-on: https://gerrit.chromium.org/gerrit/51418
Tested-by: Christopher Wiley <wiley@chromium.org>
Reviewed-by: Paul Stewart <pstew@chromium.org>
Commit-Queue: Christopher Wiley <wiley@chromium.org>

7 days agoOmit logging the hwid after a test run if it's not available. 67/50067/4
Dennis Jeffrey [Fri, 3 May 2013 18:22:00 +0000 (11:22 -0700)]
Omit logging the hwid after a test run if it's not available.

After an autotest run, we invoke "crossystem hwid" in order to log
the hwid of the device on which the test ran, as a test keyval.
This value may not always be available (e.g., when running on a VM).

As a result, if "crossystem hwid" fails, we use the output of
a second command -- "crossystem mainfw_type" -- to determine whether
or not we expect "crossystem hwid" to be available.  If the output
of that second command is "nonchrome", then we expect the hwid to
not be available, and we proceed.  Otherwise, the hwid is unexpectedly
missing, and we raise an exception.

BUG=chromium:223728
TEST=Verified on a local test run that if the "crossystem hwid" command
fails, we now either proceed or else raise an exception, depending on
the output of "crossystem mainfw_type".

Change-Id: I52b8e52efe645b20ef558ba0c97326d710c89db5
Reviewed-on: https://gerrit.chromium.org/gerrit/50067
Reviewed-by: Duncan Laurie <dlaurie@chromium.org>
Reviewed-by: Scott Zawalski <scottz@chromium.org>
Commit-Queue: Dennis Jeffrey <dennisjeffrey@chromium.org>
Tested-by: Dennis Jeffrey <dennisjeffrey@chromium.org>
7 days agoIncrease wait time for page to reload in WD router 86/51486/3
Deepak Gopal [Thu, 16 May 2013 18:38:06 +0000 (11:38 -0700)]
Increase wait time for page to reload in WD router
Also update the unittest according to the changes made in the factory.

TEST=None
BUG=chromium:241221

Change-Id: I83b360fbf94c6ae06ec7407678695e44d3880cdd
Reviewed-on: https://gerrit.chromium.org/gerrit/51486
Reviewed-by: Kris Rambish <krisr@chromium.org>
Commit-Queue: Deepak Gopal <deepakg@chromium.org>
Tested-by: Deepak Gopal <deepakg@chromium.org>
7 days agoDisable the medialink AP 04/51504/2
Kris Rambish [Thu, 16 May 2013 21:32:27 +0000 (14:32 -0700)]
Disable the medialink AP

TEST=None
BUG=chromium:241583

Change-Id: I0980ebce1916851cfc92cfc5993c37140c7c3cc1
Reviewed-on: https://gerrit.chromium.org/gerrit/51504
Tested-by: Kris Rambish <krisr@chromium.org>
Reviewed-by: Deepak Gopal <deepakg@chromium.org>
7 days agoRestrict the network3g_pseudomodem suite to R29. 85/51485/2
J. Richard Barnette [Thu, 16 May 2013 18:17:04 +0000 (11:17 -0700)]
Restrict the network3g_pseudomodem suite to R29.

The suite was restricted to >=R28, but it doesn't exist in R28.

BUG=None
TEST=None

Change-Id: If787a6f3ea6da3ef25e1bab595e44b2d745cf80a
Reviewed-on: https://gerrit.chromium.org/gerrit/51485
Reviewed-by: Simran Basi <sbasi@chromium.org>
Commit-Queue: Richard Barnette <jrbarnette@chromium.org>
Tested-by: Richard Barnette <jrbarnette@chromium.org>
7 days agoautotest: Simplify WiFiClient firewall cleanup 06/51406/2
Christopher Wiley [Wed, 15 May 2013 22:49:46 +0000 (15:49 -0700)]
autotest: Simplify WiFiClient firewall cleanup

BUG=None
TEST=./run_remote_tests.sh --remote=chromeos1-shelf1-host3 \
    network_WiFiMatFunc --args='test_pat=034*'
passes, which exercises this code path.

Change-Id: Ib273fe3178ff421f58f2b2a6b0710900a5f66ac9
Reviewed-on: https://gerrit.chromium.org/gerrit/51406
Tested-by: Christopher Wiley <wiley@chromium.org>
Reviewed-by: Paul Stewart <pstew@chromium.org>
Commit-Queue: Christopher Wiley <wiley@chromium.org>

7 days agoautotest: Stop chrome before tarring up PGO data. 00/51200/6
Ahmad Sharif [Tue, 14 May 2013 22:43:04 +0000 (15:43 -0700)]
autotest: Stop chrome before tarring up PGO data.

We are seeing intermittent PGO data corruption that I haven't been able to
reproduce locally. I suspect there is a race condition between tarring up the
profile data and chrome trying to write more profile data.

With this CL, the profiler waits for Chrome to shut down completely before
tarring up the profile.

BUG=chromium:239059
TEST=./run_remote_tests.sh --board=lumpy --remote=172.17.185.164 \
--profiler=pgo PyAutoPerfTests \
--args="--pgo perf.BenchmarkPerfTest.testV8BenchmarkSuite --iterations=1"

Change-Id: I6fa37709cfb64e22cd52258026248accad1b835a
Reviewed-on: https://gerrit.chromium.org/gerrit/51200
Commit-Queue: asharif <asharif@chromium.org>
Reviewed-by: asharif <asharif@chromium.org>
Tested-by: asharif <asharif@chromium.org>
7 days agoAutotest job tags in server-side suites are passed to underlying client jobs. 63/48563/4
Dennis Jeffrey [Thu, 18 Apr 2013 18:18:38 +0000 (11:18 -0700)]
Autotest job tags in server-side suites are passed to underlying client jobs.

This change reverts one part of:

https://gerrit.chromium.org/gerrit/#/c/41318/4

Previously, when a server-side suite invoked a client-side test with
a tag, that tag would be passed to the client job and appended to the
name of the client-side test.  For example, control.power_daily
invokes power_LoadTest multiple times with different tags.  This
would lead to tests with different names, such as "power_LoadTest.WIFI_1hr"
and "power_LoadTest.WIRED_1hr".

After the above CL was submitted, the tags were instead passed to the
server job, not to the client jobs.  This resulted in the tags _not_
being appended to the client-side test names, meaning that we could
no longer use the test names (with tags) to distinguish test results
from different invocations of the same client-side test.

In the current change, that tags are instead passed to the underlying
client jobs as before, so the tag can be appended to the names of the
invoked client-side tests.

BUG=chromium:227172
TEST=Modified control.power_daily to invoke the "sleeptest"
client-side test with different tags, and verified that the resulting
test names _do_ include the tag with this change, but don't include
the tags without this change.

Change-Id: I44581ea84e990995aa6323e9cb517419b5e3c70e
Reviewed-on: https://gerrit.chromium.org/gerrit/48563
Reviewed-by: Andrew Bresticker <abrestic@chromium.org>
Reviewed-by: Scott Zawalski <scottz@chromium.org>
Commit-Queue: Dennis Jeffrey <dennisjeffrey@chromium.org>
Tested-by: Dennis Jeffrey <dennisjeffrey@chromium.org>
7 days agoautotest: Fix crasher in site_wifitest 10/51410/3
Christopher Wiley [Thu, 16 May 2013 02:32:35 +0000 (19:32 -0700)]
autotest: Fix crasher in site_wifitest

save_stats was recently removed from WiFiClient but apparently not from
all callsites.  This causes site_wifitest to crash during test cleanup.

BUG=None
TEST=network_WiFiMatFunc/034* passes again

Change-Id: Ia00c70c78daf3d08bf8cfe8f4398788bd24d518e
Reviewed-on: https://gerrit.chromium.org/gerrit/51410
Tested-by: Christopher Wiley <wiley@chromium.org>
Reviewed-by: Paul Stewart <pstew@chromium.org>
Commit-Queue: Christopher Wiley <wiley@chromium.org>

7 days agoRemove accidental uncommenting of site-sso-directives. 66/51466/2
Scott Zawalski [Thu, 16 May 2013 13:49:15 +0000 (09:49 -0400)]
Remove accidental uncommenting of site-sso-directives.

TEST=None
BUG=None

Change-Id: Ic4de9660d1809f3243dedb5a6ec51bdd35d747f7
Reviewed-on: https://gerrit.chromium.org/gerrit/51466
Reviewed-by: Scott Zawalski <scottz@chromium.org>
Tested-by: Scott Zawalski <scottz@chromium.org>
7 days agoRemove mod-python in favor of mod-wsgi. 56/50656/8
Scott Zawalski [Thu, 9 May 2013 14:42:27 +0000 (10:42 -0400)]
Remove mod-python in favor of mod-wsgi.

mod-python has been deprecated for a while and our current distro of
Django doesn't support it anymore. Moving us to use wsgi completely.

Pull in bits from:
https://github.com/autotest/autotest/commit/ee3cced1afb6bc45216c7038472827ad4033c3f5

Pull in change to db/backends/afe/base.py to fixes readonly db
connection issues.

TEST=setup_dev_autotest.sh and moved our development server to
modpython.
BUG=chromium:217194

Change-Id: Ic3306700e07c7000b2451a576554810d8a6bf7f2
Reviewed-on: https://gerrit.chromium.org/gerrit/50656
Tested-by: Scott Zawalski <scottz@chromium.org>
Reviewed-by: Simran Basi <sbasi@chromium.org>
Commit-Queue: Scott Zawalski <scottz@chromium.org>
Reviewed-by: Scott Zawalski <scottz@chromium.org>
7 days agoLog remote SSH process error 38/51438/2
Vic Yang [Thu, 16 May 2013 08:11:19 +0000 (16:11 +0800)]
Log remote SSH process error

Currently if the remote SSH process dies, the error only comes from
client not coming up. In this case, we lose the log from the SSH
process. Let's log it so that it's easier to debug.

BUG=None
TEST=Kill SSH process and see "Killed by signal 15" log.

Change-Id: I3fdc7e80ffaa1b0c684277eb9e54c134ec7dd954
Signed-off-by: Vic Yang <victoryang@chromium.org>
Reviewed-on: https://gerrit.chromium.org/gerrit/51438
Reviewed-by: Tom Wai-Hong Tam <waihong@chromium.org>
7 days agoRaise TestNAError for tests requiring not supported EC functions 97/51297/2
Vic Yang [Wed, 15 May 2013 13:06:57 +0000 (21:06 +0800)]
Raise TestNAError for tests requiring not supported EC functions

TestNAError is more descriptive and suitable in this case. Let's raise
it instead of current TestError.

BUG=None
TEST=Run firmware_FwScreenLidClose on Spring and see TestNA.

Change-Id: Id8c21792a6a159ebb57f9805adec277141f81d40
Signed-off-by: Vic Yang <victoryang@chromium.org>
Reviewed-on: https://gerrit.chromium.org/gerrit/51297
Reviewed-by: Tom Wai-Hong Tam <waihong@chromium.org>
8 days agoIgnore requests to stop services that don't exist on a platform. 54/51254/2
Todd Broch [Wed, 15 May 2013 05:04:18 +0000 (22:04 -0700)]
Ignore requests to stop services that don't exist on a platform.

Some platforms don't support certain services.  For example, parrot
does not have bluetooth and therefore no bluetoothd service.  Change
allows system call to upstart ( 'stop <service>' ) to fail gracefully
instead of causing an exception.

BUG=chrome-os-partner:18931
TEST=run power_Consumption on parrot

Change-Id: Iaf0e84dc41615aee5316c7e0fc59ea0ea7329182
Reviewed-on: https://gerrit.chromium.org/gerrit/51254
Reviewed-by: Sameer Nanda <snanda@chromium.org>
Reviewed-by: Mohammed Habibulla <moch@chromium.org>
Commit-Queue: Todd Broch <tbroch@chromium.org>
Tested-by: Todd Broch <tbroch@chromium.org>
8 days ago[autotest] Enable automated bug filing for network3g related suites. 66/51166/2
Prathmesh Prabhu [Tue, 14 May 2013 20:10:19 +0000 (13:10 -0700)]
[autotest] Enable automated bug filing for network3g related suites.

Enabled automated bug filing for network3g, network3g_gobi,
network3g_pseudomoden, network3g_tmobile, network3g_verizon suites.

BUG=chromium:240793
TEST=Schedule suite runs with failed tests and check filed bugs for
sensible default labels.

Change-Id: Ia2961f3d19dc5ca357a6eb699ed25ff60479c0e6
Reviewed-on: https://gerrit.chromium.org/gerrit/51166
Reviewed-by: Prashanth Balasubramanian <beeps@chromium.org>
Commit-Queue: Prathmesh Prabhu <pprabhu@chromium.org>
Tested-by: Prathmesh Prabhu <pprabhu@chromium.org>
8 days agopseudomodem: Clearing bearers should remove them from DBus connection. 59/51159/4
Arman Uguray [Tue, 14 May 2013 05:10:50 +0000 (22:10 -0700)]
pseudomodem: Clearing bearers should remove them from DBus connection.

Bearers will now get properly removed from the DBus connection when the
pseudomodem is reset. Also fixed bug involving Ip4Config/Ip6Config
property of bearer.

BUG=chromium:240598
TEST=network_3GSmokeTest.pseudomodem should pass.

Change-Id: I96ae164ee01514ffe10c0db70593705314c050ac
Reviewed-on: https://gerrit.chromium.org/gerrit/51159
Commit-Queue: Arman Uguray <armansito@chromium.org>
Reviewed-by: Arman Uguray <armansito@chromium.org>
Tested-by: Arman Uguray <armansito@chromium.org>
8 days agocellular: Run network_3GDisableWhileConnecting.pseudomodem on CDMA. 99/51199/3
Arman Uguray [Tue, 14 May 2013 22:36:22 +0000 (15:36 -0700)]
cellular: Run network_3GDisableWhileConnecting.pseudomodem on CDMA.

Modified control.pseudomodem to run the test first on 3GPP, followed by
CDMA.

BUG=chromium:240412,chromium:240015
TEST=Running network_3GDisableWhileConnecting/control.pseudomodem should
pass.

Change-Id: Iea87607a689ac5cc5c22e4f6c03e0a6cf8b3f327
Reviewed-on: https://gerrit.chromium.org/gerrit/51199
Commit-Queue: Arman Uguray <armansito@chromium.org>
Reviewed-by: Arman Uguray <armansito@chromium.org>
Tested-by: Arman Uguray <armansito@chromium.org>
8 days agocellular: Run network_3GFailedConnect.pseudomodem on a CDMA modem. 96/51196/5
Arman Uguray [Tue, 14 May 2013 21:48:41 +0000 (14:48 -0700)]
cellular: Run network_3GFailedConnect.pseudomodem on a CDMA modem.

Modified control.pseudomodem to run the test once on a fake 3GPP modem
and once on a fake CDMA modem.

BUG=chromium:240417,chromium:240015
TEST=Running network_3GFailedConnect/control.pseudomodem should pass.

Change-Id: I6bbd3042d5a4a3720554a74ab53187e1d8bd1edb
Reviewed-on: https://gerrit.chromium.org/gerrit/51196
Reviewed-by: Arman Uguray <armansito@chromium.org>
Tested-by: Arman Uguray <armansito@chromium.org>
Commit-Queue: Arman Uguray <armansito@chromium.org>

8 days agocellular: Run network_3GModemControl.pseudomodem on a CDMA modem. 89/51089/2
Arman Uguray [Tue, 14 May 2013 04:40:17 +0000 (21:40 -0700)]
cellular: Run network_3GModemControl.pseudomodem on a CDMA modem.

Modified control.pseudomodem to run the test first on a fake 3GPP modem
and then on a fake CDMA modem.

BUG=chromium:240419,chromium:240015
CQ-DEPEND=Id9d974c29f73dff66fa5355d3c572bf467d12fe6
TEST=Running network_3GModemControl/control.pseudomodem should pass.

Change-Id: I3aea76d4ac7990e5ecb7a8f69dbdb0f1626fa172
Reviewed-on: https://gerrit.chromium.org/gerrit/51089
Reviewed-by: Thieu Le <thieule@chromium.org>
Commit-Queue: Arman Uguray <armansito@chromium.org>
Tested-by: Arman Uguray <armansito@chromium.org>
8 days agoplatform_DebugDaemonGetPerfData: Report zipped data sizes 56/51156/3
Simon Que [Fri, 3 May 2013 17:33:58 +0000 (10:33 -0700)]
platform_DebugDaemonGetPerfData: Report zipped data sizes

The actual data may be zipped when uploaded.  So report both unzipped
and zipped protobuf sizes.

BUG=chromium:237399
TEST=autotest passes

Change-Id: I7fe28f767438421f40e441b6b478fe013360b29c
Signed-off-by: Simon Que <sque@chromium.org>
Reviewed-on: https://gerrit.chromium.org/gerrit/51156
Reviewed-by: asharif <asharif@chromium.org>
8 days agoautotest: Run wifi_matfunc nightly 71/51071/4
Christopher Wiley [Tue, 14 May 2013 00:24:47 +0000 (17:24 -0700)]
autotest: Run wifi_matfunc nightly

TEST=None
BUG=None

Change-Id: Idb4f51856bde41c8ae70a78258ab92c63c4e8843
Reviewed-on: https://gerrit.chromium.org/gerrit/51071
Reviewed-by: Christopher Wiley <wiley@chromium.org>
Tested-by: Christopher Wiley <wiley@chromium.org>
8 days agoplatform_GesturesRegressionTest: add spring 68/51268/2
Chung-yih Wang [Wed, 15 May 2013 05:28:08 +0000 (13:28 +0800)]
platform_GesturesRegressionTest: add spring

Also use mapping dictionary instead of several 'if' statements for platform name.

BUG=none
TEST=run_remote_tests --remote=xxx platform_GesturesRegressionTest on spring

Change-Id: I9c30a17add00d29276a77d5e7f07236bc3897538
Reviewed-on: https://gerrit.chromium.org/gerrit/51268
Reviewed-by: Joseph Shyh-In Hwang <josephsih@chromium.org>
Commit-Queue: Chung-yih Wang <cywang@chromium.org>
Tested-by: Chung-yih Wang <cywang@chromium.org>
8 days agoaudio_helper: Fix audio tests for utility change 74/51274/2
Hsin-Yu Chao [Wed, 15 May 2013 08:13:21 +0000 (16:13 +0800)]
audio_helper: Fix audio tests for utility change

Pass correct argument to all occurrence of loopback_test_channels
in factory/audio tests. The function now accepts file name
instead of file object.

BUG=chrome-os-partner:19480
TEST=Manual run factory_AudioLoop test

Change-Id: I501571fe37498c808c122bbd7e7a0c7c273f5f11
Reviewed-on: https://gerrit.chromium.org/gerrit/51274
Reviewed-by: Ricky Liang <jcliang@chromium.org>
Commit-Queue: Hsinyu Chao <hychao@chromium.org>
Tested-by: Hsinyu Chao <hychao@chromium.org>
8 days ago[autotest] add a directAFE class which bypasses rpc calls 83/50383/6
Aviv Keshet [Tue, 7 May 2013 21:03:14 +0000 (14:03 -0700)]
[autotest] add a directAFE class which bypasses rpc calls

This CL adds a directAFE object which inherits from frontend.AFE, but
which replaces the underlying RpcClient.run function (responsible for
turning AFE calls into RPC calls) into a function that just makese
direct calls to rpc_interface and site_rpc_interface, bypassing RPC
process. This is desirable in places like test_that, which use an
in-memory process-local sqlite database to back a local afe.

BUG=chromium:236471
TEST=unit tests

Change-Id: Ib89a28be9ebc6f5c4e6ff93a08721ac63ab8b377
Reviewed-on: https://gerrit.chromium.org/gerrit/50383
Commit-Queue: Aviv Keshet <akeshet@chromium.org>
Reviewed-by: Aviv Keshet <akeshet@chromium.org>
Tested-by: Aviv Keshet <akeshet@chromium.org>
8 days ago[autotest] Clarify django ImproperlyConfigured exception. 01/50901/4
Aviv Keshet [Thu, 9 May 2013 20:31:46 +0000 (13:31 -0700)]
[autotest] Clarify django ImproperlyConfigured exception.

If a developer imports a django models or django models dependent module
before importing one of the django setup modules, they get a slightly
cryptic ImproperlyConfigured exception from Django which doesn't point
them in the direction of our existing django setup modules. This CL
catches the exception and rethrows it as a more descriptive one.

BUG=None
TEST=From interactive python session, import common, then import
direct_afe without first importing one of the the db setup modules. See
clearer exception message.

Change-Id: I397bbd1d3762b9cba0f4f6203c6b73a5d8de9212
Reviewed-on: https://gerrit.chromium.org/gerrit/50901
Commit-Queue: Aviv Keshet <akeshet@chromium.org>
Reviewed-by: Aviv Keshet <akeshet@chromium.org>
Tested-by: Aviv Keshet <akeshet@chromium.org>
8 days ago[autotest] add lightweight django setup for use in test_that 10/50210/8
Aviv Keshet [Sun, 5 May 2013 05:40:17 +0000 (22:40 -0700)]
[autotest] add lightweight django setup for use in test_that

BUG=chromium:236471
TEST=new unit test, ensure that jobs can be added to django_lite db

Change-Id: I340934126f46e8158dd80b4727e6d54f856787dd
Reviewed-on: https://gerrit.chromium.org/gerrit/50210
Commit-Queue: Aviv Keshet <akeshet@chromium.org>
Reviewed-by: Aviv Keshet <akeshet@chromium.org>
Tested-by: Aviv Keshet <akeshet@chromium.org>
8 days agoFix video_YouTubeHTML5 test 73/51073/6
Rohit Makasana [Tue, 14 May 2013 00:45:21 +0000 (17:45 -0700)]
Fix video_YouTubeHTML5 test

BUG=chromium:238020
TEST=ran it manually

Change-Id: I93371ec07143e6193edb586dce888058352489b8
Reviewed-on: https://gerrit.chromium.org/gerrit/51073
Commit-Queue: Rohit Makasana <rohitbm@chromium.org>
Reviewed-by: Rohit Makasana <rohitbm@chromium.org>
Tested-by: Rohit Makasana <rohitbm@chromium.org>
8 days agoFixed pkcs11-tool and cryptohome locations to rely on $PATH. 77/51177/3
Darren Krahn [Tue, 14 May 2013 20:59:25 +0000 (13:59 -0700)]
Fixed pkcs11-tool and cryptohome locations to rely on $PATH.

The pkcs11-tool is now installed as a dependency of chromeos-test and
will be in /usr/local.

BUG=chromium:237658
TEST=platform_Pkcs11InitOnLogin autotest

Change-Id: I035b065a19a9a2c9e9429602bf9c4ae578ff53b6
Reviewed-on: https://gerrit.chromium.org/gerrit/51177
Reviewed-by: Chris Masone <cmasone@chromium.org>
Commit-Queue: Darren Krahn <dkrahn@chromium.org>
Tested-by: Darren Krahn <dkrahn@chromium.org>
8 days agoUpdated the test PCA URL and added a name for the certified key. 93/51193/2
Darren Krahn [Wed, 10 Apr 2013 01:25:17 +0000 (18:25 -0700)]
Updated the test PCA URL and added a name for the certified key.

BUG=None
TEST=Ran the test

Change-Id: I8ad72e9974a8de2f097163894fee228450240ee9
Reviewed-on: https://gerrit.chromium.org/gerrit/51193
Reviewed-by: David Yu <davidyu@chromium.org>
Tested-by: Darren Krahn <dkrahn@chromium.org>
Commit-Queue: Darren Krahn <dkrahn@chromium.org>

8 days ago[autotest] actually fix my previous refactoring error 38/51238/2
Aviv Keshet [Wed, 15 May 2013 01:30:56 +0000 (18:30 -0700)]
[autotest] actually fix my previous refactoring error

Duh. "!=" != "=="

BUG=chromium:240643
TEST=Run smoke suite on my local autotest, and it in fact works.
DEPLOY=scheduler

Change-Id: If0bf765dcf60cb5fed512b0a5ac582f02b0677ba
Reviewed-on: https://gerrit.chromium.org/gerrit/51238
Tested-by: Aviv Keshet <akeshet@chromium.org>
Reviewed-by: Prashanth Balasubramanian <beeps@chromium.org>
9 days ago[autotest] fix one missing refactor to control_data.CONTROL_TYPE 34/51234/2
Aviv Keshet [Wed, 15 May 2013 00:52:33 +0000 (17:52 -0700)]
[autotest] fix one missing refactor to control_data.CONTROL_TYPE

This somehow slipped between the cracks in my previous refactor CL

BUG=chromium:240643
TEST=Unit tests.
DEPLOY=scheduler

Change-Id: Ic0f5110e965e38ec0253d6b18aed0576db175aba
Reviewed-on: https://gerrit.chromium.org/gerrit/51234
Reviewed-by: Alex Miller <milleral@chromium.org>
Tested-by: Aviv Keshet <akeshet@chromium.org>
Commit-Queue: Aviv Keshet <akeshet@chromium.org>
Reviewed-by: Aviv Keshet <akeshet@chromium.org>
9 days ago[autotest] make a consistent CONTROL_TYPE enum across the codebase 91/51191/5
Aviv Keshet [Tue, 14 May 2013 00:36:04 +0000 (17:36 -0700)]
[autotest] make a consistent CONTROL_TYPE enum across the codebase

Prior to this CL, there were a multitude of duplicate defitions of the
two control files types (Client or Server), incluiding a difference
between the afe Job model (1 = Server) and the afe Test model (1 =
Client). This CL introduces enums CONTROL_TYPE and CONTROL_TYPE_NAMES to
control_data, to act as the central and consistent defition across the
codebase. In order to avoid needing to mangle the running Jobs table, we
have adopted the existing Job model convention (1 = Server); the Test
table will be re-written with the new consistent convention during test
import.

BUG=chromium:240643
TEST=All existing unit tests pass;
In local autotest without this patch applied, started a suite. Halfway
through suite, applied this patch, ran test importer, restarted apache,
and restarted scheduler. Suite finished successfully.
Verified manually that Client/Server type control files show up
correctly in afe Create Job view.
DEPLOY=scheduler
DEPLOY=apache
DEPLOY=test_importer

Change-Id: Ia5b2573e1d08d96b3826f2837903ef407dcae303
Reviewed-on: https://gerrit.chromium.org/gerrit/51191
Commit-Queue: Aviv Keshet <akeshet@chromium.org>
Reviewed-by: Aviv Keshet <akeshet@chromium.org>
Tested-by: Aviv Keshet <akeshet@chromium.org>
9 days agocellular: Run network_3GDisconnectFailure on a CDMA modem. 79/51179/3
Arman Uguray [Tue, 14 May 2013 20:21:10 +0000 (13:21 -0700)]
cellular: Run network_3GDisconnectFailure on a CDMA modem.

Modified the control file two run the test once on a 3GPP and once on a
CDMA modem.

BUG=chromium:240416,chromium:240015
TEST=Running network_3GDisconnectFailure should pass.

Change-Id: I537b823ae316c0825797fbdbe4d64cf8f9e08e93
Reviewed-on: https://gerrit.chromium.org/gerrit/51179
Reviewed-by: Thieu Le <thieule@chromium.org>
Commit-Queue: Arman Uguray <armansito@chromium.org>
Tested-by: Arman Uguray <armansito@chromium.org>
9 days agoautotest: Migrate network_WiFiMatFunc/020CheckWMM to new framework 98/51198/2
Christopher Wiley [Mon, 13 May 2013 23:56:43 +0000 (16:56 -0700)]
autotest: Migrate network_WiFiMatFunc/020CheckWMM to new framework

Add support for forcing WMM on/off on a router.  Fix a problem with
parsing ping arguments, and fix some style issues with quotation marks.
Be more strict about parsing QoS parameters to ping, since this is the
only place where we use this parameter, and it does so correctly.  We
can safely assert that all new uses of this parameter should be correct
or the proper usage updated.

TEST=This is a test, it passes on snow and lumpy.
BUG=chromium:230660

Change-Id: Idf4b75591b2af0cacdaa8ddff1e718b358e6be25
Reviewed-on: https://gerrit.chromium.org/gerrit/51198
Tested-by: Christopher Wiley <wiley@chromium.org>
Reviewed-by: Paul Stewart <pstew@chromium.org>
Commit-Queue: Christopher Wiley <wiley@chromium.org>

9 days ago[autotest] reenable django or simplejson requiring unit tests 90/51190/5
Aviv Keshet [Tue, 14 May 2013 18:13:55 +0000 (11:13 -0700)]
[autotest] reenable django or simplejson requiring unit tests

For a refactor of control_type, a lot of the relevant unit test coverage
is currently blacklisted in utils/unittest_suite.py due to requiring
Django or simplejson.

This CL un-blacklists those tests. It also therefore
fixes a few tests which are failing or broken. In particular:

tko/rpc_interface_unittest was throwing
`DatabaseError: only a single result allowed for a SELECT that is
part of an expression` all over the place. I couldn't blacklist just
this test file, since it has the same filename as
afe/rpc_interface_unittest.py which we do not want to blacklist and with
the way blacklists work in utils/unittest_suite I couldn't blacklist
just one of them. Instead, I have renamed the broken test file to
rpc_interface_unittest_fixme.py. tko/resources_test imports this failing
module, so I had to rename that one too.

One test in resources_test was throwing the same excepiion as above, so
I commented it out. (test_keyval_filtering)

in monitor_db_unittest, the test
test_HostScheduler_get_host_atomic_group_id throws KeyErrors that seem
to be related to labels not being correctly set up or committed to the
test database in the test setup phase. After trying to blindly track
this down a bit, I realized I was in over my head and just commented out
this specific test).

monitor_db_functional_test was throwing
`DatabaseError: near "TRUNCATE": syntax error` all over the place, so I
blacklisted that test file in utils/unittest_suite.py

BUG=chromium:240643
TEST=utils/unittest_suite.py # All tests pass
Change-Id: I8fdbe048b04516548e96bd888ed74e9fc82a2d88
Reviewed-on: https://gerrit.chromium.org/gerrit/51190
Commit-Queue: Aviv Keshet <akeshet@chromium.org>
Reviewed-by: Aviv Keshet <akeshet@chromium.org>
Tested-by: Aviv Keshet <akeshet@chromium.org>
9 days agoDelete BluetoothUIXSS from autotest, replaced by browser_test 12/51012/2
Jim Hebert [Mon, 13 May 2013 19:39:51 +0000 (12:39 -0700)]
Delete BluetoothUIXSS from autotest, replaced by browser_test

BUG=chromium:232942
TEST=none

Change-Id: I8ea893b08c1513e5838e12ab5213f94ae345f6e0
Reviewed-on: https://gerrit.chromium.org/gerrit/51012
Reviewed-by: Kevin Ellis <kevers@chromium.org>
Reviewed-by: Jorge Lucangeli Obes <jorgelo@chromium.org>
Commit-Queue: Jim Hebert <jimhebert@chromium.org>
Tested-by: Jim Hebert <jimhebert@chromium.org>
9 days agoautotest: Migrate 090_BgScanBackoff to new WiFi test framework 07/50907/5
Christopher Wiley [Fri, 10 May 2013 20:29:37 +0000 (13:29 -0700)]
autotest: Migrate 090_BgScanBackoff to new WiFi test framework

While here, observe that assert_ping_similarity() is only used for this
test and that belongs in the test rather that in WiFiClient.  Use
blocking ping calls rather than background ping calls since this makes
the test lab team happier.

TEST=Test runs, stats are compared.
BUG=chromium:230660

CQ-DEPEND=CL:50905

Change-Id: I96944d9988bd1af85c6ad5dcce53c50569cb5b94
Reviewed-on: https://gerrit.chromium.org/gerrit/50907
Tested-by: Christopher Wiley <wiley@chromium.org>
Reviewed-by: Paul Stewart <pstew@chromium.org>
Commit-Queue: Christopher Wiley <wiley@chromium.org>

9 days agoCreate new suite for faft lab testing. 07/51007/2
Yusuf Mohsinally [Mon, 13 May 2013 18:13:56 +0000 (11:13 -0700)]
Create new suite for faft lab testing.

This is a temporary suite aimed at working through issues of getting
faft running in the lab. It is not meant to test devices themselves.

BUG=None
TEST=Ran run_remote_tests.sh with suite:faft_lab

Change-Id: Ic5e8b7cfed610e0c881157490935f85f65b790b6
Reviewed-on: https://gerrit.chromium.org/gerrit/51007
Commit-Queue: Yusuf Mohsinally <mohsinally@google.com>
Tested-by: Yusuf Mohsinally <mohsinally@google.com>
Reviewed-by: Kris Rambish <krisr@chromium.org>
9 days agoRevert "Provide an AP for wiley that he can use." 86/50986/2
Christopher Wiley [Mon, 13 May 2013 16:26:18 +0000 (09:26 -0700)]
Revert "Provide an AP for wiley that he can use."

This reverts commit c8cbcb00cf63bdddb035c8eaa1322d8a875e91a4

Change-Id: I07a388cf700f0f15f84b80c884dbda2377c625f6
Reviewed-on: https://gerrit.chromium.org/gerrit/50986
Commit-Queue: Christopher Wiley <wiley@chromium.org>
Reviewed-by: Christopher Wiley <wiley@chromium.org>
Tested-by: Christopher Wiley <wiley@chromium.org>
Reviewed-by: Kris Rambish <krisr@chromium.org>
9 days agoAdding is_visibility_supported method to ap configurator 24/50724/2
Bimal [Thu, 9 May 2013 23:04:09 +0000 (16:04 -0700)]
Adding is_visibility_supported method to ap configurator
Check if the AP supports visibility before setting it

Test=None
Bug=chromium: 232211

Change-Id: Ic363e441484d70032bbafc1331fd9b2296952b44
Reviewed-on: https://gerrit.chromium.org/gerrit/50724
Reviewed-by: Kris Rambish <krisr@chromium.org>
Commit-Queue: Bimal Gadhavi <bgadhavi@chromium.org>
Reviewed-by: Bimal Gadhavi <bgadhavi@chromium.org>
Tested-by: Bimal Gadhavi <bgadhavi@chromium.org>
9 days agoAdding audio stress with suspend/resume. 15/50015/8
Rohit Makasana [Fri, 3 May 2013 02:02:15 +0000 (19:02 -0700)]
Adding audio stress with suspend/resume.

BUG=chromium:237592
TEST=ran it on 4 machines

Change-Id: I0309a4d281205a7855d8eb8e3fbab9abbc87fd7e
Reviewed-on: https://gerrit.chromium.org/gerrit/50015
Reviewed-by: Hsinyu Chao <hychao@chromium.org>
Commit-Queue: Rohit Makasana <rohitbm@chromium.org>
Reviewed-by: Rohit Makasana <rohitbm@chromium.org>
Tested-by: Rohit Makasana <rohitbm@chromium.org>
9 days agocellular: Run network_3GStressEnable.pseudomodem against a CDMA modem. 64/51064/4
Arman Uguray [Mon, 13 May 2013 22:58:50 +0000 (15:58 -0700)]
cellular: Run network_3GStressEnable.pseudomodem against a CDMA modem.

Modified control.pseudomodem to run the test once on 3GPP and once on
CDMA.

BUG=chromium:240424,chromium:240015
TEST=Running network_3GStressEnable/control.pseudomodem should pass.

Change-Id: Ifb1839ec3a3b453097feb96e2aadc1cdd3386b5b
Reviewed-on: https://gerrit.chromium.org/gerrit/51064
Commit-Queue: Arman Uguray <armansito@chromium.org>
Reviewed-by: Arman Uguray <armansito@chromium.org>
Tested-by: Arman Uguray <armansito@chromium.org>
9 days agocellular: Run network_3GModemPresent.pseudomodem on a CDMA modem. 72/51072/4
Arman Uguray [Tue, 14 May 2013 00:34:05 +0000 (17:34 -0700)]
cellular: Run network_3GModemPresent.pseudomodem on a CDMA modem.

Modified control.pseudomodem to run the test once on a 3GPP and once on
a CDMA modem.

BUG=chromium:240421,chromium:240015
TEST=Running network_3GModemPresent/control.pseudomodem should pass.

Change-Id: I4e45ec7b29b8db4ebb513feb53b4359f6dac1c69
Reviewed-on: https://gerrit.chromium.org/gerrit/51072
Commit-Queue: Arman Uguray <armansito@chromium.org>
Reviewed-by: Arman Uguray <armansito@chromium.org>
Tested-by: Arman Uguray <armansito@chromium.org>
9 days ago[autotest] Adds chrome version strings to autofiled bugs. 79/50579/7
beeps [Thu, 9 May 2013 04:49:48 +0000 (21:49 -0700)]
[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>

9 days agocellular: Run network_3GSafetyDance.pseudomodem with CDMA modem. 69/51069/4
Arman Uguray [Mon, 13 May 2013 23:42:18 +0000 (16:42 -0700)]
cellular: Run network_3GSafetyDance.pseudomodem with CDMA modem.

Made control.pseudomodem run the test once on a 3GPP modem and once on a
CDMA modem.

BUG=chromium:240422,chromium:240015
TEST=Running network_3GSafetyDance/control.pseudomodem should pass.

Change-Id: I2b211902763af3ace0ce4665ea074dce864c8ef0
Reviewed-on: https://gerrit.chromium.org/gerrit/51069
Commit-Queue: Arman Uguray <armansito@chromium.org>
Reviewed-by: Arman Uguray <armansito@chromium.org>
Tested-by: Arman Uguray <armansito@chromium.org>
9 days agoAdd autotest for session_manager RetrieveActiveSessions() 95/50895/2
Chris Masone [Fri, 10 May 2013 19:29:47 +0000 (12:29 -0700)]
Add autotest for session_manager RetrieveActiveSessions()

I've added a new DBus method to session_manager to return a dict of currently
active sessions.  This test exercises it.

CQ-DEPEND=I315ee1cecea7c8af6df9968b569a084381ea9167

BUG=chromium:239830
TEST=run this new test

Change-Id: I08959e69845996c345ef85362847370420697801
Reviewed-on: https://gerrit.chromium.org/gerrit/50895
Tested-by: Chris Masone <cmasone@chromium.org>
Reviewed-by: Nikita Kostylev <nkostylev@chromium.org>
Commit-Queue: Chris Masone <cmasone@chromium.org>