Merge lp://staging/~stylesen/lava-dispatcher/add-on-to-testdef-yaml into lp://staging/lava-dispatcher

Proposed by Senthil Kumaran S
Status: Merged
Merged at revision: 548
Proposed branch: lp://staging/~stylesen/lava-dispatcher/add-on-to-testdef-yaml
Merge into: lp://staging/lava-dispatcher
Diff against target: 173 lines (+48/-7)
5 files modified
lava_dispatcher/actions/lava_test_shell.py (+40/-5)
lava_dispatcher/lava_test_shell.py (+4/-0)
lava_dispatcher/test_data.py (+2/-2)
lava_test_shell/lava-test-runner-android (+1/-0)
lava_test_shell/lava-test-runner-ubuntu (+1/-0)
To merge this branch: bzr merge lp://staging/~stylesen/lava-dispatcher/add-on-to-testdef-yaml
Reviewer Review Type Date Requested Status
Linaro Validation Team Pending
Linaro Validation Team Pending
Linaro Validation Team Pending
Review via email: mp+144214@code.staging.launchpad.net

Description of the change

Add more metadata parameters to the YAML format which could now be understood by lava-test-shell. A test definition with the newly added parameters is available here - http://git.linaro.org/gitweb?p=qa/test-definitions.git;a=blob;f=ubuntu/device-tree.yaml

To post a comment you must log in.
539. By Senthil Kumaran S

Make certain test definition metadata parameters to be a list in YAML.

Revision history for this message
Andy Doan (doanac) wrote :

looks pretty good to me. one thing its probably worth adding now is either a docs entry detailing these YAML fields or an annotated example

Revision history for this message
Senthil Kumaran S (stylesen) wrote :

On Thursday 24 January 2013 12:14 AM, Andy Doan wrote:
> looks pretty good to me. one thing its probably worth adding now is either a docs entry detailing these YAML fields or an annotated example

Yep, I shall do that shortly (its in my TODO already).

Thank You.
--
Senthil Kumaran S
http://www.stylesen.org/
http://www.sasenthilkumaran.com/

Revision history for this message
Michael Hudson-Doyle (mwhudson) wrote :

Senthil Kumaran S <email address hidden> writes:

> +def _get_testdef_info(testdef):
> + metadata = {}
> + metadata['version'] = testdef['metadata']['version']
> + metadata['description'] = testdef['metadata']['description']
> + metadata['format'] = testdef['metadata']['format']
> + metadata['os'] = ','.join(testdef['metadata']['os'])
> + metadata['devices'] = ','.join(testdef['metadata']['devices'])
> + metadata['environment'] = ','.join(testdef['metadata']['environment'])
> + return metadata

I don't think it's reasonable to assume that the new fields are present
in the testdef. The rest looks fine.

Cheers,
mwh

540. By Senthil Kumaran S

Ensure testdef metadata is attached to each test run and avoid adding it
to context.

541. By Senthil Kumaran S

Fix comment to add description about new testdef_metadata file.

542. By Senthil Kumaran S

Bring up-to-date with trunk.

Revision history for this message
Andy Doan (doanac) wrote :

I think this looks pretty good. I have a concern we'll need some sort of evolution logic as the schema changes. However, maybe we assume this comprises the 1.0 version and hold off doing evultion stuff until we change the schema next time?

Revision history for this message
Senthil Kumaran S (stylesen) wrote :

Hi Andy,

On Monday 28 January 2013 10:52 PM, Andy Doan wrote:
> I think this looks pretty good. I have a concern we'll need some sort of evolution logic as the schema changes. However, maybe we assume this comprises the 1.0 version and hold off doing evultion stuff until we change the schema next time?

I thought I can take evolution stuff in next months BP. As of now we
will have the format till date as version 1.0 and lets evolve.

Thank You.
--
Senthil Kumaran S
http://www.stylesen.org/
http://www.sasenthilkumaran.com/

Revision history for this message
Michael Hudson-Doyle (mwhudson) wrote :

Senthil Kumaran S <email address hidden> writes:

> === modified file 'lava_dispatcher/test_data.py'
> --- lava_dispatcher/test_data.py 2012-07-31 20:20:02 +0000
> +++ lava_dispatcher/test_data.py 2013-01-28 08:54:19 +0000
> @@ -34,7 +34,8 @@
> def __init__(self, test_id='lava'):
> self.job_status = 'pass'
> self.metadata = {}
> - self._test_run = { 'test_results':[], 'attachments':[], 'tags':[] }
> + self._test_run = { 'test_results':[], 'attachments':[], 'tags':[],
> + 'testdef_metadata':{} }

Does this actually work? The 1.5 bundle format:

http://bazaar.launchpad.net/~linaro-validation/linaro-python-dashboard-bundle/trunk/view/head:/linaro_dashboard_bundle/schemas/dashboard_bundle_format_1.5.json

doesn't allow a testdef_metadata property on elements of the test_run
array.

> self._test_run['test_id'] = test_id
> self._assign_date()
> self._assign_uuid()
> @@ -75,4 +76,3 @@
> def get_test_run(self):
> self.add_result('job_complete', self.job_status)
> return self._test_run
> -
>

Revision history for this message
Michael Hudson-Doyle (mwhudson) wrote :

Senthil Kumaran S <email address hidden> writes:

> Hi Andy,
>
> On Monday 28 January 2013 10:52 PM, Andy Doan wrote:
>> I think this looks pretty good. I have a concern we'll need some sort of evolution logic as the schema changes. However, maybe we assume this comprises the 1.0 version and hold off doing evultion stuff until we change the schema next time?
>
> I thought I can take evolution stuff in next months BP. As of now we
> will have the format till date as version 1.0 and lets evolve.

This makes sense to me.

Revision history for this message
Senthil Kumaran S (stylesen) wrote :

On Tuesday 29 January 2013 06:46 AM, Michael Hudson-Doyle wrote:
> http://bazaar.launchpad.net/~linaro-validation/linaro-python-dashboard-bundle/trunk/view/head:/linaro_dashboard_bundle/schemas/dashboard_bundle_format_1.5.json
>
> doesn't allow a testdef_metadata property on elements of the test_run
> array.

I did patched linaro-python-dashboard-bundle along with this BP -
https://blueprints.launchpad.net/lava-dispatcher/+spec/add-on-to-testdef-yaml-format

The branch is here -
https://code.launchpad.net/~stylesen/linaro-python-dashboard-bundle/add-on-to-testdef-yaml

Thank You.
--
Senthil Kumaran S
http://www.stylesen.org/
http://www.sasenthilkumaran.com/

543. By Senthil Kumaran S

Bring up-to-date with trunk.

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