How to test unit template jobs?

Pierre Equoy pierre.equoy at canonical.com
Tue Jan 5 06:59:01 UTC 2016


On Mon, Jan 4, 2016 at 6:39 PM, Sylvain Pineau <sylvain.pineau at canonical.com
> wrote:

> On 04/01/2016 10:45, Pierre Equoy wrote:
>
>
>
> On Mon, Jan 4, 2016 at 4:43 PM, Sylvain Pineau <
> <sylvain.pineau at canonical.com>sylvain.pineau at canonical.com> wrote:
>
>> Hello,
>>
>> To test template jobs using the "plainbox run" command you have to select
>> the resource job that generates the new jobs.
>>
>> for example: plainbox run -i .*block_device -i "^.*info/hdparm.*$"
>>
>
> Thanks for this, it should help a lot!
>
> Generally speaking, how to know what resource job generates what template
> job(s)?
>
> Juts look at the job definition, the resource job is mentioned in the
> field template-resource
>
> More info here:
>
> http://plainbox.readthedocs.org/en/latest/manpages/plainbox-template-units.html?highlight=template#template-specific-fields
>

Thanks. Is there more information about resource jobs? I couldn't find
anything relevant on readthedocs nor in the
“plainbox-provider-resource-generic” provider (the README file [1] is
pretty short :))

I think you did a typo in your previous e-mail. Since, in my case:

template-resource: device

I should launch the “device” resource job followed by the info/hdparm* jobs:

plainbox run -i ".*device" -i "^.*info/hdparm.*$"

And this gives me the result I expect:

===[ Results ]===
 ☑ : Collect information about installed software packages
 ☑ : Collect information about hardware devices (udev)
 ☑ : block_device
 ☑ : info/hdparm_sda.txt


It is possible to list the available jobs in plainbox using:

plainbox dev list job

so in my case, the following command helped:

plainbox dev list job | grep device
job '2013.com.canonical.certification::audio/list_devices'
job
'2013.com.canonical.certification::audio/list_devices_after_suspend_30_cycles'
job '2013.com.canonical.certification::disk/storage_devices'
job '2013.com.canonical.certification::info/audio_device_driver'
job '2013.com.canonical.certification::info/network_devices'
job '2013.com.canonical.certification::dock/audio-list-devices'
job '2013.com.canonical.certification::device'
job '2013.com.canonical.certification::block_device'



Thanks again Sylvain!


[1]
http://bazaar.launchpad.net/~checkbox-dev/checkbox/trunk/view/head:/providers/plainbox-provider-resource-generic/README.rst
-- 
Pierre Equoy
QA & Certification Engineer | Canonical
www.canonical.com | www.ubuntu.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.ubuntu.com/archives/checkbox-devel/attachments/20160105/8a8c3a68/attachment.html>


More information about the Checkbox-devel mailing list