Add function for android test to connect wifi on lab

Registered by Yongqin Liu

Thread: http://lists.linaro.org/pipermail/linaro-validation/2012-July/000712.html

IRC Talk:
<liuyq> doanac`, for disable-suspend it won't make much sense I think, but for the wifi password information I want to get something like that
<liuyq> doanac`, the disablesuspend.sh won't change too much, also the url of it, I think
<doanac`> liuyq: but if you put wifi password information into dispatcher config, does that mean lava-android-test won't be able to run that test correctly without being in LAVA?
<liuyq> doanac`, yes, so I consider to put it in the root /etc directory
<liuyq> doanac`, it won't be different for each instance I think
<doanac`> liuyq: so what happens if a person wants to run the wifi test in their own environment? does this mean they'll have to have their access point configured the same as we have?
<mwhudson> no, it means they'd have to put the config for their WAP in their config surely?
<jackh> liuyq: maybe you can try pass the password as a option or parameter?
<doanac`> mwhudson: so which config directory are you saying? the etc?
<mwhudson> doanac`: i guess $LAVA_INSTANCE/etc
<mwhudson> oh hang on, it's lava-android-test that wants it isn't it?
<doanac`> mwhudson: yep
<mwhudson> still
<mwhudson> does lava-android-test have a config file yet?
<doanac`> i don't think so
<mwhudson> i guess it needs one then :)
<liuyq> mwhudson, doanac`, it's ok for the config to have only the ssid and password for it(password is optional for open ssid)
<mwhudson> unless it's read out of the dispatcher config and passed to l-a-t as an option, but that seems like dodging the issue really
<doanac`> mwhudson, liuyq: sounds like we need a "lava-android-test setconfig key=val" type command
<doanac`> we could then update the dispatcher to call this with a $LAVA_INSTANCE/etc approach like mwhudson mentioned
<liuyq> but the information is not only needed for android, wifi test for normal linux also needs it I think
<doanac`> liuyq: i'd say lava-test would need a similar feature.
<doanac`> does this sound reasonable? its late here, so I could be fixed on a bad idea
<mwhudson> doanac`: why would the dispatcher need to call it? just to reduce the amount of things that need to be configured?
<doanac`> mwhudson: if the dispatcher didn't call it, who would? or are you saying we'd ship with a default config that happened to work just how we needed in the lab?
<mwhudson> doanac`: no, i'm saying we'd configure it in the lab
<mwhudson> the same way we've configured LAVA_SERVER_IP
<doanac`> mwhudson: I think we are agreeing:
<doanac`> we'd have something like LAVA_WIFI_PASSWORD.
<doanac`> when we ran lava-android-test-install action, we'd have to set this on the target
<liuyq> yes, I agree with some like what mwhudson said, but I still feel we should put the information in root /etc not $INSTANCE/etc
<liuyq> then we don't need to set for each instance
<doanac`> liuyq: /etc of the android target?
<doanac`> or the host?
<liuyq> doanac`, not set via lava-android-test-install I think, if so how can lava-android-test-install get the password information
<mwhudson> doanac`: i think lava-android-test would take care of that, no?
<liuyq> doanac`, no host
<liuyq> sorry, I mean host
<doanac`> liuyq: and how does lava-android-test get the value from the host to the target?
<liuyq> lava-android-test should take care, but it should only know how to get, that's will be ok
<liuyq> the script I attached in the thread will do that
<doanac`> actually - I think I understand now
<doanac`> liuyq, mwhudson: sorry - i understand now. what you are saying makes sense.
<mwhudson> doanac`: good good :)
<liuyq> doanac`, mwhudson, so for the conclusion, it's ok to put it in /etc/lava/devices/wifi?
<liuyq> doanac`, mwhudson, or put it in $INSTANCE/etc/lava/devices/wifi?
<mwhudson> liuyq: instance vs machine wide... i don't really care -- do note though that hopefully soon staging and production will be on different machines
<doanac`> liuyq: i lean toward either /etc or $USER/.lava type thing that way lava-android-test won't depend on a LAVA instance

Blueprint information

Status:
Complete
Approver:
Andy Doan
Priority:
Undefined
Drafter:
Yongqin Liu
Direction:
Approved
Assignee:
Yongqin Liu
Definition:
New
Series goal:
None
Implementation:
Implemented
Milestone target:
milestone icon 2012.07
Started by
Yongqin Liu
Completed by
Yongqin Liu

Whiteboard

Note:
[doanac, 2012-07-06] assuming you want this done this month
[liuyq0307, 2012-07-10] when let this test run before the cts test, the CTS test now will connect to the specified wifi automatically when test
[liuyq0307, 2012-07-27] because the CTS test has been remove from the android-build, and the hostshell-connect-lab-wifi has been add to android-build, so the work is to add the CTS test after the hostshell-connect-lab-wifi when add CTS test. so here just simply mark the WI DONE.

Meta:
Headline: Android Wifi test can connect to password protected access point
Acceptance: Tests integrated into lava-android-test can use this new method to connect to a password protected access point.

(?)

Work Items

Work items:
Add Wifi Connection for android test in lava: DONE
Add the hostshell-connect-lab-wifi before CTS test in android-build: DONE
deploy to lava production: DONE
Add doc for HostShell test: DONE

This blueprint contains Public information 
Everyone can see this information.