New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 609034 link

Starred by 2 users

Issue metadata

Status: Fixed
Owner:
Last visit > 30 days ago
Closed: Aug 2016
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 3
Type: Feature



Sign in to add a comment

Support offline factory tests on non-ChromeOS environment

Project Member Reported by shunhsingou@chromium.org, May 4 2016

Issue description

Currently we have station-based factory software for testing non-ChromeOS devices, and we also have some offline tests for long running tasks in factory. However, offline tests fail to run on non-ChromeOS devices currently. This bug is used to track the fixes.
 
Project Member

Comment 1 by bugdroid1@chromium.org, May 6 2016

The following revision refers to this bug:
  https://chromium.googlesource.com/chromiumos/platform/factory/+/4763b730a51ca1f7c59cb50722c09fed0e3c2f58

commit 4763b730a51ca1f7c59cb50722c09fed0e3c2f58
Author: Shun-Hsing Ou <shunhsingou@chromium.org>
Date: Wed May 04 07:41:05 2016

offline_test: use toybox sed instead of awk

Some boards do not have awk in the test image. Use 'toybox sed' instead.

BUG= chromium:609034 
TEST=manually

Change-Id: I7df568a5e709c67ebbe0b815506e116c4142a992
Reviewed-on: https://chromium-review.googlesource.com/342169
Commit-Ready: Shun-Hsing Ou <shunhsingou@chromium.org>
Tested-by: Shun-Hsing Ou <shunhsingou@chromium.org>
Reviewed-by: Wei-Han Chen <stimim@chromium.org>

[modify] https://crrev.com/4763b730a51ca1f7c59cb50722c09fed0e3c2f58/py/test/pytests/offline_test/shell/main.sh

Project Member

Comment 2 by bugdroid1@chromium.org, May 6 2016

The following revision refers to this bug:
  https://chromium.googlesource.com/chromiumos/platform/factory/+/6d243de7a11e6d91a119d5a9b3510e0409ab8da2

commit 6d243de7a11e6d91a119d5a9b3510e0409ab8da2
Author: Shun-Hsing Ou <shunhsingou@chromium.org>
Date: Wed May 04 07:38:11 2016

offline_test: support offline tests without reboot device.

Currently we support running test immediately after deploying. However,
the implementation requires the device to be connected to the station
during the entire test. Fix this problem by using nohup.

BUG= chromium:609034 
TEST=Manually

Change-Id: Ief86c8701d5f06f3b3254a40572c0c9a8a5ff74a
Reviewed-on: https://chromium-review.googlesource.com/342168
Commit-Ready: Shun-Hsing Ou <shunhsingou@chromium.org>
Tested-by: Shun-Hsing Ou <shunhsingou@chromium.org>
Reviewed-by: Wei-Han Chen <stimim@chromium.org>

[modify] https://crrev.com/6d243de7a11e6d91a119d5a9b3510e0409ab8da2/py/test/pytests/offline_test/shell/deploy.py

Project Member

Comment 3 by bugdroid1@chromium.org, May 6 2016

The following revision refers to this bug:
  https://chromium.googlesource.com/chromiumos/platform/factory/+/879390522b23c1aeb59a81a5c233eb676100a94d

commit 879390522b23c1aeb59a81a5c233eb676100a94d
Author: Shun-Hsing Ou <shunhsingou@chromium.org>
Date: Wed May 04 07:35:14 2016

offline_test: make shared memory path a variable in stressapptest

Previously we use hardcoded /dev/shm for the shared memory path in the
stressapptest script. However, this may be different for different
boards and some boards does not have the shared memory. Make this a
variable to support more boards.

BUG= chromium:609034 
TEST=Manually

Change-Id: Ie3a1e3e4e868e6ded82b3eed5c94e2992dea9b38
Reviewed-on: https://chromium-review.googlesource.com/342167
Commit-Ready: Shun-Hsing Ou <shunhsingou@chromium.org>
Tested-by: Shun-Hsing Ou <shunhsingou@chromium.org>
Reviewed-by: Wei-Han Chen <stimim@chromium.org>

[modify] https://crrev.com/879390522b23c1aeb59a81a5c233eb676100a94d/py/test/pytests/offline_test/shell/deploy.py
[modify] https://crrev.com/879390522b23c1aeb59a81a5c233eb676100a94d/py/test/pytests/offline_test/shell/stressapptest.sh

Project Member

Comment 4 by bugdroid1@chromium.org, May 6 2016

The following revision refers to this bug:
  https://chromium.googlesource.com/chromiumos/platform/factory/+/ad0d4a66c6a0c48702f84e6b2c0aec958a628080

commit ad0d4a66c6a0c48702f84e6b2c0aec958a628080
Author: Shun-Hsing Ou <shunhsingou@chromium.org>
Date: Wed May 04 06:14:25 2016

offline_test: Make shebang a template variable

In different boards, the path to the correct sh/bash binary may be different.
To make sure we can run the scripts in different target board, the
sheband should be a template variable and decided during deploy.

BUG= chromium:609034 
TEST=Manually

Change-Id: Id602391f18ed69b2043170ae3031f9d1249f1043
Reviewed-on: https://chromium-review.googlesource.com/342166
Commit-Ready: Shun-Hsing Ou <shunhsingou@chromium.org>
Tested-by: Shun-Hsing Ou <shunhsingou@chromium.org>
Reviewed-by: Wei-Han Chen <stimim@chromium.org>

[modify] https://crrev.com/ad0d4a66c6a0c48702f84e6b2c0aec958a628080/py/test/pytests/offline_test/shell/deploy.py
[modify] https://crrev.com/ad0d4a66c6a0c48702f84e6b2c0aec958a628080/py/test/pytests/offline_test/shell/starter.sh
[modify] https://crrev.com/ad0d4a66c6a0c48702f84e6b2c0aec958a628080/py/test/pytests/offline_test/shell/main.sh

Project Member

Comment 5 by bugdroid1@chromium.org, May 6 2016

The following revision refers to this bug:
  https://chromium.googlesource.com/chromiumos/platform/factory/+/e76fddc31d236bfad68fd2c49ddd698f610dc1d5

commit e76fddc31d236bfad68fd2c49ddd698f610dc1d5
Author: Shun-Hsing Ou <shunhsingou@chromium.org>
Date: Wed May 04 06:11:21 2016

DUT: implement GetFactoryRoot for Android storage.

We choose /data/local/factory as the location to store persist factory data.
/data/local/factory/source is used for factory software, and
/data/local/factory/data is used for persist factory data.

BUG= chromium:609034 
TEST=Manually

Change-Id: If6fe9bbb5fc525380cf02eebbd7a583afdf1c9b2
Reviewed-on: https://chromium-review.googlesource.com/342165
Commit-Ready: Shun-Hsing Ou <shunhsingou@chromium.org>
Tested-by: Shun-Hsing Ou <shunhsingou@chromium.org>
Reviewed-by: Wei-Han Chen <stimim@chromium.org>

[modify] https://crrev.com/e76fddc31d236bfad68fd2c49ddd698f610dc1d5/py/test/dut/storage.py

Project Member

Comment 6 by bugdroid1@chromium.org, May 7 2016

The following revision refers to this bug:
  https://chromium.googlesource.com/chromiumos/platform/factory/+/e163481ee47f5e21c1c3cd4b92738dac578dcdcb

commit e163481ee47f5e21c1c3cd4b92738dac578dcdcb
Author: Shun-Hsing Ou <shunhsingou@chromium.org>
Date: Thu May 05 02:02:50 2016

offline_test: Implement start up job as a board component

Different boards may have different methods to add / remove a start up
application. We should not put the implementation into the pytest.
Create a FactoryInit dut component to add / remove start up applications.

BUG= chromium:609034 , chromium:506788 
TEST=Run init_unittest.py and test on Lucid.

Change-Id: Ie508598ece44ab31421afa922ea39c821f8db880
Reviewed-on: https://chromium-review.googlesource.com/342514
Commit-Ready: Shun-Hsing Ou <shunhsingou@chromium.org>
Tested-by: Shun-Hsing Ou <shunhsingou@chromium.org>
Reviewed-by: Shun-Hsing Ou <shunhsingou@chromium.org>
Reviewed-by: Wei-Han Chen <stimim@chromium.org>

[add] https://crrev.com/e163481ee47f5e21c1c3cd4b92738dac578dcdcb/py/test/dut/init_unittest.py
[modify] https://crrev.com/e163481ee47f5e21c1c3cd4b92738dac578dcdcb/py/test/dut/board.py
[modify] https://crrev.com/e163481ee47f5e21c1c3cd4b92738dac578dcdcb/py/test/pytests/offline_test/shell/deploy.py
[delete] https://crrev.com/9eb203a3afff97d27ccbd7234dc98b889b9ccbcf/py/test/pytests/offline_test/shell/stub_startup.sh
[modify] https://crrev.com/e163481ee47f5e21c1c3cd4b92738dac578dcdcb/py/test/pytests/offline_test/shell/common.py
[modify] https://crrev.com/e163481ee47f5e21c1c3cd4b92738dac578dcdcb/py/test/pytests/offline_test/shell/fetch_log.py
[add] https://crrev.com/e163481ee47f5e21c1c3cd4b92738dac578dcdcb/py/test/dut/init.py
[add] https://crrev.com/e163481ee47f5e21c1c3cd4b92738dac578dcdcb/sh/stub_startup.sh

Project Member

Comment 7 by bugdroid1@chromium.org, May 11 2016

The following revision refers to this bug:
  https://chromium.googlesource.com/chromiumos/platform/factory/+/d1724fab21e344e980c1cde37a5a9092bb2c19e9

commit d1724fab21e344e980c1cde37a5a9092bb2c19e9
Author: Shun-Hsing Ou <shunhsingou@chromium.org>
Date: Wed May 11 09:15:56 2016

deplay_util: add sh for running command

factory.par has sheband '/bin/sh'. However, this is not current for some
boards. Use sh for running factory.par to avoid the problem.

BUG= chromium:609034 
TEST=Manually

Change-Id: Ie444a258c05eb81c28bfe1cba75944391b28853b
Reviewed-on: https://chromium-review.googlesource.com/344190
Commit-Ready: Shun-Hsing Ou <shunhsingou@chromium.org>
Tested-by: Shun-Hsing Ou <shunhsingou@chromium.org>
Reviewed-by: Wei-Han Chen <stimim@chromium.org>

[modify] https://crrev.com/d1724fab21e344e980c1cde37a5a9092bb2c19e9/py/test/utils/deploy_utils_unittest.py
[modify] https://crrev.com/d1724fab21e344e980c1cde37a5a9092bb2c19e9/py/test/utils/deploy_utils.py

Cc: phoenixshen@chromium.org
Project Member

Comment 9 by bugdroid1@chromium.org, May 18 2016

The following revision refers to this bug:
  https://chromium.googlesource.com/chromiumos/platform/factory/+/003a6141821f1cffebcbc9c7bb2a80f2840beaa0

commit 003a6141821f1cffebcbc9c7bb2a80f2840beaa0
Author: Shun-Hsing Ou <shunhsingou@chromium.org>
Date: Wed May 11 08:08:09 2016

dut: abstract board.py and some components

Originally, we put the default implementation, which is for Chrome OS, into
board.py Also, most components are implemented for Chrome OS. Other kinds of
boards, e.g. Android, need to override those components if required. This
causes many unnecessary dependencies on those boards, making it difficult for
offline tests.

This CL abstracts board.py to avoid such problem. A linux board is
created for some default implementation, and more specific
implementation is done in chromeos.py and android.py

Component bluetooth and display are also abstracted since the original
implementation is highly related to Chrome OS.

Other components should also be abstracted if required in the future.

BUG= chromium:609034 
TEST=make test

Change-Id: I00af5b597b9148452e85949adeb9eaf0cf3adcc4
Reviewed-on: https://chromium-review.googlesource.com/344152
Commit-Ready: Hung-Te Lin <hungte@chromium.org>
Tested-by: Hung-Te Lin <hungte@chromium.org>
Reviewed-by: Hung-Te Lin <hungte@chromium.org>

[add] https://crrev.com/003a6141821f1cffebcbc9c7bb2a80f2840beaa0/py/test/dut/chromeos/__init__.py
[modify] https://crrev.com/003a6141821f1cffebcbc9c7bb2a80f2840beaa0/py/test/dut/boards/chromeos.py
[add] https://crrev.com/003a6141821f1cffebcbc9c7bb2a80f2840beaa0/py/test/dut/boards/linux.py
[modify] https://crrev.com/003a6141821f1cffebcbc9c7bb2a80f2840beaa0/py/test/dut/display.py
[modify] https://crrev.com/003a6141821f1cffebcbc9c7bb2a80f2840beaa0/py/test/utils/deploy_utils_unittest.py
[modify] https://crrev.com/003a6141821f1cffebcbc9c7bb2a80f2840beaa0/py/test/dut/board.py
[modify] https://crrev.com/003a6141821f1cffebcbc9c7bb2a80f2840beaa0/py/test/dut/bluetooth.py
[add] https://crrev.com/003a6141821f1cffebcbc9c7bb2a80f2840beaa0/py/test/dut/chromeos/display.py
[modify] https://crrev.com/003a6141821f1cffebcbc9c7bb2a80f2840beaa0/py/test/dut/board_unittest.py
[add] https://crrev.com/003a6141821f1cffebcbc9c7bb2a80f2840beaa0/py/test/dut/chromeos/bluetooth.py
[modify] https://crrev.com/003a6141821f1cffebcbc9c7bb2a80f2840beaa0/py/test/dut/boards/android.py

Hi Earl, do you have further works on this or can we close it now?
Status: Fixed (was: Started)
This has been verified on non Chrome OS project. Make as fixed.

Sign in to add a comment