Merge lp://qastaging/~liuyq0307/lava-android-test/methanol into lp://qastaging/lava-android-test

Proposed by Yongqin Liu
Status: Superseded
Proposed branch: lp://qastaging/~liuyq0307/lava-android-test/methanol
Merge into: lp://qastaging/lava-android-test
Diff against target: 676 lines (+568/-8)
7 files modified
MANIFEST.in (+1/-0)
lava_android_test/commands.py (+8/-0)
lava_android_test/test_definitions/methanol.py (+66/-0)
lava_android_test/test_definitions/methanol/methanol.sh (+317/-0)
lava_android_test/test_definitions/methanol/methanol_merge_results.py (+81/-0)
lava_android_test/test_definitions/methanol/start_server.py (+62/-0)
lava_android_test/testdef.py (+33/-8)
To merge this branch: bzr merge lp://qastaging/~liuyq0307/lava-android-test/methanol
Reviewer Review Type Date Requested Status
Linaro Validation Team Pending
Review via email: mp+119237@code.qastaging.launchpad.net

This proposal supersedes a proposal from 2012-08-06.

This proposal has been superseded by a proposal from 2012-08-16.

Description of the change

add test for methanol
update according to the review comment
Add the support for running on chrome browser

To post a comment you must log in.
Revision history for this message
Yongqin Liu (liuyq0307) wrote : Posted in a previous version of this proposal

change to use BaseHTTPServer to server the web pages and cgi server

Revision history for this message
Yongqin Liu (liuyq0307) wrote : Posted in a previous version of this proposal
Revision history for this message
Andy Doan (doanac) wrote : Posted in a previous version of this proposal
Download full text (3.7 KiB)

On 08/09/2012 08:45 AM, Yongqin Liu wrote:
> === added directory 'lava_android_test/test_definitions/methanol'
> === added file 'lava_android_test/test_definitions/methanol.py'
> --- lava_android_test/test_definitions/methanol.py 1970-01-01 00:00:00 +0000
> +++ lava_android_test/test_definitions/methanol.py 2012-08-09 11:16:19 +0000
<snip>
> + def real_parse(self, result_filename=None, output_filename='methanol_result.json',
> + test_name=''):
> + """Parse test output to gather results
> + Use the pattern specified when the class was instantiated to look
> + through the results line-by-line and find lines that match it.
> + Results are then stored in self.results. If a fixupdict was supplied
> + it is used to convert test result strings to a standard format.
> + """

Seems like this comment should go in the parent's implementation rather
than this one.

> === added file 'lava_android_test/test_definitions/methanol/methanol.sh'
> --- lava_android_test/test_definitions/methanol/methanol.sh 1970-01-01 00:00:00 +0000
> +++ lava_android_test/test_definitions/methanol/methanol.sh 2012-08-09 11:16:19 +0000

<snip>

> +#the default ip or domain used by the client to access the server
> +domain_ip='192.168.1.10'

Why should we have to have a default. We can figure out our own IP
address. Actually the python server you wrote figures it out, so maybe
we should just get it from the file it creates for us.

> +########################################################
> +###### NOT MODIFY SOURCE OF BELOW #####
> +########################################################
> +#android_dir="/sdcard/methanol"
Remove this line if its not needed anymore

<snip>
> +
> +function deploy(){
> + cur_path=`pwd`
> + target_dir=`mktemp -u --tmpdir=${cur_path} methanol-XXX`
> + git clone "${methanol_git}" "${target_dir}"
> + if [ $? -ne 0 ];then
> + echo "Faile to clone the methanol source from ${methanol_git}"
typo "Faile" should be "Failed"
> + cleanup
> + exit 1
> + fi

> +function test_methanol(){
> + if [ -n "$1" ]; then
> + test_type="-${1}"
> + else
> + test_type=""
> + fi
> +
> + wait_minutes=${2-1}
> +
> + mkdir -p/tmp/methanol/
> + sudo chmod -R 777 /tmp/methanol

Do we really need /tmp/methanol? this is just something we'll create and
never clean up.

> === modified file 'lava_android_test/testdef.py'
> --- lava_android_test/testdef.py 2012-06-28 09:52:29 +0000
> +++ lava_android_test/testdef.py 2012-08-09 11:16:19 +0000

> @@ -410,6 +414,25 @@
> Results are then stored in self.results. If a fixupdict was supplied
> it is used to convert test result strings to a standard format.
> """
> +
> + self.real_parse(result_filename=result_filename,
> + output_filename=output_filename, test_name=test_name)
> +
> + self.fixresults(self.fixupdict)
> + if self.appendall:
> + self.appendtoall(self.appendall)
> + self.fixmeasurements()
> + self.fixids(test_name=test_name)
> +
> + def real_parse(self, result_filename='stdout.log',
> + ...

Read more...

Revision history for this message
Yongqin Liu (liuyq0307) wrote : Posted in a previous version of this proposal

> > +#the default ip or domain used by the client to access the server
> > +domain_ip='192.168.1.10'
>
> Why should we have to have a default. We can figure out our own IP
> address. Actually the python server you wrote figures it out, so maybe
> we should just get it from the file it creates for us.
Sorry, could you show me how to figure out the available IP?
Using the ifconfig command to get the IP of eth0 is possible, but if the server has more than 2 IPs,
then we can't know which one is the right.
and if we pass 0.0.0.0, then all the IP address will be opened,
and this will cause security problems I think.

> > + mkdir -p/tmp/methanol/
> > + sudo chmod -R 777 /tmp/methanol
>
> Do we really need /tmp/methanol? this is just something we'll create and
> never clean up.
we can't pass a path(including /) to the save_methanol_data.py when using CGIHTTPServer as the server.
so we passed only the file name and get the result file from the default directory /tmp/methanol.
I delete the above two sentence, but the "/tmp/methanol" directory will still exist and won't be deleted.

> > + def real_parse(self, result_filename='stdout.log',
> > + output_filename='stdout.log', test_name=''):
> > + """Parse test output to gather results
> > +
> > + Use the pattern specified when the class was instantiated to look
> > + through the results line-by-line and find lines that match it.
> > + Results are then stored in self.results. If a fixupdict was
> supplied
> > + it is used to convert test result strings to a standard format.
> > + """
>
> There are a few other places in code that could use this function. I
> think: tjbench.py, skia.py, and 0xbench.py. We should fix those up as well.
yes, they are the same type, but here I'd like to leave them as they are now, not to touch them here.
we can update them when we need to update them in the future using this function,
and use this function when add new similar type test.

Thanks,
Yongqin Liu.

Revision history for this message
Andy Doan (doanac) wrote : Posted in a previous version of this proposal

On 08/10/2012 10:18 PM, Yongqin Liu wrote:
>>> > >+#the default ip or domain used by the client to access the server
>>> > >+domain_ip='192.168.1.10'
>> >
>> >Why should we have to have a default. We can figure out our own IP
>> >address. Actually the python server you wrote figures it out, so maybe
>> >we should just get it from the file it creates for us.
> Sorry, could you show me how to figure out the available IP?
> Using the ifconfig command to get the IP of eth0 is possible, but if the server has more than 2 IPs,
> then we can't know which one is the right.
> and if we pass 0.0.0.0, then all the IP address will be opened,
> and this will cause security problems I think.
>

I think 0.0.0.0 is okay, we have firewalls to prevent access to the port
it will open.

Revision history for this message
Michael Hudson-Doyle (mwhudson) wrote : Posted in a previous version of this proposal

Andy Doan <email address hidden> writes:

> On 08/10/2012 10:18 PM, Yongqin Liu wrote:
>>>> > >+#the default ip or domain used by the client to access the server
>>>> > >+domain_ip='192.168.1.10'
>>> >
>>> >Why should we have to have a default. We can figure out our own IP
>>> >address. Actually the python server you wrote figures it out, so maybe
>>> >we should just get it from the file it creates for us.
>> Sorry, could you show me how to figure out the available IP?
>> Using the ifconfig command to get the IP of eth0 is possible, but if the server has more than 2 IPs,
>> then we can't know which one is the right.
>> and if we pass 0.0.0.0, then all the IP address will be opened,
>> and this will cause security problems I think.
>>
>
> I think 0.0.0.0 is okay, we have firewalls to prevent access to the port
> it will open.

That still doesn't help the test know which IP address to give to the
browser on the DUT...

Cheers,
mwh

203. By Yongqin Liu

redirect the log of the simple server to a file

204. By Yongqin Liu

change the way to no login for chrome and decrease the wait time for svg and example

205. By Yongqin Liu

change to use option to receive the ip address

206. By Yongqin Liu

add default option in methanol.py

207. By Yongqin Liu

add the option to the test_id in result bundle

208. By Yongqin Liu

fix for twice cleanup and kill chrome for the first time

209. By Yongqin Liu

increase the wait for for fire.html and fire-svg.html on chrome

Unmerged revisions

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
The diff is not available at this time. You can reload the page or download it.

Subscribers

People subscribed via source and target branches