launching checkbox-cli from a script that generates the launcher at runtime fails

Bug #1608989 reported by Jeff Lane 
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Next Generation Checkbox (CLI)
Invalid
Wishlist
Unassigned

Bug Description

I was playing around this morning trying to find a way to have canonical-certification-server default to the correct whitelist for each release (14.04 and 16.04).

On paper, this should work:

#!/bin/bash

RELEASE=`lsb_release -r |cut -f 2`

cat << EOF | /usr/bin/env checkbox-cli
[launcher]
app_id = 2013.com.canonical.certification:certification-server
launcher_version = 1
stock_reports = text, submission_files, certification

[test plan]
unit = 2013.com.canonical.certification::$RELEASE-server-full
filter = *-server-*, *-only, *virtual*, *firmware-tests

[config]
config_filename = canonical-certification.conf
EOF

This should pass the launcher definition to checkbox-cli and go, but what really happens is that checkbox-cli launches, no unit is selected, and the UI freezes.

I am pretty sure this is a problem with subshells, at least that's what it seems like for now, but I'm not positive that's the actual issue. So, here's the bug.

Revision history for this message
Maciej Kisielewski (kissiel) wrote :

On my paper this shouldn't work.

checkbox-cli's arg should be a path to launcher. The stdin is used for UI interaction (p for pass, f for fail, etc.), so `cat`-ing into stdin won't feed the data as launcher. You have to use a middleman.

Some tools use magical '-' to specify, that the arg should be read from stdin, checkbox-cli doesn't have that option (yet?;))

Changed in checkbox-ng:
importance: Undecided → Wishlist
Changed in checkbox-ng:
status: New → Invalid
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.