Modifyable launchers

Jeffrey Lane jeffrey.lane at canonical.com
Mon Oct 17 20:57:59 UTC 2016


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



More information about the Checkbox-devel mailing list