Modifyable launchers
Maciej Kisielewski
maciej.kisielewski at canonical.com
Tue Oct 18 10:21:55 UTC 2016
Hey Jeff!
I remember your bug on the same topic[1], replied there.
Shebangs used with checkbox-cli are used as a shortcut for explicit
checkbox-cli invocation with a launcher arg. checkbox-cli is not an
interpreter, it uses stdin for interaction.
I can see that feature, provided that :
- stdin is not a tty
- launcher is piped in
- and ui is non-interactive
For now, I recommend using intermediate launcher file, and invoking that
file.
[1] https://bugs.launchpad.net/checkbox-ng/+bug/1608989
On Mon, Oct 17, 2016 at 10:57 PM, Jeffrey Lane <jeffrey.lane at canonical.com>
wrote:
> I'm trying (and failing) to create a modifiable launcher for
> checkbox-cli. IRC seems pretty vacant so I'm asking here instead (and
> an email thread is probably better anyway).
>
> The most recent version looks like so (I've trimmed some things out
> just for brevity sake):
>
> #!/bin/bash
>
> cat << EOF | checkbox-cli
> #!/usr/bin/env checkbox-cli
> [launcher]
> app_id = 2013.com.canonical.certification:certification-server
> launcher_version = 1
> stock_reports = submission_files, certification
>
> [test plan]
> unit = 2013.com.canonical.certification::sniff
> filter = *-server-*, *-only, *virtual*, *firmware-tests
> forced = yes
>
> [test selection]
> forced = yes
>
> [ui]
> type = silent
> output = hide
>
> [config]
> config_filename = canonical-certification.conf
> EOF
>
> Now looking at at the help for checkbox-cli, it says this:
>
> usage: checkbox-cli [-h] [--verify] [--title SESSION_NAME] [LAUNCHER]
>
> positional arguments:
> LAUNCHER launcher definition file to use
>
> And given that checkbox-cli is called as an interpreter in the normal
> launcher file, in theory I should be able to cat the file and pipe it
> to checkbox-cli. but that does not work.
>
> So how can I do that?
>
> The end goal is to get a launcher file that will choose a unit based
> on certain data...
>
> for example, if I have two units called:
>
> 16.04-tests
> 14.04-tests
>
> I want to be able to do something like this:
>
> RELEASE=`lsb_release -r |cut -f 2`
>
> [test plan]
> unit = 2013.com.canonical.certification::$RELEASE-tests
>
> and have it automatically load the unit appropriate to $RELEASE.
>
> Jeff
> --
> "Entropy isn't what it used to be."
>
> Jeff Lane -
> Server Certification Lead, Warrior Poet, Biker, Lover of Pie
> Phone: 919-442-8649
> Ubuntu Ham: W4KDH Freenode IRC: bladernr or
> bladernr_
> gpg: 1024D/3A14B2DD 8C88 B076 0DD7 B404 1417 C466 4ABD 3635 3A14 B2DD
>
> --
> Checkbox-devel mailing list
> Checkbox-devel at lists.ubuntu.com
> Modify settings or unsubscribe at: https://lists.ubuntu.com/
> mailman/listinfo/checkbox-devel
>
--
Have a good one,
Maciek
More information about the Checkbox-devel
mailing list