how to run autotest suite in chrome OS

739 views
Skip to first unread message

hara acharya

unread,
Feb 9, 2014, 2:32:16 AM2/9/14
to chromiu...@chromium.org
I have been trying to find out a way to run all default autotest tests in chrome OS but not been able to set it up.

Not getting a proper documentation where in it properly describes about client and server and the difference between the two. 

Can anybody help me with the below questions ?

1. How to setup autotest in chrome OS?
2. How to run complete autotest suite in chrome OS?
3. is there a single script which will run the complete autotest suite ?

Note:
Tried cloning the autotest from git and run it in ubuntu to see how it works in ubuntu. But I am getting a error 
"File "client/tests/autotest_regression/autotest_regression.py", line 3, in <module>
    from autotest.client import test, utils
ImportError: No module named autotest.client"




Mike Frysinger

unread,
Feb 9, 2014, 2:51:09 AM2/9/14
to hara acharya, chromium-os-dev
check out this page:

it's what i use to run random autotests in a VM
-mike


--
--
Chromium OS Developers mailing list: chromiu...@chromium.org
View archives, change email options, or unsubscribe:
http://groups.google.com/a/chromium.org/group/chromium-os-dev?hl=en
 

hara acharya

unread,
Feb 9, 2014, 2:56:44 AM2/9/14
to chromiu...@chromium.org, hara acharya
Hi Mike thanks for the reply.
But I want to run autotest suite on a hardware which has chrome OS installed on it.
Is there a proper document on how to set it up and run the suite?

Regards
Hara

Mike Frysinger

unread,
Feb 9, 2014, 2:58:23 AM2/9/14
to hara acharya, chromium-os-dev
you need to build & install a dev (or test) image.  once you have that, the instructions i posted should work too.  it doesn't require a VM ... any remote device should be OK.
-mike

hara acharya

unread,
Feb 9, 2014, 3:29:31 AM2/9/14
to chromiu...@chromium.org, hara acharya
Sorry to bother you. Just for my understanding I am writing the steps below. Please correct me if I am wrong.

1. Create a ubuntu/linux server and clone https://github.com/autotest/autotest into the ubuntu machine.
2. Connect the chrome device to the ubuntu server using ssh.
3. Use below command to run the smoke test suite.
./run_remote_tests.sh --remote=localhost --ssh_port 9222 --board=${BOARD} --use_emerged suite:smoke
Not sure what to use for --board.

Is there a easy way to run the below client directly on chrome device as a suite?

Mike Frysinger

unread,
Feb 9, 2014, 3:33:11 AM2/9/14
to chromium-os-dev
Chromium OS has its own fork of autotest.  that's what we have integrated and use everywhere.  sorry, but i have no idea how to use the upstream autotest project you're referring to.
-mike

hara acharya

unread,
Feb 9, 2014, 3:43:58 AM2/9/14
to chromiu...@chromium.org
So if autotest is integrated into chromium OS, can I directly run the whole autotest suite directly on the chrome device and logs will get collected in the chrome device ?

If so which script/py file will run autotest suite can directly on the device ?
Because I tried installing a dev chrome image on a hardware, but couldn't figure out a way to run autotest on the device.

hara acharya

unread,
Feb 9, 2014, 3:44:10 AM2/9/14
to chromiu...@chromium.org
So if autotest is integrated into chromium OS, can I directly run the whole autotest suite directly on the chrome device and logs will get collected in the chrome device ?

If so which script/py file will run autotest suite can directly on the device ?
Because I tried installing a dev chrome image on a hardware, but couldn't figure out a way to run autotest on the device.



On Sunday, February 9, 2014 12:33:11 AM UTC-8, Mike Frysinger wrote:

Mike Frysinger

unread,
Feb 9, 2014, 3:47:01 AM2/9/14
to hara acharya, chromium-os-dev
you would normally:
- build a custom image
- deploy that on your device
- run the autotests that are part of the sdk (see the directions i posted earlier)
-mike

hara acharya

unread,
Feb 9, 2014, 3:53:31 AM2/9/14
to chromiu...@chromium.org, hara acharya
So we don't need a separate server to run autotest remotely on the chrome device.
If we have the correct chrome os with cros sdk installed on a device, just running the below command directly on the chrome device will run the smoke suite and store the result in the same chrome device ?
./run_remote_tests.sh --remote=localhost --ssh_port 9222 --board=${BOARD} --use_emerged suite:smoke

If so, I will try to build a chrome OS with sdk now.
Please correct if if I am wrong.

Daniel Erat

unread,
Feb 9, 2014, 10:25:42 AM2/9/14
to hara acharya, Chromium OS dev
No, you need to install the Chromium OS SDK on a separate computer that is running Ubuntu, as described in the "Prerequisites" section of the page that Mike linked to at http://dev.chromium.org/chromium-os/developer-guide.

I don't believe that it's possible to run autotest directly on the device, even if you manage to install the SDK there -- note that some tests need to reboot the device that's being tested.

Dheepthi J.J

unread,
Apr 17, 2017, 2:11:04 PM4/17/17
to Chromium OS dev, hara.a...@gmail.com
Hi opensource_freak,
Were you successful in running auto test in chromebook real device?
If so can you share the steps?

Regards,
Dheepthi

Mike Frysinger

unread,
Apr 17, 2017, 2:13:33 PM4/17/17
to Dheepthi J.J, Chromium OS dev, hara acharya
please see the docs already linked to in this thread:

if you're running into problems, please start a new thread and detail what exactly you're doing and how it's failing.
-mike

Hara Acharya

unread,
Apr 17, 2017, 2:42:42 PM4/17/17
to Dheepthi J.J, Chromium OS dev
Hi Dheepthi,
Autotest needs a host machine and build setup, only then you can run autotest on chrome-devices.
Follow the steps from below links to create the host machine environment.

Once you have the setup (cros_sdk environment),
Go inside cros_sdk environment and then run beow command
cros_sdk ebv # ./build_packages --board=<which ever board you want to run autotest on>
You will get board name from "overlays" folder.

Once you have the build environment, you can run any of the client-side and server side autotests from the host machine.

Few things to note: 
Make sure both host machine and test machine are in same network so that you can ping both ways.
Avoid using proxy environment. Try to use open network for test.
All tests will be available inside cros_sdk in below location after ./build_packages is done.
/build/<board name>/usr/local/build/autotest/server or client/site_tests/

To run any test from host machine use below command.
cros_sdk env# test_that -b <board name> <ip of test machine> <test name>

Regards







Dheepthi J.J

unread,
Apr 17, 2017, 4:10:36 PM4/17/17
to Chromium OS dev, saidh...@gmail.com
Thanks much for detailed information.
I'll try and open a new thread if i face any issues.

Thanks again. Appreciate your support.

Regards,
Dheepthi
Reply all
Reply to author
Forward
This conversation is locked
You cannot reply and perform actions on locked conversations.
0 new messages