chromiumos/platform/factory.git
13 months agoMinijack: Change style of static file in template 28/65828/4 master
Pi-Hsun Shih [Wed, 14 Aug 2013 08:52:16 +0000 (16:52 +0800)]
Minijack: Change style of static file in template

Use the way that Django recommend in 1.5.

BUG=None
TEST=Start minijack frontend, check everything still works.

Change-Id: Ie0d222ba6040c187cf114da4031cb7e7828bda83
Reviewed-on: https://gerrit.chromium.org/gerrit/65828
Commit-Queue: Pi-Hsun Shih <pihsun@chromium.org>
Reviewed-by: Pi-Hsun Shih <pihsun@chromium.org>
Tested-by: Pi-Hsun Shih <pihsun@chromium.org>
14 months agoFixed exception when no config is found 97/66297/4
Chun-Yen Ho [Tue, 20 Aug 2013 02:32:17 +0000 (10:32 +0800)]
Fixed exception when no config is found

When --board is set, miniomaha.conf is not required. Thus we should import
config after first update check.

BUG=chrome-os-partner:20735
TEST=Singal machine manual test

Change-Id: If509140b579f1d7f8f1494c158d60f305ccb28b6
Reviewed-on: https://gerrit.chromium.org/gerrit/66297
Reviewed-by: Hung-Te Lin <hungte@chromium.org>
Tested-by: Chun-Yen Ho <chho@chromium.org>
Commit-Queue: Chun-Yen Ho <chho@chromium.org>

14 months agoFix exception when --board is not set. 96/66296/4
Chun-Yen Ho [Tue, 20 Aug 2013 02:09:14 +0000 (10:09 +0800)]
Fix exception when --board is not set.

In auto update mode, if --board is not set, an error will occur.

BUG=chrome-os-partner:20735
TEST=Singal machine manual test
Change-Id: Ic2029932a1ef21466e27c52975d35743bc75bf16
Reviewed-on: https://gerrit.chromium.org/gerrit/66296
Reviewed-by: Hung-Te Lin <hungte@chromium.org>
Tested-by: Chun-Yen Ho <chho@chromium.org>
Commit-Queue: Chun-Yen Ho <chho@chromium.org>

14 months agofactory: Change old flashrom host selection syntax to new format. 02/65802/2
Hung-Te Lin [Wed, 14 Aug 2013 03:23:19 +0000 (11:23 +0800)]
factory: Change old flashrom host selection syntax to new format.

The host selection (-p internal:bus={spi,lpc}) is deprecated because we have EC
on SPI. New syntax is -p {host,ec}.

BUG=none
TEST=manually performed factory tests.

Change-Id: Ifcab2a301d050323983e994b539bc66f4f32d0ca
Reviewed-on: https://gerrit.chromium.org/gerrit/65802
Tested-by: Hung-Te Lin <hungte@chromium.org>
Reviewed-by: Yung-Chieh Lo <yjlou@chromium.org>
Commit-Queue: David Hendricks <dhendrix@chromium.org>
Reviewed-by: David Hendricks <dhendrix@chromium.org>
14 months agosysfs_battery: add checks for battery health and cycles 85/66285/2
Bernie Thompson [Tue, 20 Aug 2013 00:13:33 +0000 (17:13 -0700)]
sysfs_battery: add checks for battery health and cycles

In some cases we may want to verify that the battery health is good and
that the battery has only undergone up to a maximum number of charge
discharge cycles. This adds in arguments and logic to make those
checks.

BUG=chrome-os-partner:21928
TEST=Manual, run with test list entries with and without the new args.

Change-Id: Ic9ae83510f1d6d14b33a15980474879605164d62
Reviewed-on: https://gerrit.chromium.org/gerrit/66285
Reviewed-by: Vic Yang <victoryang@chromium.org>
Tested-by: Bernie Thompson <bhthompson@chromium.org>
Commit-Queue: Bernie Thompson <bhthompson@chromium.org>

14 months agosysfs_battery: add more stats to the log 52/66252/2
Bernie Thompson [Mon, 19 Aug 2013 22:09:00 +0000 (15:09 -0700)]
sysfs_battery: add more stats to the log

We may want to track additional battery information in the log, so
we can add it to this test.

BUG=chrome-os-partner:21928
TEST=Manual, run sysfs_battery from a test list and observe the output log.

Change-Id: I9c2ec4195612db7ec7febab7a401d2e4e004ad9f
Reviewed-on: https://gerrit.chromium.org/gerrit/66252
Reviewed-by: Shawn Nematbakhsh <shawnn@chromium.org>
Reviewed-by: Vic Yang <victoryang@chromium.org>
Tested-by: Bernie Thompson <bhthompson@chromium.org>
Commit-Queue: Bernie Thompson <bhthompson@chromium.org>

14 months agoAutomation: Able to specify vmlinux image. 47/65947/2
Chinyue Chen [Thu, 15 Aug 2013 08:16:18 +0000 (16:16 +0800)]
Automation: Able to specify vmlinux image.

BUG=chrome-os-partner:21944
TEST=Manual run run_factory_flow.py with vmlinux specified.

Change-Id: Iad032fff9eebe7d3a34ddb348cba09a897a3d76d
Reviewed-on: https://gerrit.chromium.org/gerrit/65947
Reviewed-by: Bowgo Tsai <bowgotsai@chromium.org>
Tested-by: Chinyue Chen <chinyue@chromium.org>
Commit-Queue: Chinyue Chen <chinyue@chromium.org>

14 months agoAutomation: Support flashing falco and peppy devices. 46/65946/3
Chinyue Chen [Thu, 15 Aug 2013 08:02:13 +0000 (16:02 +0800)]
Automation: Support flashing falco and peppy devices.

BUG=chrome-os-partner:21944
TEST=Manual

Change-Id: Ibe9acec17f960bf1efa7262ab29be19eb1c57b9b
Reviewed-on: https://gerrit.chromium.org/gerrit/65946
Reviewed-by: Bowgo Tsai <bowgotsai@chromium.org>
Tested-by: Chinyue Chen <chinyue@chromium.org>
Commit-Queue: Chinyue Chen <chinyue@chromium.org>

14 months agoChange goofy_remote to sync v3 HWID bundle. 72/65572/2
Ricky Liang [Mon, 12 Aug 2013 09:47:28 +0000 (17:47 +0800)]
Change goofy_remote to sync v3 HWID bundle.

BUG=None
TEST=Run 'goofy_remote [Spring DUT] --hwid' and see hwid_v3_bundle_SPRING.sh
get sync'ed.

Change-Id: Ie39e2b83e43d4ee1f58ef2f32b46738b4023c973
Reviewed-on: https://gerrit.chromium.org/gerrit/65572
Tested-by: Ricky Liang <jcliang@chromium.org>
Reviewed-by: Cheng-Yi Chiang <cychiang@chromium.org>
Commit-Queue: Ricky Liang <jcliang@chromium.org>

14 months agorun_factory_flow.py: Able to specify port for servod and miniomaha server. 14/65814/2
Chinyue Chen [Wed, 14 Aug 2013 06:50:53 +0000 (14:50 +0800)]
run_factory_flow.py: Able to specify port for servod and miniomaha server.

BUG=chrome-os-partner:21905
TEST=Manual start run_factory_flow.py with --servod_port and --miniomaha_port

Change-Id: I20517a0d766be184a520bc7c0bb9ffa1b9fe3da0
Reviewed-on: https://gerrit.chromium.org/gerrit/65814
Reviewed-by: Bowgo Tsai <bowgotsai@chromium.org>
Tested-by: Chinyue Chen <chinyue@chromium.org>
Commit-Queue: Bowgo Tsai <bowgotsai@chromium.org>

14 months agoAdd a command to generate all HWID combinations of a board 75/62775/5
henryhsu [Sat, 20 Jul 2013 12:49:25 +0000 (20:49 +0800)]
Add a command to generate all HWID combinations of a board

Generate CSV format by giving image_id of a board
./gooftool get_hwid_v3_list --board BOARD --image_id 0 > output.csv
./gooftool get_hwid_v3_list --board BOARD --image_id EVT > output.csv

BUG=none
TEST=manaully test

Change-Id: I4d2dbc7548c08ee109de0894b759ac63851d016f
Reviewed-on: https://gerrit.chromium.org/gerrit/62775
Reviewed-by: Heng-ruey Hsu <henryhsu@chromium.org>
Tested-by: Heng-ruey Hsu <henryhsu@chromium.org>
Commit-Queue: Heng-ruey Hsu <henryhsu@chromium.org>

14 months agoPort camera fixture calibration test to pytest 80/59180/7
Justin Chuang [Wed, 19 Jun 2013 04:39:28 +0000 (12:39 +0800)]
Port camera fixture calibration test to pytest

1. camera_fixture.py
   camera_fixture_static/
   UI and control code for camera fixture calibration.

2. py/test/fixture/camera/
     - light_chamber.py: Light chamber object.
     - camera_utils.py: Utility functions.
     - Other files: Camera performance core routines for computation
       of MTF, Lens Shading, and Image Shift/Tilt.

Known issue: need to fix lint in these files (ignored in Makefile
now):
  - py/test/fixture/camera/grid_mapper.py
  - py/test/fixture/camera/mtf_calculator.py
  - py/test/fixture/camera/perf_tester.py
  - py/test/fixture/camera/renderer.py

BUG=chrome-os-partner:21593
TEST=Run the test by adding a test item in test_list.
  OperatorTest(
    id='CameraFixtureCalibration',
    pytest_name='camera_fixture',
    dargs={'mock_mode': True,
        'test_type': 'calibration',
'test_chart_version': 'B',
'capture_resolution': (640, 480),
'resize_ratio': 0.7,
})

Change-Id: I1199140ad54f01d290ffe1f5fbbbbf140cb1d40f
Reviewed-on: https://gerrit.chromium.org/gerrit/59180
Reviewed-by: Heng-ruey Hsu <henryhsu@chromium.org>
Commit-Queue: Justin Chuang <jchuang@chromium.org>
Tested-by: Justin Chuang <jchuang@chromium.org>
14 months agoCHERRY-PICK: Move some field to optional for storage probing 37/64737/3 release-R30-4537.B
henryhsu [Thu, 1 Aug 2013 10:23:32 +0000 (18:23 +0800)]
CHERRY-PICK: Move some field to optional for storage probing

BUG=none
TEST=manually test

Change-Id: I0bf2c4e8834eb3f68ad6b9dfc8137ca332336755
Original: Change-Id: I4cd4319369aa86e7dfbe6a7ddcf8d9376eb91661
Original: Reviewed-on: https://gerrit.chromium.org/gerrit/64191
Original: Reviewed-by: Katie Roberts-Hoffman <katierh@chromium.org>
Original: Commit-Queue: Katie Roberts-Hoffman <katierh@chromium.org>
Original: Tested-by: Katie Roberts-Hoffman <katierh@chromium.org>
Reviewed-on: https://gerrit.chromium.org/gerrit/64737
Reviewed-by: Heng-ruey Hsu <henryhsu@chromium.org>
Tested-by: Heng-ruey Hsu <henryhsu@chromium.org>
Commit-Queue: Heng-ruey Hsu <henryhsu@chromium.org>

14 months agohwid: Skip valid HWID database test for boards which do not have test files. 58/65558/2
Ricky Liang [Mon, 12 Aug 2013 07:28:52 +0000 (15:28 +0800)]
hwid: Skip valid HWID database test for boards which do not have test files.

BUG=None
TEST=make lint test

Change-Id: I8ee788a636fad331c965543cf9e5b80f797f4a04
Reviewed-on: https://gerrit.chromium.org/gerrit/65558
Commit-Queue: Ricky Liang <jcliang@chromium.org>
Reviewed-by: Ricky Liang <jcliang@chromium.org>
Tested-by: Ricky Liang <jcliang@chromium.org>
14 months agoCHERRY-PICK: hwid: Add GetImageId rule function. 57/65557/2
Ricky Liang [Fri, 9 Aug 2013 08:45:12 +0000 (16:45 +0800)]
CHERRY-PICK: hwid: Add GetImageId rule function.

BUG=None
TEST=make lint test

Reviewed-on: https://gerrit.chromium.org/gerrit/65293
Commit-Queue: Ricky Liang <jcliang@chromium.org>
Reviewed-by: Ricky Liang <jcliang@chromium.org>
Tested-by: Ricky Liang <jcliang@chromium.org>
(cherry picked from commit ee1894e1d7799b046679b8b0181d228436bfe30f)

Change-Id: I9ea3929f568017ba9a3c71e2cc7d5e94c826effa
Reviewed-on: https://gerrit.chromium.org/gerrit/65557
Commit-Queue: Ricky Liang <jcliang@chromium.org>
Reviewed-by: Ricky Liang <jcliang@chromium.org>
Tested-by: Ricky Liang <jcliang@chromium.org>
14 months agoCHERRY-PICK: Fix SD card test failure when the size is less than 128 MB 23/65123/2
bowgotsai [Fri, 5 Jul 2013 03:45:01 +0000 (11:45 +0800)]
CHERRY-PICK: Fix SD card test failure when the size is less than 128 MB

The test clears partition table of SD card and creates a 128 MB
primary partition.
It will fail to create the partition if the size of SD card is not enough.

Change to create a partition with size = min(128, device_size / 2).

BUG=chrome-os-partner:20707
TEST=manual

Original Change-Id: I55e0f64c1d05163150f181d72e78fefac6515515
Original Reviewed-on: https://gerrit.chromium.org/gerrit/61012
Original Reviewed-by: Shuo-Peng Liao <deanliao@chromium.org>
Original Commit-Queue: Bowgo Tsai <bowgotsai@chromium.org>
Original Tested-by: Bowgo Tsai <bowgotsai@chromium.org>

Change-Id: Ifc4535ac16bd617fa8faaa86eca6505b708a89fc
Reviewed-on: https://gerrit.chromium.org/gerrit/65123
Commit-Queue: Bowgo Tsai <bowgotsai@chromium.org>
Tested-by: Bowgo Tsai <bowgotsai@chromium.org>
Reviewed-by: Shuo-Peng Liao <deanliao@chromium.org>
14 months agoMinijack: Fix bug that detail can't be opened after first page 29/64629/6
Pi-Hsun Shih [Mon, 5 Aug 2013 07:37:07 +0000 (15:37 +0800)]
Minijack: Fix bug that detail can't be opened after first page

Fix bug that in page with DataTable (DEVICES, DEVICE, HWIDS, TESTS),
when clicking the [+] button on items that originally not on first page
of DataTable, there would be no effect.

BUG=None
TEST=Manual
Start minijack frontend, check if the [+] buttons on these pages works
as intended.

Change-Id: I579908be0ec8f30a4c1c96c8ba63d653a75c72d7
Reviewed-on: https://gerrit.chromium.org/gerrit/64629
Reviewed-by: Tom Wai-Hong Tam <waihong@chromium.org>
Tested-by: Pi-Hsun Shih <pihsun@chromium.org>
Commit-Queue: Pi-Hsun Shih <pihsun@chromium.org>

14 months agoMinijack: Add basic frame for test view 79/63579/13
Pi-Hsun Shih [Mon, 29 Jul 2013 03:41:11 +0000 (11:41 +0800)]
Minijack: Add basic frame for test view

This provide mechanics to show statistics of each test, and register new
test renderer to process and display data for specific kind of test.

Also add a default renderer for all tests. The default renderer would
try to guess which attributes are int/float/string, and calculate some
basic statistics from them.

BUG=None
TEST=Manual
Start minijack frontend, visit links on /tests. Verify the statistics are
calculated correctly.

Change-Id: I3b5ccde76b9cf44ef566923936239957e76e3ee8
Reviewed-on: https://gerrit.chromium.org/gerrit/63579
Reviewed-by: Tom Wai-Hong Tam <waihong@chromium.org>
Tested-by: Pi-Hsun Shih <pihsun@chromium.org>
Commit-Queue: Pi-Hsun Shih <pihsun@chromium.org>

14 months agoAdd an option to suppress the echo of modem. 98/63898/5 stabilize-4512.B
Chun-ta Lin [Wed, 31 Jul 2013 15:42:29 +0000 (23:42 +0800)]
Add an option to suppress the echo of modem.

In addition to the echo suppress, The following changes are also
included:
1) use readlines() instead of readline() to avoid some
buffered data like: ['\r\n', '+CEREG: 2\r\n', '\r\n', '+CEREG: 0\r\n']

2) Option disable_operation will put modem into a mode more silent.

3) Changing the logging level to extract more verbose information as we
still in the stage to understand the modem behavior.

BUG=chrome-os-partner:21514
TEST=Manually with https://gerrit-int.chromium.org/#/c/42272/

Change-Id: I5705d441a35a791b78d2d7998f6e2379ca5f444c
Reviewed-on: https://gerrit.chromium.org/gerrit/63898
Reviewed-by: Cheng-Yi Chiang <cychiang@chromium.org>
Commit-Queue: Chun-Ta Lin <itspeter@google.com>
Tested-by: Chun-Ta Lin <itspeter@google.com>
14 months agoStart miniomaha in auto-update mode without config 76/63576/9
Chun-Yen Ho [Mon, 5 Aug 2013 07:43:59 +0000 (15:43 +0800)]
Start miniomaha in auto-update mode without config

Add an --board to enable starting miniomaha server in auto-update mode
without configuration file. If --board is set, server will automatically
download and update specified boards.

BUG=chrome-os-partner:20735
TEST=Script Run Succeed

Change-Id: Ia19d62781310eddaf18d932fb6c1bbd9aedc4e40
Reviewed-on: https://gerrit.chromium.org/gerrit/63576
Commit-Queue: Chun-Yen Ho <chho@chromium.org>
Reviewed-by: Chun-Yen Ho <chho@chromium.org>
Tested-by: Chun-Yen Ho <chho@chromium.org>
14 months agosetup: Add a simple user interface to edit lsb-factory file. 02/64202/4
Hung-Te Lin [Thu, 1 Aug 2013 14:26:26 +0000 (22:26 +0800)]
setup: Add a simple user interface to edit lsb-factory file.

It's hard for partners to mount partition inside a disk image file, and then
invoke editors to edit lsb-factory with proper values.

Let's make a simple user interface to simplify the factory work flow.

BUG=none
TEST=./edit_lsb_factory.sh -i IMAGE.BIN

Change-Id: Ic3f8bfcc3497926fb95986ca4988e68d922286be
Reviewed-on: https://gerrit.chromium.org/gerrit/64202
Tested-by: Hung-Te Lin <hungte@chromium.org>
Reviewed-by: Cheng-Yi Chiang <cychiang@chromium.org>
Commit-Queue: Hung-Te Lin <hungte@chromium.org>

14 months agoPublic led.py 26/64326/2
Dean Liao [Fri, 2 Aug 2013 12:36:57 +0000 (20:36 +0800)]
Public led.py

Move led.py from private overlay to public.
It uses Board.SetLEDColor() to control board/DUT's LED(s) to verify
LED functions well.

CQ-DEPEND=CL:*42187
BUG=chrome-os-partner:21603
TEST=none

Change-Id: I6aa5d9f90c632c54417062061450b618472e84a4
Reviewed-on: https://gerrit.chromium.org/gerrit/64326
Commit-Queue: Shuo-Peng Liao <deanliao@chromium.org>
Tested-by: Shuo-Peng Liao <deanliao@chromium.org>
Reviewed-by: Hung-Te Lin <hungte@chromium.org>
14 months agoCHERRY-PICK: make_factory_package: pass block device into partition_script 99/64199/2
Cheng-Yi Chiang [Thu, 1 Aug 2013 12:27:39 +0000 (20:27 +0800)]
CHERRY-PICK: make_factory_package: pass block device into partition_script

The stateful partition size of disk_image is set to a static value
2097152 because make_factory_package did not pass block device
to partition_script (write_gpt). This CL fixes the bug so stateful
partition can get the correct size, which extends to the end of disk
image specified size.

BUG=chrome-os-partner:21570
TEST=run make_factory_package and make diskimg, check STATE size is not
2097152, but near --sectors specified minus factory and release
partitions size.
Original Change-Id: I29d2ffa0e5a125236334865ed6628e149843898c
Original Reviewed-on: https://gerrit.chromium.org/gerrit/64197
Original Reviewed-by: Hung-Te Lin <hungte@chromium.org>
Original Commit-Queue: Cheng-Yi Chiang <cychiang@chromium.org>
Original Tested-by: Cheng-Yi Chiang <cychiang@chromium.org>

Change-Id: I7876f593d80dcbbc7573719cd51e88b7f9a43d69
Reviewed-on: https://gerrit.chromium.org/gerrit/64199
Reviewed-by: Hung-Te Lin <hungte@chromium.org>
Commit-Queue: Cheng-Yi Chiang <cychiang@chromium.org>
Tested-by: Cheng-Yi Chiang <cychiang@chromium.org>
14 months agoFix path loss calculation in RadiatedCellular for multiple chamber. 88/64188/2
Chun-ta Lin [Thu, 1 Aug 2013 09:50:32 +0000 (17:50 +0800)]
Fix path loss calculation in RadiatedCellular for multiple chamber.

Currently, we always set the calibration config to zero (i.e. no
compensation). This make it zero different when calculate the pass_loss
in calibration check. However, consider the multiple chambers are coming
in, we should take the calibration config into account.

BUG=chrome-os-partner:21560
TEST=make lint-overlay-spring; Manually

Change-Id: I44604557ee0f0a0d51b321b83001b0e7a8c9a291
Reviewed-on: https://gerrit.chromium.org/gerrit/64188
Commit-Queue: Chun-Ta Lin <itspeter@google.com>
Tested-by: Chun-Ta Lin <itspeter@google.com>
Reviewed-by: Rong Chang <rongchang@chromium.org>
14 months agoCHERRY-PICK: For board specific Hooks, OnStartup() should run in its original position. 87/64187/2
Shuo-Peng Liao [Mon, 1 Jul 2013 07:58:59 +0000 (15:58 +0800)]
CHERRY-PICK: For board specific Hooks, OnStartup() should run in its original position.

Add MayUpdateTestListOptions() for the need to alter test_list.options.

BUG=chrome-os-partner:20621
TEST=manual

Change-Id: Ife06b138f4ea300afa8286511993969efa7e185a
Reviewed-on: https://gerrit.chromium.org/gerrit/60628
Reviewed-by: Vic Yang <victoryang@chromium.org>
Commit-Queue: Shuo-Peng Liao <deanliao@chromium.org>
Tested-by: Shuo-Peng Liao <deanliao@chromium.org>
Reviewed-on: https://gerrit.chromium.org/gerrit/64187
Reviewed-by: Ricky Liang <jcliang@chromium.org>
Reviewed-by: Bowgo Tsai <bowgotsai@chromium.org>
14 months agoCHERRY-PICK: Provide an option to enable/disable CpufreqManager. 86/64186/2
Shuo-Peng Liao [Sun, 30 Jun 2013 10:37:02 +0000 (18:37 +0800)]
CHERRY-PICK: Provide an option to enable/disable CpufreqManager.

BUG=chrome-os-partner:20624
TEST=manual

Change-Id: If57613e4a3098403ad553b9c946eb178a4544b3d
Reviewed-on: https://gerrit.chromium.org/gerrit/60599
Commit-Queue: Shuo-Peng Liao <deanliao@chromium.org>
Reviewed-by: Shuo-Peng Liao <deanliao@chromium.org>
Tested-by: Shuo-Peng Liao <deanliao@chromium.org>
Reviewed-on: https://gerrit.chromium.org/gerrit/64186
Reviewed-by: Bowgo Tsai <bowgotsai@chromium.org>
14 months agoCHERRY-PICK: Be able to set multiple Shopfloor URLs. 85/64185/2
Shuo-Peng Liao [Sun, 30 Jun 2013 09:00:06 +0000 (17:00 +0800)]
CHERRY-PICK: Be able to set multiple Shopfloor URLs.

For projects require differnt Shopfloor URLs for different stage,
we can set options.shopfloor_server_url_for_stage in test_list:
  options.shopfloor_server_url_for_stage = {
      'smt'  : 'http://10.3.0.11:8082/',
      'runin': 'http://10.4.0.11:8082/',
      'fatp' : 'http://10.5.0.11:8082/'}

We can use project specific hook (goofy/<board>_hook.py) to
override options.shopfloor_server_url.

Because we need to run hooks.OnStartup before shopfloor URL being set,
we move hook initialization code just before shopfloor init.

BUG=chrome-os-partner:20621
TEST=manual

Change-Id: I973dcec03bb4a711d29c39898e1fe5978d386e14
Reviewed-on: https://gerrit.chromium.org/gerrit/60598
Commit-Queue: Shuo-Peng Liao <deanliao@chromium.org>
Reviewed-by: Shuo-Peng Liao <deanliao@chromium.org>
Tested-by: Shuo-Peng Liao <deanliao@chromium.org>
Reviewed-on: https://gerrit.chromium.org/gerrit/64185
Reviewed-by: Ricky Liang <jcliang@chromium.org>
14 months agoCHERRY-PICK: Show Shopfloor URL when connecting to Shopfloor. 84/64184/2
Shuo-Peng Liao [Sun, 30 Jun 2013 08:56:36 +0000 (16:56 +0800)]
CHERRY-PICK: Show Shopfloor URL when connecting to Shopfloor.

BUG=none
TEST=manual

Change-Id: If052be8b25a6bcf6adb211af15973eb7d0ce5c80
Reviewed-on: https://gerrit.chromium.org/gerrit/60597
Commit-Queue: Shuo-Peng Liao <deanliao@chromium.org>
Reviewed-by: Shuo-Peng Liao <deanliao@chromium.org>
Tested-by: Shuo-Peng Liao <deanliao@chromium.org>
Reviewed-on: https://gerrit.chromium.org/gerrit/64184
Reviewed-by: Ricky Liang <jcliang@chromium.org>
14 months agoExtend the lsusb string matching to support regex. 94/63894/3 firmware-pit-4482.B
Chun-ta Lin [Wed, 31 Jul 2013 09:16:57 +0000 (17:16 +0800)]
Extend the lsusb string matching to support regex.

BUG=chrome-os-partner:21514
TEST=make lint; make test; Verified with test_list in
https://gerrit-int.chromium.org/#/c/41971/1

Change-Id: I0391c35b42222313e1891bcfc22c913910d2a6e7
Reviewed-on: https://gerrit.chromium.org/gerrit/63894
Commit-Queue: Chun-Ta Lin <itspeter@google.com>
Reviewed-by: Chun-Ta Lin <itspeter@google.com>
Tested-by: Chun-Ta Lin <itspeter@google.com>
14 months agoSupport more options in RadiatedCellular test. 81/63881/3
Chun-ta Lin [Wed, 31 Jul 2013 05:20:27 +0000 (13:20 +0800)]
Support more options in RadiatedCellular test.

We gracefully set the pdm to 0 based on
https://code.google.com/p/chrome-os-partner/issues/detail?id=19861#c103
to see if this will help to avoid modem being toasted.

In addition, few more options are exposed, including:
  (a) delay_after_zero:
    The delay after we set pdm to zero.
  (b) delay_after_off:
    This is used when we want to check the background noise.
    Assigned non zero secs to pause before the measurement made.
  (c) check_background_noise:
    If this is not None, we will do an additional measurement to see if the
    signal is below certain level, however, it will not fail the test by
    default, see the fail_on_background_noise for more detail.
  (d) fail_on_background_noise:
    If this flag set to True, we will fail the test when background noise
    is too high.

BUG=chrome-os-partner:19861
TEST=Manually use a customized parameters.production like below:

tx_measurements:
- avg_power_threshold: !!python/tuple
  - -15
  - null
  band_name: WCDMA_IMT
  channel: 9750
  check_background_noise: -50
  delay: 1
  delay_after_off: 0.5
  delay_after_zero: 1
  fail_on_background_noise: true
  frequency: 1950000000.0
  measurement_name: WCDMA_IMT_BC1
  path_loss_threshold: !!python/tuple
  - -5
  - 5
  pdm: 92
  port: 1
  range: null

Use RF Advanced test_list, run RFDebugWithoutShopfloor verified the
following:
  (1) Set long period for delay_after_zero, observed the power went to
  normal.
  (2) Set fail_on_background_noise to false and see we still get a pass
  when check_background_noise sets to -80.
  (3) Set check_background_noise to null and observed from console that
  we did skip the background noise check step.

Change-Id: I0ba36234b3db3dd57fbf8e3132653e2ab2b7276b
Reviewed-on: https://gerrit.chromium.org/gerrit/63881
Commit-Queue: Chun-Ta Lin <itspeter@google.com>
Reviewed-by: Chun-Ta Lin <itspeter@google.com>
Tested-by: Chun-Ta Lin <itspeter@google.com>
14 months agoac_power: replace dargs.retry with dargs.retries. 21/63321/2
Dean Liao [Thu, 4 Jul 2013 09:35:06 +0000 (17:35 +0800)]
ac_power: replace dargs.retry with dargs.retries.

Refer review comments in https://gerrit.chromium.org/gerrit/#/c/63175/
replace dargs.retry with dargs.retries. And use None for probing forever
until probe successfully.

BUG=chrome-os-partner:20636
TEST=Run the test with
   dargs={
       'power_type': 'Mains',
       'online': True,
       'bft_fixture': _BFT_FIXTURE,
       'retry': 3,
   }

   with _USE_DUMMY_FIXTURE = True in test_list. Then runs the test w/o
   ac adapter.

Change-Id: I4a31160a73a4c878c4761a7010b26d5a50b5ecb8
Reviewed-on: https://gerrit.chromium.org/gerrit/63321
Commit-Queue: Shuo-Peng Liao <deanliao@chromium.org>
Tested-by: Shuo-Peng Liao <deanliao@chromium.org>
Reviewed-by: Cheng-Yi Chiang <cychiang@chromium.org>
14 months agoMinijack: Some UX improvements 84/63584/4
Pi-Hsun Shih [Mon, 29 Jul 2013 07:38:00 +0000 (15:38 +0800)]
Minijack: Some UX improvements

Several changes to enhance user experience:
- Change BUILD/HOME to DEVICES, for consistency.
- Change HWID to HWIDS.
- Add "Show Difference" button in HWIDS, to only show columns that has
  different values.
- Rename buttons in TESTS, and remove [+] button when there's no failed
  device in the category.
- Add options to show 10 rows per page.
- Make links in DataTable more attractive.

BUG=None
TEST=Manual
Start minijack frontend, verify every page are still working.

Change-Id: I0a7adaaab2dd7c4552575207450173cd5ef06f6f
Reviewed-on: https://gerrit.chromium.org/gerrit/63584
Reviewed-by: Tom Wai-Hong Tam <waihong@chromium.org>
Tested-by: Pi-Hsun Shih <pihsun@chromium.org>
Commit-Queue: Pi-Hsun Shih <pihsun@chromium.org>

14 months agostartx: start X with '-noreset' option 71/63571/2
Daniel Kurtz [Mon, 29 Jul 2013 02:19:45 +0000 (10:19 +0800)]
startx: start X with '-noreset' option

'-noreset' keeps the X server from resetting itself when the last client
disconnects.

Resetting the X server can be very slow (>1.5 seconds x86) as it involves
blanking and unblanking all CRTCs.

This situation can get triggered when there is a race at boot between, for
example xinput device setup and the long-lived UI process (e.g. chrome via
session_manager or goofy).  In these situations, '-noreset' significantly
speeds up UI start time.

BUG=chrome-os-partner:21247
TEST=Boot factory image
  Inspect /var/log/Xorg.0.log
  => X device drivers should only be loaded once at boot.
     input drivers: (evdev/cmt) and video driver: (intel or armsoc)

Change-Id: Iaa1d1bfd38e0ae90a0a14fc5bc423b6420461b16
Reviewed-on: https://gerrit.chromium.org/gerrit/63571
Reviewed-by: Hung-Te Lin <hungte@chromium.org>
Reviewed-by: Daniel Erat <derat@chromium.org>
Reviewed-by: Daniel Kurtz <djkurtz@chromium.org>
Tested-by: Daniel Kurtz <djkurtz@chromium.org>
Commit-Queue: Daniel Kurtz <djkurtz@chromium.org>

14 months agoChanging I2C bus detection to a more generic implementation 49/63649/2
Gediminas Ramanauskas [Mon, 29 Jul 2013 22:47:40 +0000 (15:47 -0700)]
Changing I2C bus detection to a more generic implementation

BUG=chrome-os-partner:21301
TEST=All devices successfully probe display_panel

Change-Id: Ic29d2b308c9cc9061e95a2e4e403b375bd5e35c1
Reviewed-on: https://gerrit.chromium.org/gerrit/63649
Reviewed-by: Katie Roberts-Hoffman <katierh@chromium.org>
Tested-by: Gediminas Ramanauskas <gedis@chromium.org>
Commit-Queue: Jay Kim <yongjaek@chromium.org>

14 months agoSync cached config after turning down engine 78/63578/2
Chun-Yen Ho [Mon, 29 Jul 2013 04:05:57 +0000 (12:05 +0800)]
Sync cached config after turning down engine

Sync the cached config file again after the engine is turned down to
avoid errors when running get_recovery_image after the clean up
procedure.

BUG=chrome-os-partner:20735
TEST=Script Run Succeed

Change-Id: I464104df2ea5eb30a4de8a35fbcf9d485a7a6e62
Reviewed-on: https://gerrit.chromium.org/gerrit/63578
Reviewed-by: Hung-Te Lin <hungte@chromium.org>
Commit-Queue: Chun-Yen Ho <chho@google.com>
Tested-by: Chun-Yen Ho <chho@google.com>
14 months agoCHERRY-PICK: Add an args to modify complete_script. 61/63561/3
Shuo-Peng Liao [Fri, 28 Jun 2013 06:35:08 +0000 (14:35 +0800)]
CHERRY-PICK: Add an args to modify complete_script.

We can use --complete-script="" to make a downloaded image without complete script.

Note that to keep consistency, I renamed arg from 'complete_script' to 'complete-script'.

BUG=chrome-os-partner:20589
TEST=manual

Change-Id: I626e7e695b8b6d1bbdcb3c6a1e62c01cff7fbbc3
Reviewed-on: https://gerrit.chromium.org/gerrit/60327
Reviewed-by: Bowgo Tsai <bowgotsai@chromium.org>
Commit-Queue: Shuo-Peng Liao <deanliao@chromium.org>
Tested-by: Shuo-Peng Liao <deanliao@chromium.org>
Reviewed-on: https://gerrit.chromium.org/gerrit/63561
Reviewed-by: Cheng-Yi Chiang <cychiang@chromium.org>
14 months agoMinijack: Add server-side filtering 19/63319/13
Pi-Hsun Shih [Fri, 26 Jul 2013 07:47:11 +0000 (15:47 +0800)]
Minijack: Add server-side filtering

This applies to /build and /tests, allowing us to filter data on
server side, reducing number of results, and speed up page loading time.
This also allows us to do some advanced filtering, for example, query
all devices with latest_test_time after some date.

Also add links to detail of /hwid and /tests views, to only show the
corresponding devices in one page.

Currently, the filter on tests view is filtered on the source data which
the statistic values are calculated on, not the values itself.

BUG=None
TEST=Manual
Start minijack frontend, go to /build or /test, try different filter
setting and verify the list is filtered properly.

Change-Id: I4e0fc555efb46151cbd2e5f9d2ef2fe993f07e96
Reviewed-on: https://gerrit.chromium.org/gerrit/63319
Reviewed-by: Tom Wai-Hong Tam <waihong@chromium.org>
Commit-Queue: Pi-Hsun Shih <pihsun@chromium.org>
Tested-by: Pi-Hsun Shih <pihsun@chromium.org>
14 months agoMinijack: Merge hwid_view.py to view.py 66/63466/5
Pi-Hsun Shih [Fri, 26 Jul 2013 07:41:45 +0000 (15:41 +0800)]
Minijack: Merge hwid_view.py to view.py

There's no need for a separate file, and they need to share some
functions in the future.

BUG=None
TEST=Manual
Start minijack frontend, test everything is still working.

Change-Id: Icf98d22a3b554934cc302a5cb0630b6460d2a688
Reviewed-on: https://gerrit.chromium.org/gerrit/63466
Commit-Queue: Pi-Hsun Shih <pihsun@chromium.org>
Reviewed-by: Pi-Hsun Shih <pihsun@chromium.org>
Tested-by: Pi-Hsun Shih <pihsun@chromium.org>
14 months agoMinijack: Add more jQuery UI library 65/63465/5
Pi-Hsun Shih [Fri, 26 Jul 2013 07:36:51 +0000 (15:36 +0800)]
Minijack: Add more jQuery UI library

Added datepicker and autocomplete, which would be used in future commit.

BUG=None
TEST=Manual
Start minijack frontend, test everything is still working.

Change-Id: I6312834a6d7fb5ab6a3df5476f6edf9616f74f34
Reviewed-on: https://gerrit.chromium.org/gerrit/63465
Commit-Queue: Pi-Hsun Shih <pihsun@chromium.org>
Reviewed-by: Pi-Hsun Shih <pihsun@chromium.org>
Tested-by: Pi-Hsun Shih <pihsun@chromium.org>
14 months agoMinijack: Style cleanup for javascript 20/63320/7
Pi-Hsun Shih [Thu, 25 Jul 2013 03:39:11 +0000 (11:39 +0800)]
Minijack: Style cleanup for javascript

Fix all error found in gjslint.

BUG=None
TEST=Manual
cd into platform/factory/minijack/frontend/static/js, and do
  gjslint build_life.js device_life.js hwid_life.js \
          minijack_common.js tests_life.js

Change-Id: Ia5f74948427da7d7b180db93c8928af615f29ef0
Reviewed-on: https://gerrit.chromium.org/gerrit/63320
Commit-Queue: Pi-Hsun Shih <pihsun@chromium.org>
Reviewed-by: Pi-Hsun Shih <pihsun@chromium.org>
Tested-by: Pi-Hsun Shih <pihsun@chromium.org>
15 months agoMake x and y segment count values arguments in touchpad.py 36/63436/3
Bernie Thompson [Fri, 26 Jul 2013 00:34:07 +0000 (17:34 -0700)]
Make x and y segment count values arguments in touchpad.py

In some cases we may want to vary the level of complexity of the touchpad
test by adjusting the segments we have to be touched in the test. This makes
the default the same at 5 but allows the test_list to adjust the value.

BUG=None.
TEST=Manual, run with a test_list entry using
dargs={'x_segments': 3,
       'y_segments': 3}
and observe the touchpad matrix change to 3x3.

Change-Id: I0acd76d630710904b0bec9eff1de10de6fec0ec6
Reviewed-on: https://gerrit.chromium.org/gerrit/63436
Commit-Queue: Bernie Thompson <bhthompson@chromium.org>
Reviewed-by: Bernie Thompson <bhthompson@chromium.org>
Tested-by: Bernie Thompson <bhthompson@chromium.org>
15 months agoHandle uuid and backward compatibility 42/63442/5
Chun-Yen Ho [Fri, 26 Jul 2013 02:09:06 +0000 (10:09 +0800)]
Handle uuid and backward compatibility

Handle the uuid supplied form factroy install shim, and ensure every
update ping works even if session is not correctly recoreded for
backward compatibility.

BUG=chrome-os-partner:20735
TEST=Singal machine manual test

Change-Id: Ia5bf5fdcbe3697bef99199c2b05ad7b969cc665c
Reviewed-on: https://gerrit.chromium.org/gerrit/63442
Reviewed-by: Hung-Te Lin <hungte@chromium.org>
Commit-Queue: Chun-Yen Ho <chho@google.com>
Tested-by: Chun-Yen Ho <chho@google.com>
15 months agoEnable changing config path in OmahaPreparer 54/63454/2
Chun-Yen Ho [Fri, 26 Jul 2013 05:34:51 +0000 (13:34 +0800)]
Enable changing config path in OmahaPreparer

Add a config path option to make it possible to specify where to place
the omaha configuration file.

BUG=chrome-os-partner:20735
TEST=Script Run Succeed

Change-Id: I9c7aaa9dbdc4b6caedcb62c6b66e4d67cd36a2fa
Reviewed-on: https://gerrit.chromium.org/gerrit/63454
Reviewed-by: Hung-Te Lin <hungte@chromium.org>
Commit-Queue: Chun-Yen Ho <chho@google.com>
Tested-by: Chun-Yen Ho <chho@google.com>
15 months agoModify command for make_factory_package --run 39/63439/4
Chun-Yen Ho [Fri, 26 Jul 2013 01:31:20 +0000 (09:31 +0800)]
Modify command for make_factory_package --run

Modify default command for make_factory_package --run to resolve the
confusing configure file error triggered by undeleted old configure
file.

BUG=chrome-os-partner:21328
TEST=Run Succeed

Change-Id: I4800d554983b150c49de389dd2cf273e5b2474af
Reviewed-on: https://gerrit.chromium.org/gerrit/63439
Reviewed-by: Hung-Te Lin <hungte@chromium.org>
Commit-Queue: Chun-Yen Ho <chho@google.com>
Tested-by: Chun-Yen Ho <chho@google.com>
Reviewed-by: Yusuf Mohsinally <mohsinally@chromium.org>
15 months agoImplement screenshot functionality. 97/62797/4
Mao Huang [Mon, 22 Jul 2013 02:30:38 +0000 (10:30 +0800)]
Implement screenshot functionality.

BUG=chrome-os-partner:19956
TEST=Go to "/build" page and find the device you want. Click the green
plus sign before the device and click the screenshot button. A new
window should be opened and displaying the device's screenshot.

Change-Id: Icf846bcfa0f917960e87e6e6042fd4e3631d61d4
Reviewed-on: https://gerrit.chromium.org/gerrit/62797
Commit-Queue: Mao Huang <littlecvr@chromium.org>
Reviewed-by: Mao Huang <littlecvr@chromium.org>
Tested-by: Mao Huang <littlecvr@chromium.org>
15 months agoAdd BoardNotFoundException to get_recovery_image 50/63450/4
Chun-Yen Ho [Fri, 26 Jul 2013 03:43:32 +0000 (11:43 +0800)]
Add BoardNotFoundException to get_recovery_image

Add an exception to get_recovery_image.py to distinguish 'wrong board
name' from 'no update'.

BUG=chrome-os-partner:20735
TEST=Script Run Succeed

Change-Id: Iee6e1fcfb35b23ebc5e551079c3eb05d3755e4cc
Reviewed-on: https://gerrit.chromium.org/gerrit/63450
Reviewed-by: Hung-Te Lin <hungte@chromium.org>
Commit-Queue: Chun-Yen Ho <chho@google.com>
Tested-by: Chun-Yen Ho <chho@google.com>
15 months agoUpdate script to also convert v1.5 files to v2 14/62114/5
dbroaden [Tue, 16 Jul 2013 16:00:32 +0000 (09:00 -0700)]
Update script to also convert v1.5 files to v2

BUG=None
TEST=convert_to_v2_unittest.py

Change-Id: I406ece0f3f6d08678ff03cccaec535fb13a536fe
Reviewed-on: https://gerrit.chromium.org/gerrit/62114
Reviewed-by: Drew Haven <haven@chromium.org>
Commit-Queue: Devin Broaden <dbroaden@chromium.org>
Reviewed-by: Devin Broaden <dbroaden@chromium.org>
Tested-by: Devin Broaden <dbroaden@chromium.org>
15 months agoRMA: Check if there is no component translation 69/63069/2
Bernie Thompson [Tue, 23 Jul 2013 18:44:34 +0000 (11:44 -0700)]
RMA: Check if there is no component translation

In the case that there is no component translation we should not fail
when we try to itterate over the translations.

BUG=None
TEST=Manual, run shopfloor with no translations.

Change-Id: Ifc17f7fc0dd7fb6f17b4a7be87079e418b552a5f
Reviewed-on: https://gerrit.chromium.org/gerrit/63069
Commit-Queue: Bernie Thompson <bhthompson@chromium.org>
Reviewed-by: Bernie Thompson <bhthompson@chromium.org>
Tested-by: Bernie Thompson <bhthompson@chromium.org>
15 months agoRMA: Unpack the HWID bundle when needed 84/62884/3
Bernie Thompson [Mon, 22 Jul 2013 21:38:08 +0000 (14:38 -0700)]
RMA: Unpack the HWID bundle when needed

The HWID decoding feature of the simple RMA shopfloor server requires
access to the HWID HWDB, however this HWDB may not be unpacked in
the bundle, so we need to unpack it when we need it.

BUG=chrome-os-partner:21210
TEST=Manual, run simple RMA shopfloor, watch it unpack a HWDB from
a HWID bundle.

Change-Id: Iec0ef3bc335801384fe85a2723f2b03d263039c4
Reviewed-on: https://gerrit.chromium.org/gerrit/62884
Commit-Queue: Bernie Thompson <bhthompson@chromium.org>
Reviewed-by: Bernie Thompson <bhthompson@chromium.org>
Tested-by: Bernie Thompson <bhthompson@chromium.org>
15 months agoRMA: Move the rma_config_board.yaml file to data_dir 65/62765/5
Bernie Thompson [Sat, 20 Jul 2013 01:24:23 +0000 (18:24 -0700)]
RMA: Move the rma_config_board.yaml file to data_dir

The rma_config_board.yaml file should be outside the python source
tree at run time. This moves it to the data_dir and adjusts the
unittest accordingly, along with some more unittest enhancements.

BUG=chrome-os-partner:20537
TEST=Manual, run unittest and server.

Change-Id: Ie9d02b851d66d8be57ddde4e5bf8b3368033e792
Reviewed-on: https://gerrit.chromium.org/gerrit/62765
Reviewed-by: Katie Roberts-Hoffman <katierh@chromium.org>
Commit-Queue: Bernie Thompson <bhthompson@chromium.org>
Tested-by: Bernie Thompson <bhthompson@chromium.org>
15 months agoAdd an auto-update option to miniomaha.py 82/62082/23
Chun-Yen Ho [Thu, 25 Jul 2013 03:45:25 +0000 (11:45 +0800)]
Add an auto-update option to miniomaha.py

If auto-update option is enabled, miniomaha engine will periodically
check if the current images are up-to-date.

Currently the update check will be triggered in two cases. The first case is
when the server is idled for a certain period. The second case is when
there is no update check for a long period.

Note that in the later case, there may be file inconsistency issues if
the update check is forced between the update procedure of some machines.

BUG=chrome-os-partner:20735
TEST=Singal machine manual test

Change-Id: I857a156ad26cec1239f19fd9df93e462bedb5d2c
Reviewed-on: https://gerrit.chromium.org/gerrit/62082
Reviewed-by: Hung-Te Lin <hungte@chromium.org>
Commit-Queue: Chun-Yen Ho <chho@google.com>
Tested-by: Chun-Yen Ho <chho@google.com>
15 months agoMinijack: Fix bug when number of component_class isn't 27. 84/63184/3
Pi-Hsun Shih [Wed, 24 Jul 2013 09:35:01 +0000 (17:35 +0800)]
Minijack: Fix bug when number of component_class isn't 27.

The number was incorrectly hard-coded in javascript file, change the way
to handle this.
Also remove select menu when all value of the column are the same.
Also change the ordering of devices in hwid_view to match the one used
in tests_view.

BUG=None
TEST=Manual
Start minijack frontend, view /test when number of component_class in
database is not 27, there shouldn't be any javascript error in browser's
console.

Change-Id: I21a11e74054772f7cb21193e7fad468e2fe52297
Reviewed-on: https://gerrit.chromium.org/gerrit/63184
Reviewed-by: Tom Wai-Hong Tam <waihong@chromium.org>
Commit-Queue: Pi-Hsun Shih <pihsun@chromium.org>
Tested-by: Pi-Hsun Shih <pihsun@chromium.org>
15 months agoMinijack: Add new Test-oriented view 79/62979/9
Pi-Hsun Shih [Wed, 24 Jul 2013 09:28:51 +0000 (17:28 +0800)]
Minijack: Add new Test-oriented view

The url /test would show statistics for all tests, e.g. pass rate, fail
rate, ...

BUG=None
TEST=Manual
Start minijack frontend, check url /test

Change-Id: Ia9ee5bfb7ebdc6c9690e9672c6179a730ea740e1
Reviewed-on: https://gerrit.chromium.org/gerrit/62979
Reviewed-by: Tom Wai-Hong Tam <waihong@chromium.org>
Commit-Queue: Pi-Hsun Shih <pihsun@chromium.org>
Tested-by: Pi-Hsun Shih <pihsun@chromium.org>
15 months agoSupport multiple configs in miniomaha server 16/63316/3
Chun-Yen Ho [Thu, 25 Jul 2013 02:30:05 +0000 (10:30 +0800)]
Support multiple configs in miniomaha server

Refine the usage of factory_config in miniomaha engine to enable using
multiple configurations without restarting miniomaha server

BUG=chrome-os-partner:20735
TEST=Run autotest

Change-Id: I34c03835044950ab8256995d25f588cf5d9ce09a
Reviewed-on: https://gerrit.chromium.org/gerrit/63316
Commit-Queue: Chun-Yen Ho <chho@google.com>
Tested-by: Chun-Yen Ho <chho@google.com>
Reviewed-by: Hung-Te Lin <hungte@chromium.org>
15 months agoAdd Timeout context manager 98/62798/5
Justin Chuang [Mon, 22 Jul 2013 03:47:25 +0000 (11:47 +0800)]
Add Timeout context manager

BUG=chrome-os-partner:20232
TEST=make test

Change-Id: I05d5537a8d6ac2776f15ab346483fb80e9d8832c
Reviewed-on: https://gerrit.chromium.org/gerrit/62798
Reviewed-by: Cheng-Yi Chiang <cychiang@chromium.org>
Commit-Queue: Justin Chuang <jchuang@chromium.org>
Tested-by: Justin Chuang <jchuang@chromium.org>
15 months agoac_power: fix HTML bug that #probe times does not update. 79/63179/3
Dean Liao [Wed, 24 Jul 2013 05:15:26 +0000 (13:15 +0800)]
ac_power: fix HTML bug that #probe times does not update.

It is becuase ID 'probed_times' duplicate for label-en and label-zh.

BUG=chrome-os-partner:20636
TEST=Run the test with
   dargs={
       'power_type': 'Mains',
       'online': True,
       'retry': 60}
and unplug AC power. See if probe count increases.
Test it using both English and Chinese UI.

Change-Id: I0920c3c89b44e0b14127d38fe55b5b5ad7d9997e
Reviewed-on: https://gerrit.chromium.org/gerrit/63179
Tested-by: Shuo-Peng Liao <deanliao@chromium.org>
Reviewed-by: Jon Salz <jsalz@chromium.org>
Commit-Queue: Shuo-Peng Liao <deanliao@chromium.org>

15 months agogoofy: Check log rotation in goofy idle loop 83/62983/3
Cheng-Yi Chiang [Tue, 23 Jul 2013 07:02:38 +0000 (15:02 +0800)]
goofy: Check log rotation in goofy idle loop

Since autotest touch /var/lib/cleanup_logs_paused every time it runs a
job, goofy have to remove that file according to test list option
disable_logs_rotation in the idle loop.

BUG=chrome-os-partner:21260
TEST=run goofy with disable_logs_rotation enabled/disabled, run an
autotest, check /var/lib/cleanup_logs_paused is present/absent.

Change-Id: Ib09b118b02364748129e215d6429e3a06a3c963e
Reviewed-on: https://gerrit.chromium.org/gerrit/62983
Reviewed-by: Shuo-Peng Liao <deanliao@chromium.org>
Tested-by: Cheng-Yi Chiang <cychiang@chromium.org>
Commit-Queue: Cheng-Yi Chiang <cychiang@chromium.org>

15 months agofinalize_bundle: Add support for depthcharge netboot firmware. 10/59710/9
bowgotsai [Mon, 24 Jun 2013 04:48:51 +0000 (12:48 +0800)]
finalize_bundle: Add support for depthcharge netboot firmware.

For netboot in depthcharge, it has below differences comapred to U-boot.

1. Use 'update_firmware_settings.py instead of update_firmware_var.py
   to assign the IP address of omahaserver and tftpserver.
   ./update_firmware_settings.py --clobber \
   --input image.net.bin  --output image.net.bin.out \
   --omahaserver=http://x.x.x.x:8080/update \
   --tftpserverip=x.x.x.x

2. Default name of netboot image used in tftpserver is
   changed to vmlinux.bin

3. Need to copy vmlinux.uimg to vmlinux.bin and skip the first 64 bytes.

BUG=chrome-os-partner:20121
TEST=Run ./finalize_bundle.py ~/factory_bundle_falco_20130624_evt/.
     And verify that netboot works.

Change-Id: I5bf2ce8dd40c738c8113fdd45e96f95dcb796e1c
Reviewed-on: https://gerrit.chromium.org/gerrit/59710
Reviewed-by: Bowgo Tsai <bowgotsai@chromium.org>
Tested-by: Bowgo Tsai <bowgotsai@chromium.org>
Commit-Queue: Bowgo Tsai <bowgotsai@chromium.org>

15 months agoHandle the download complete notification 07/62607/8
Chun-Yen Ho [Fri, 19 Jul 2013 05:37:13 +0000 (13:37 +0800)]
Handle the download complete notification

Add a segment of code to handle the download complete notification from
install script.

BUG=chrome-os-partner:21126
TEST=Run server and check the log file
Change-Id: Ib70bf3525859f4512d1379c1288d5fe92e598e18
Reviewed-on: https://gerrit.chromium.org/gerrit/62607
Reviewed-by: Vic Yang <victoryang@chromium.org>
Reviewed-by: Hung-Te Lin <hungte@chromium.org>
Tested-by: Chun-Yen Ho <chho@google.com>
Commit-Queue: Chun-Yen Ho <chho@google.com>

15 months agohwid: Add a HWID rule function to get the operation mode. 81/62981/3
Ricky Liang [Tue, 23 Jul 2013 03:28:38 +0000 (11:28 +0800)]
hwid: Add a HWID rule function to get the operation mode.

BUG=chrome-os-partner:20537
CQ-DEPEND=CL:62980
TEST=make lint test

Change-Id: I0bb30a070a3a7e508e4ae161cac02d55f15bdc74
Reviewed-on: https://gerrit.chromium.org/gerrit/62981
Reviewed-by: Bernie Thompson <bhthompson@chromium.org>
Tested-by: Ricky Liang <jcliang@chromium.org>
Commit-Queue: Bernie Thompson <bhthompson@chromium.org>

15 months agohwid: Refactor to support different modes of operations. 80/62980/3
Ricky Liang [Tue, 23 Jul 2013 03:17:08 +0000 (11:17 +0800)]
hwid: Refactor to support different modes of operations.

BUG=chrome-os-partner:20537
TEST=make lint test

Change-Id: Ifb7b87fa8694c01a69463649a2af48f8fa937414
Reviewed-on: https://gerrit.chromium.org/gerrit/62980
Reviewed-by: Bernie Thompson <bhthompson@chromium.org>
Tested-by: Ricky Liang <jcliang@chromium.org>
Commit-Queue: Bernie Thompson <bhthompson@chromium.org>

15 months agoMake finalize_bundle leverage the new-style active test_list mechanism 70/62870/4
Bernie Thompson [Mon, 22 Jul 2013 20:11:23 +0000 (13:11 -0700)]
Make finalize_bundle leverage the new-style active test_list mechanism

The old active test_list method used a symlink to the active test_list in
/usr/local/factory/test_lists/active the new-style uses a file containing
the test_list extension in /usr/local/factory/py/test/test_lists/ACTIVE. We
need to use the new-style if we want to change the default test_list in
finalize_bundle.

To support the v1 style test_lists we also check if the test_lists.py file
exists and if so use the old symlink method.

BUG=chrome-os-partner:21209
TEST=Manual, build a bundle with finalize_bundle using a different test_list
and verify that test_list is used.

Change-Id: I773214388680d551a6921daaa6312f2ba935361f
Reviewed-on: https://gerrit.chromium.org/gerrit/62870
Reviewed-by: Cheng-Yi Chiang <cychiang@chromium.org>
Commit-Queue: Bernie Thompson <bhthompson@chromium.org>
Tested-by: Bernie Thompson <bhthompson@chromium.org>
15 months agoAdd support for sampling. 84/62984/3
Jon Salz [Tue, 23 Jul 2013 08:39:50 +0000 (16:39 +0800)]
Add support for sampling.

This required:

- Support for arbitrary run_if expressions (e.g., to combine multiple
  device_data flags)
- Another subcommand in the factory tool to modify device_data for testing

BUG=chrome-os-partner:21262
TEST=Tested with modified test list, with sampling enabled/disabled and
  various component assertions

Change-Id: I214f9ca48b506849ff71fea803757c9dce39589e
Reviewed-on: https://gerrit.chromium.org/gerrit/62984
Tested-by: Jon Salz <jsalz@chromium.org>
Reviewed-by: Chinyue Chen <chinyue@chromium.org>
Reviewed-by: Rong Chang <rongchang@chromium.org>
Commit-Queue: Jon Salz <jsalz@chromium.org>

15 months agoAdd logging message with wlan information. 94/62694/3
Jon Salz [Fri, 19 Jul 2013 21:04:26 +0000 (05:04 +0800)]
Add logging message with wlan information.

(This is useful since the selected wlans may be different on different
devices.)

BUG=None
TEST=Manual on device

Change-Id: I310ab500f78348a5e147d6002cd9420499dcb033
Reviewed-on: https://gerrit.chromium.org/gerrit/62694
Commit-Queue: Jon Salz <jsalz@chromium.org>
Reviewed-by: Jon Salz <jsalz@chromium.org>
Tested-by: Jon Salz <jsalz@chromium.org>
15 months agoMore "factory" sub-commands. 66/62666/3
Jon Salz [Thu, 11 Jul 2013 21:49:27 +0000 (05:49 +0800)]
More "factory" sub-commands.

clear, dump-test-list, run, stop, test-list, tests, wait

BUG=chrome-os-partner:20780,chrome-os:249097
TEST=Manual

Change-Id: Ib2a62d1589d31e356db8b52c26aee854d56ded7a
Reviewed-on: https://gerrit.chromium.org/gerrit/62666
Commit-Queue: Jon Salz <jsalz@chromium.org>
Reviewed-by: Jon Salz <jsalz@chromium.org>
Tested-by: Jon Salz <jsalz@chromium.org>
15 months agoMinijack: Refactor view htmls. 57/62957/3 stabilize-4443.B
Pi-Hsun Shih [Tue, 23 Jul 2013 01:48:30 +0000 (09:48 +0800)]
Minijack: Refactor view htmls.

Take out common elements of all pages, and put them into base.html. This
makes adding new buttons to navigation bar easier.

BUG=None
TEST=Manual
Start minijack frontend, check every page behaves as before the change.

Change-Id: Id5f4f018216177eaa1965a77442cb486e57edc56
Reviewed-on: https://gerrit.chromium.org/gerrit/62957
Commit-Queue: Pi-Hsun Shih <pihsun@chromium.org>
Reviewed-by: Pi-Hsun Shih <pihsun@chromium.org>
Tested-by: Pi-Hsun Shih <pihsun@chromium.org>
15 months agoMinijack: Add new HWID-oriented view 08/62808/4
Pi-Hsun Shih [Mon, 22 Jul 2013 09:35:28 +0000 (17:35 +0800)]
Minijack: Add new HWID-oriented view

The url /hwid would show data grouped by different HWID, components of
this HWID, and list of device having this HWID.

BUG=None
TEST=Manual
Start minijack frontend, check url /hwid.

Change-Id: Ic1c7851be8d7bf655ebc66f578a427e3e129e5ed
Reviewed-on: https://gerrit.chromium.org/gerrit/62808
Commit-Queue: Pi-Hsun Shih <pihsun@chromium.org>
Reviewed-by: Pi-Hsun Shih <pihsun@chromium.org>
Tested-by: Pi-Hsun Shih <pihsun@chromium.org>
15 months agoMinijack: Change border-collapse to separate for dataTable 07/62807/4
Pi-Hsun Shih [Mon, 22 Jul 2013 09:13:38 +0000 (17:13 +0800)]
Minijack: Change border-collapse to separate for dataTable

Currently, when there are many columns in a dataTable in minijack
frontend, the header and footer of the table would be misaligned.
This change fix the problem.

BUG=None
TEST=Manual
Start minijack frontend, check url /build, header and footer would be
aligned even when all columns are shown.

Change-Id: I761f9ff978e4415f8881edf467b590eacc2c9492
Reviewed-on: https://gerrit.chromium.org/gerrit/62807
Commit-Queue: Pi-Hsun Shih <pihsun@chromium.org>
Reviewed-by: Pi-Hsun Shih <pihsun@chromium.org>
Tested-by: Pi-Hsun Shih <pihsun@chromium.org>
15 months agoRMA: Add RMA mode argument to the hwid_v3 test 42/62942/2
Bernie Thompson [Tue, 23 Jul 2013 01:27:16 +0000 (18:27 -0700)]
RMA: Add RMA mode argument to the hwid_v3 test

For RMA mode we need to be able to leverage the rma_mode of the HWID v3
generator, so that we do not check for deprecated components.

BUG=chrome-os-partner:21224
TEST=Manual, run a test_list with the rma_mode argument.

Change-Id: I2cc7ceccd486bed1254741ae9f2d7af275444db9
Reviewed-on: https://gerrit.chromium.org/gerrit/62942
Reviewed-by: Ricky Liang <jcliang@chromium.org>
Commit-Queue: Bernie Thompson <bhthompson@chromium.org>
Tested-by: Bernie Thompson <bhthompson@chromium.org>
15 months agoRMA: Enable GenerateHwidV3 to accept the rma_mode flag 41/62941/2
Bernie Thompson [Tue, 23 Jul 2013 01:22:45 +0000 (18:22 -0700)]
RMA: Enable GenerateHwidV3 to accept the rma_mode flag

In the case of RMA we need to be able to ignore the components that
are deprecated, this is already in place however we need to plumb it
through the gooftool generate_hwid_v3 command to leverage it.

BUG=chrome-os-partner:21224
TEST=Manual, run `gooftool generate_hwid_v3` with and without --rma_mode

Change-Id: Ie112e0837f8887bdc099df940b9df515f3f7df66
Reviewed-on: https://gerrit.chromium.org/gerrit/62941
Reviewed-by: Ricky Liang <jcliang@chromium.org>
Commit-Queue: Bernie Thompson <bhthompson@chromium.org>
Tested-by: Bernie Thompson <bhthompson@chromium.org>
15 months agoSupport for new ectool chargecontrol command. 80/62580/2
Dave Parker [Fri, 19 Jul 2013 02:03:05 +0000 (19:03 -0700)]
Support for new ectool chargecontrol command.

See https://gerrit.chromium.org/gerrit/#/c/60689/
for the new ectool command.

BUG=chrome-os-partner:20506
TEST=Run charger test succesfully on Falco and
Peppy devices.

Change-Id: I591859c9afc49ceae2045614dd2d2018c53691a0
Reviewed-on: https://gerrit.chromium.org/gerrit/62580
Reviewed-by: Bowgo Tsai <bowgotsai@chromium.org>
Reviewed-by: Vic Yang <victoryang@chromium.org>
Commit-Queue: Dave Parker <dparker@chromium.org>
Tested-by: Dave Parker <dparker@chromium.org>
15 months agoRMA: Add unittest to simple rma shopfloor 52/62552/7
Bernie Thompson [Thu, 18 Jul 2013 18:07:13 +0000 (11:07 -0700)]
RMA: Add unittest to simple rma shopfloor

This adds in unittesting to the simple rma shopfloor server.

BUG=chrome-os-partner:20605
TEST=`make test` and observe simple_rma_shopfloor_unittest pass.

Change-Id: I90c230d746cf3c2f9233957476eb99b04f902f30
Reviewed-on: https://gerrit.chromium.org/gerrit/62552
Reviewed-by: Drew Haven <haven@chromium.org>
Tested-by: Bernie Thompson <bhthompson@chromium.org>
Commit-Queue: Bernie Thompson <bhthompson@chromium.org>

15 months agoFix a bug that timeout is not set in battery current test 41/62841/2
Vic Yang [Mon, 22 Jul 2013 06:38:55 +0000 (14:38 +0800)]
Fix a bug that timeout is not set in battery current test

The timeout should be propagated to PollForCondition.

BUG=None
TEST=Manual

Signed-off-by: Vic Yang <victoryang@chromium.org>
Reviewed-on: https://gerrit.chromium.org/gerrit/62801
Reviewed-by: Chun-Ta Lin <itspeter@google.com>
(cherry picked from commit 87205be0d4744ccbb2ae7b96145229055267dd39)

Change-Id: I6efb9b524ac4b70c5c623a19314ae74a7f4ce36e
Reviewed-on: https://gerrit.chromium.org/gerrit/62841
Reviewed-by: Cheng-Yi Chiang <cychiang@chromium.org>
Commit-Queue: Vic Yang <victoryang@chromium.org>
Tested-by: Vic Yang <victoryang@chromium.org>
15 months agoForce to flush event log if FATP.RF fixture test failed. 61/62461/3
Chun-ta Lin [Thu, 18 Jul 2013 09:35:07 +0000 (17:35 +0800)]
Force to flush event log if FATP.RF fixture test failed.

It is critical to get the event log data when a FATP.RF test fail.

BUG=chrome-os-partner:20854
TEST=mock N1914A to ensure test FAIL and observe manually that shopfloor
side have store the event logs.

Change-Id: I0f9f3d19b83ff0875c28823f8b9c6fb8db454c3f
Reviewed-on: https://gerrit.chromium.org/gerrit/62461
Commit-Queue: Chun-Ta Lin <itspeter@google.com>
Reviewed-by: Chun-Ta Lin <itspeter@google.com>
Tested-by: Chun-Ta Lin <itspeter@google.com>
15 months agoAdd an agument to choose not to detect factory update. 79/62779/3
Chun-ta Lin [Sun, 21 Jul 2013 10:25:56 +0000 (18:25 +0800)]
Add an agument to choose not to detect factory update.

Some test needs this argument to preserve its state in older version,
For example the VSWR test.

BUG=chrome-os-partner:20276
TEST=Manually with VSWR test_list.

Change-Id: I43ac9143d1a824df9906c4456a8270489435879f
Reviewed-on: https://gerrit.chromium.org/gerrit/62779
Commit-Queue: Chun-Ta Lin <itspeter@google.com>
Reviewed-by: Chun-Ta Lin <itspeter@google.com>
Tested-by: Chun-Ta Lin <itspeter@google.com>
15 months agoAdd command to get firmware hash 36/62636/4
henryhsu [Fri, 19 Jul 2013 16:07:38 +0000 (00:07 +0800)]
Add command to get firmware hash

We can execute the command in chroot.
So we can easily get corresponding hashes instead of probing on DUT

BUG=none
TEST=manually test

Change-Id: Ib2de956429efe16a0872e17d6f9a6096f4152d12
Reviewed-on: https://gerrit.chromium.org/gerrit/62636
Commit-Queue: Heng-ruey Hsu <henryhsu@chromium.org>
Reviewed-by: Heng-ruey Hsu <henryhsu@chromium.org>
Tested-by: Heng-ruey Hsu <henryhsu@chromium.org>
15 months agoArchive incremental events with reports 19/62619/5
Rong Chang [Fri, 19 Jul 2013 11:29:50 +0000 (04:29 -0700)]
Archive incremental events with reports

Lumberjack can be used to process in-progress events too. This change
adds incremental events to archive.

BUG=chrome-os-partner:20629
TEST=manual

Change-Id: I51c7620310fdc0e7fc050a3a50a2bfe3fa1ce06a
Reviewed-on: https://gerrit.chromium.org/gerrit/62619
Commit-Queue: Rong Chang <rongchang@chromium.org>
Tested-by: Rong Chang <rongchang@chromium.org>
Reviewed-by: Chun-Ta Lin <itspeter@google.com>
15 months agoRefining get_recovery_image.py for compatibility 92/62792/4
Chun-Yen Ho [Mon, 22 Jul 2013 01:17:46 +0000 (09:17 +0800)]
Refining get_recovery_image.py for compatibility

To maintain multiple configurations when doing auto-update, we add an option
to assign version offset.

Also, an restart option is add to manually re-run make_factory_packge
when necessary.

BUG=chrome-os-partner:20735
TEST=Auto Update
Change-Id: Ib9af08c34ca4dcef62c7300e250004fd56e458be
Reviewed-on: https://gerrit.chromium.org/gerrit/62792
Reviewed-by: Hung-Te Lin <hungte@chromium.org>
Commit-Queue: Chun-Yen Ho <chho@google.com>
Tested-by: Chun-Yen Ho <chho@google.com>
15 months agoAdd option to display high contrast background color in summary 73/62773/4
Rong Chang [Sat, 20 Jul 2013 09:13:13 +0000 (02:13 -0700)]
Add option to display high contrast background color in summary

This accessibility option increases the contrast between PASS and FAIL
summary page. Operator can tell the difference from 10 feet.

BUG=chrome-os-partner:20704
TEST=manual
  Enable this option in test_list, barriers background changed to light
  red when overall test status is not PASS.

Change-Id: I84f58f0401e034fcb03cd171838e6d9dd781e340
Reviewed-on: https://gerrit.chromium.org/gerrit/62773
Commit-Queue: Rong Chang <rongchang@chromium.org>
Reviewed-by: Rong Chang <rongchang@chromium.org>
Tested-by: Rong Chang <rongchang@chromium.org>
15 months agoFix schema error in cellular probe results. 89/62789/2
Ricky Liang [Mon, 22 Jul 2013 02:05:03 +0000 (10:05 +0800)]
Fix schema error in cellular probe results.

BUG=chrome-os-partner:21179
TEST=Run 'gooftool probe' on DUT and see no error.

Change-Id: I7b28c8d30c1606039707947e504c7950c324d8ce
Reviewed-on: https://gerrit.chromium.org/gerrit/62789
Reviewed-by: Cheng-Yi Chiang <cychiang@chromium.org>
Commit-Queue: Ricky Liang <jcliang@chromium.org>
Tested-by: Ricky Liang <jcliang@chromium.org>
15 months agoUnify logs to cherrypy.log and save to log_file 92/62592/8
Chun-Yen Ho [Fri, 19 Jul 2013 03:22:37 +0000 (11:22 +0800)]
Unify logs to cherrypy.log  and save to log_file

Instead of writing an extra log file separately, all logs are now
written by cherrypy.log. The logs are written to both screen and the log
file assigned by user('miniomaha.log' by default)

BUG=chrome-os-partner:21126
TEST=Run script and check the log file

Change-Id: Ifeaa139a16b28dbd78e561c0538273a6b6369813
Reviewed-on: https://gerrit.chromium.org/gerrit/62592
Reviewed-by: Hung-Te Lin <hungte@chromium.org>
Commit-Queue: Chun-Yen Ho <chho@google.com>
Tested-by: Chun-Yen Ho <chho@google.com>
15 months agoClean up miniomaha_engine to pass the lint check 62/62462/6
Chun-Yen Ho [Thu, 18 Jul 2013 09:31:27 +0000 (17:31 +0800)]
Clean up miniomaha_engine to pass the lint check

Clean up miniomaha_engine.py to meet the standard of lint style check.

BUG=chrome-os-partner:21126
TEST=pass lint check

Change-Id: I694cab0e02f5aef5a90a1af4e86b255984c75b18
Reviewed-on: https://gerrit.chromium.org/gerrit/62462
Reviewed-by: Hung-Te Lin <hungte@chromium.org>
Commit-Queue: Chun-Yen Ho <chho@google.com>
Tested-by: Chun-Yen Ho <chho@google.com>
15 months agoProcess greetings and compute session length 54/62454/10
Chun-Yen Ho [Thu, 18 Jul 2013 07:57:33 +0000 (15:57 +0800)]
Process greetings and compute session length

Process the hello and goodbye message sent from the download script,
also compute the session length from the greeting informations.

BUG=chrome-os-partner:21126
TEST=local test of greeting messages

Change-Id: Ieef63f32480ddf1bbc7308a264033ef23246a98d
Reviewed-on: https://gerrit.chromium.org/gerrit/62454
Reviewed-by: Hung-Te Lin <hungte@chromium.org>
Commit-Queue: Chun-Yen Ho <chho@google.com>
Tested-by: Chun-Yen Ho <chho@google.com>
15 months agoMinijack: Fix regular expression used in filtering 91/62791/3
Pi-Hsun Shih [Mon, 22 Jul 2013 02:20:07 +0000 (10:20 +0800)]
Minijack: Fix regular expression used in filtering

Currently, filtering would have incorrect result when there's space in
items.

BUG=None
TEST=Manual
Start minijack frontend, check url /build, filter against hwid would
return correct result.

Change-Id: I0f9f092e1e8b55c08e76e3fcab96341e55ae717c
Reviewed-on: https://gerrit.chromium.org/gerrit/62791
Commit-Queue: Pi-Hsun Shih <pihsun@chromium.org>
Reviewed-by: Pi-Hsun Shih <pihsun@chromium.org>
Tested-by: Pi-Hsun Shih <pihsun@chromium.org>
15 months agoMinijack: Set default value of output argument in query_view 88/62788/3
Pi-Hsun Shih [Mon, 22 Jul 2013 01:58:51 +0000 (09:58 +0800)]
Minijack: Set default value of output argument in query_view

Otherwise, output.lower() fails.

BUG=None
TEST=Manual
Start minijack frontend, check url /query, works without error.

Change-Id: Icfe9044f3707b9b483bcc13e4b518927995c6c1a
Reviewed-on: https://gerrit.chromium.org/gerrit/62788
Commit-Queue: Pi-Hsun Shih <pihsun@chromium.org>
Reviewed-by: Pi-Hsun Shih <pihsun@chromium.org>
Tested-by: Pi-Hsun Shih <pihsun@chromium.org>
15 months agoRMA: Add in a component name translation capability for RMA shopfloor 86/61986/6
Bernie Thompson [Mon, 15 Jul 2013 21:51:57 +0000 (14:51 -0700)]
RMA: Add in a component name translation capability for RMA shopfloor

In many cases the component name extracted from a HWID does not match what a
given factory or RMA center uses to name the same component, so we need
some way to translate between the names. This adds in an optional config
value from the rma_config_board.yaml file to define the translation.

BUG=chrome-os-partner:20537
TEST=Manual, run shopfloor server, check translation output.

Change-Id: I97b9869bbfaa54709f79bcc57a50ea87775561da
Reviewed-on: https://gerrit.chromium.org/gerrit/61986
Commit-Queue: Bernie Thompson <bhthompson@chromium.org>
Reviewed-by: Bernie Thompson <bhthompson@chromium.org>
Tested-by: Bernie Thompson <bhthompson@chromium.org>
15 months agoRMA: Enable simple rma shopfloor to be configured per board 12/61612/6
Bernie Thompson [Thu, 11 Jul 2013 21:38:39 +0000 (14:38 -0700)]
RMA: Enable simple rma shopfloor to be configured per board

Since we will want to be able to have the simple shopfloor server support a
variety of rma implementations, we can set the basic configurations up for it
using an external yaml file. This file is easily inserted into a rma bundle
using a board specific overlay.

BUG=chrome-os-partner:20537
TEST=Manual, run simple rma shopfloor server, try different
rma_config_board.yaml files and verify output.

Change-Id: Ic67ea00ae3c8844a4776ca38120b179a5bfdb8d7
Reviewed-on: https://gerrit.chromium.org/gerrit/61612
Reviewed-by: Drew Haven <haven@chromium.org>
Commit-Queue: Bernie Thompson <bhthompson@chromium.org>
Tested-by: Bernie Thompson <bhthompson@chromium.org>
15 months agoRMA: Enable simple rma shopfloor to decode hwidv3 values 07/61507/9
Bernie Thompson [Wed, 10 Jul 2013 23:53:06 +0000 (16:53 -0700)]
RMA: Enable simple rma shopfloor to decode hwidv3 values

For the typical RMA procedure, we need to be able to determine what the
DUT is in detail so that we can set the HWID back correctly later, this
means the server needs to be able to decode the HWID read out by the
reflashing station, as well as some other data from VPD.

BUG=chrome-os-partner:20537
TEST=Manual, run server, reflash a DUT with the reflashing station.

Change-Id: I1e7ed04429f3d271f41b380d82756ac3eaad6da5
Reviewed-on: https://gerrit.chromium.org/gerrit/61507
Reviewed-by: Drew Haven <haven@chromium.org>
Commit-Queue: Bernie Thompson <bhthompson@chromium.org>
Tested-by: Bernie Thompson <bhthompson@chromium.org>
15 months agoRMA: add a GetDeviceInfo function to the simple rma shopfloor 30/61230/6
Bernie Thompson [Tue, 9 Jul 2013 01:04:10 +0000 (18:04 -0700)]
RMA: add a GetDeviceInfo function to the simple rma shopfloor

To support HWIDv3 generation on the DUT, it will need to be able to get some
basic information about what it is, particularly regarding aspects which are
not probe-able. This adds the GetDeviceInfo function to collect such
information from the DUT's RMA YAML file.

This will eventually work together with HWIDv3 decoding in the rma shopfloor
to put the fields in question into the YAML file to begin with, as well as
RMA center sourced events for replacement parts.

BUG=chrome-os-partner:20537
TEST=Manual, run shopfloor, request GetDeviceInfo from DUT.

Change-Id: I7cdcce78515e389a6ff709404cc95049288c561a
Reviewed-on: https://gerrit.chromium.org/gerrit/61230
Reviewed-by: Drew Haven <haven@chromium.org>
Commit-Queue: Bernie Thompson <bhthompson@chromium.org>
Tested-by: Bernie Thompson <bhthompson@chromium.org>
15 months agoRMA: Allow simple RMA shopfloor to verify a YAML exists 29/61229/6
Bernie Thompson [Mon, 8 Jul 2013 23:45:23 +0000 (16:45 -0700)]
RMA: Allow simple RMA shopfloor to verify a YAML exists

In some RMA implementations, the RMA shopfloor server should have a YAML file
in place for a device before the device requests validation of its own RMA
number. Typically the YAML file will have been put in place by the reflashing
station. This adds in a basic check to see if the YAML file exists for a given
RMA number.

BUG=chrome-os-partner:20537
TEST=Manual, run shopfloor, request RMA number validation from DUT, observe
the new message.

Change-Id: I769cf9f17596b57a0fe3904c87d1cac16b78ef87
Reviewed-on: https://gerrit.chromium.org/gerrit/61229
Reviewed-by: Drew Haven <haven@chromium.org>
Commit-Queue: Bernie Thompson <bhthompson@chromium.org>
Tested-by: Bernie Thompson <bhthompson@chromium.org>
15 months agoAdd partition_table test. 22/62522/4
Jon Salz [Thu, 18 Jul 2013 20:28:53 +0000 (04:28 +0800)]
Add partition_table test.

This test checks that the stateful partition covers most of storage device.

BUG=chrome-os-partner:21108
TEST=Run on device both under and over the min_usage_pct threshold

Change-Id: I42016478c902a91ce0dcd979077a14c95a150ca1
Reviewed-on: https://gerrit.chromium.org/gerrit/62522
Tested-by: Jon Salz <jsalz@chromium.org>
Reviewed-by: Shuo-Peng Liao <deanliao@chromium.org>
Commit-Queue: Jon Salz <jsalz@chromium.org>

15 months agoStart DHCP, TFTP, and shopfloor server with sudo. 59/62459/3
Chinyue Chen [Thu, 18 Jul 2013 09:22:26 +0000 (17:22 +0800)]
Start DHCP, TFTP, and shopfloor server with sudo.

BUG=None
TEST=Manual

Change-Id: I41349c731edddebbdad554eb65bf7a09c89ecaa6
Reviewed-on: https://gerrit.chromium.org/gerrit/62459
Tested-by: Chinyue Chen <chinyue@chromium.org>
Reviewed-by: Cheng-Yi Chiang <cychiang@chromium.org>
Commit-Queue: Chinyue Chen <chinyue@chromium.org>

15 months agoFix logging in reading VPD 57/62457/3
Cheng-Yi Chiang [Thu, 18 Jul 2013 08:34:28 +0000 (16:34 +0800)]
Fix logging in reading VPD

We should not log data in VPD because it contains data such as
registration code.
Shell command should have an arg to decide to log command output or not.

BUG=chrome-os-partner:21078
TEST=set value to VPD by vpd -s "test"="123"
     run finalize with wrong HWID. When finalize fail, check there is no
     vpd value being logged in factory.log

Change-Id: I3b8e1325b4cbd7c11d5e2f0bf74cefd1d3f547d5
Reviewed-on: https://gerrit.chromium.org/gerrit/62457
Reviewed-by: Cheng-Yi Chiang <cychiang@chromium.org>
Tested-by: Cheng-Yi Chiang <cychiang@chromium.org>
Commit-Queue: Cheng-Yi Chiang <cychiang@chromium.org>

15 months agoCHERRY-PICK: PyTestInfo: Fix ReadTestList for test_list v2 56/62456/2
Cheng-Yi Chiang [Tue, 16 Jul 2013 15:47:38 +0000 (23:47 +0800)]
CHERRY-PICK: PyTestInfo: Fix ReadTestList for test_list v2

ReadTestList in PyTestInfo should handle test list for both v1 and v2.
This is used in summary (barrier) and finalize.

BUG=chrome-os-partner:20968
TEST=run barrier test using test_list v2

Original Change-Id: Icf62b02e24df0a36e9526a855fbdd15d5d7c81c4
Original Reviewed-on: https://gerrit.chromium.org/gerrit/62111
Original Reviewed-by: Ricky Liang <jcliang@chromium.org>
Original Reviewed-by: Jon Salz <jsalz@chromium.org>
Original Commit-Queue: Cheng-Yi Chiang <cychiang@chromium.org>
Original Tested-by: Cheng-Yi Chiang <cychiang@chromium.org>
(cherry picked from commit 574f1592676a47663a9d9c078d75a639cb79ebe1)

Change-Id: I4107e173e90fdce738197aa893e2916f54611102
Reviewed-on: https://gerrit.chromium.org/gerrit/62456
Reviewed-by: Ricky Liang <jcliang@chromium.org>
Tested-by: Cheng-Yi Chiang <cychiang@chromium.org>
Commit-Queue: Cheng-Yi Chiang <cychiang@chromium.org>

15 months agoControl FlushEventLog through args for finalize and sync_shopfloor 65/62465/2
Cheng-Yi Chiang [Thu, 18 Jul 2013 10:40:24 +0000 (18:40 +0800)]
Control FlushEventLog through args for finalize and sync_shopfloor

BUG=chrome-os-partner:20854
TEST=run sync_shopfloor and finalize with sync_event_logs set to False

Change-Id: I8a9859395f8e65fa1997871f10cf6cb2fdb793bc
Reviewed-on: https://gerrit.chromium.org/gerrit/62465
Reviewed-by: Jon Salz <jsalz@chromium.org>
Commit-Queue: Cheng-Yi Chiang <cychiang@chromium.org>
Tested-by: Cheng-Yi Chiang <cychiang@chromium.org>
15 months agoRevert "Add a new test_list option sync_event_log" 64/62464/2
Cheng-Yi Chiang [Thu, 18 Jul 2013 03:47:20 +0000 (11:47 +0800)]
Revert "Add a new test_list option sync_event_log"

This reverts commit 3e5ec7b55ce7fcab7329d1992c9cc4fe72c596ee.

BUG=chrome-os-partner:20854
TEST=run goofy

Change-Id: Ia942cc18096c51b01927163aa74cbde59dd6e068
Reviewed-on: https://gerrit.chromium.org/gerrit/62464
Reviewed-by: Jon Salz <jsalz@chromium.org>
Commit-Queue: Cheng-Yi Chiang <cychiang@chromium.org>
Tested-by: Cheng-Yi Chiang <cychiang@chromium.org>
15 months agohwid: Add more firmware IDs to eMMC probe values. 69/59869/2
Ricky Liang [Tue, 25 Jun 2013 03:09:31 +0000 (11:09 +0800)]
hwid: Add more firmware IDs to eMMC probe values.

BUG=chrome-os-partner:20381
TEST=Manually on DUT.

Change-Id: I2c23bf0817a82e2f9a6a66c4d970af71153dcdcc
Reviewed-on: https://gerrit.chromium.org/gerrit/59869
Reviewed-by: Jon Salz <jsalz@chromium.org>
Tested-by: Ricky Liang <jcliang@chromium.org>
Commit-Queue: Ricky Liang <jcliang@chromium.org>

15 months agoDelete cleanup_logs_paused_path if needed. 08/62608/2
Cheng-Yi Chiang [Fri, 19 Jul 2013 06:30:45 +0000 (14:30 +0800)]
Delete cleanup_logs_paused_path if needed.

options.disable_log_rotation now controls /var/lib/cleanup_logs_paused.
If it is set to True(default) the file will present.
If it is set to False, the file we get deleted.
This will save log space when switching to RRT test_list from main
test_list.

BUG=None
TEST=run goofy with option.disable_log_rotation set to True/False, check
file /var/lib/cleanup_logs_paused is present/absent.
Change-Id: I314def76e49d64449a14d81a06c05cca740cdae7
Reviewed-on: https://gerrit.chromium.org/gerrit/62608
Reviewed-by: Chun-Ta Lin <itspeter@google.com>
Commit-Queue: Cheng-Yi Chiang <cychiang@chromium.org>
Tested-by: Cheng-Yi Chiang <cychiang@chromium.org>
15 months agoFix typo. 61/62361/2
Jon Salz [Thu, 11 Jul 2013 00:30:35 +0000 (08:30 +0800)]
Fix typo.

BUG=chrome-os-partner:20780,chromium:249097
TEST=Manually run command on device

Change-Id: Ie2238c92fb8d4ce3a11a2f6ed0b60ced08ba9029
Reviewed-on: https://gerrit.chromium.org/gerrit/61514
Commit-Queue: Jon Salz <jsalz@chromium.org>
Reviewed-by: Jon Salz <jsalz@chromium.org>
Tested-by: Jon Salz <jsalz@chromium.org>
(cherry picked from commit b084a40c7561ba0aaa8acd17b4f49f74a659e238)
Reviewed-on: https://gerrit.chromium.org/gerrit/62361

15 months agoGeneric "factory" tool for miscellaneous commands on DUTs. 60/62360/2
Jon Salz [Wed, 10 Jul 2013 18:58:32 +0000 (02:58 +0800)]
Generic "factory" tool for miscellaneous commands on DUTs.

BUG=chrome-os-partner:20780,chrome-os:249097
TEST=None

Change-Id: I9345b2bf32cd889cc6a976b7f72a0d74972760dd
Reviewed-on: https://gerrit.chromium.org/gerrit/61475
Tested-by: Jon Salz <jsalz@chromium.org>
Reviewed-by: Shuo-Peng Liao <deanliao@chromium.org>
Commit-Queue: Jon Salz <jsalz@chromium.org>
Reviewed-by: Jon Salz <jsalz@chromium.org>
(cherry picked from commit f626aecf6681c0299b05e313de22b8f07d32c9be)
Reviewed-on: https://gerrit.chromium.org/gerrit/62360