launchers should support command line options

Bug #1370616 reported by Jeff Lane 
14
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Next Generation Checkbox (CLI)
Fix Released
Wishlist
Sylvain Pineau

Bug Description

launchers should support command line options. Since the "command" to execute tests is just a config file that calls an external binary, there should be the ability to pass command line options. For example, canonical-certification-server:

#!/usr/bin/env checkbox-launcher
[welcome]
text = Welcome to System Certification!
    This application will gather information from your system. Then you will be
    asked manual tests to confirm that the system is working properly. Finally,
    you will be asked for the Secure ID of the computer to submit the
    information to the certification.canonical.com database.
    To learn how to create or locate the Secure ID, please see here:
    https://certification.canonical.com/

[suite]
# Whitelist(s) displayed in the suite selection screen
whitelist_filter = ^((network|storage|usb|virtualization)-only)|(server-(full|functional)-14.04)$
# Whitelist(s) pre-selected in the suite selection screen, default whitelist(s)
whitelist_selection = ^server-full-14.04$

[transport]
submit_to = certification

[config]
config_filename = canonical-certification.conf

I should be able to override at least some of these via command line options:

-w for a specific whitelist
--config to specify a config
and --non-interactive to skip the welcome, suite and test selection screens as mentioned in another bug.

There should be a hierachy here:

CLI options override launcher file options override config file options override defaults.

Additionally, I should be able to set --secure_id as a commandline option so I can effectively do this:

canonical-certification-server --whitelist network-only.whitelist --non-interactive --secure-id a00D0000001234DF

which would automatically re-run the network tests via the network-only whitelist with no user interaction and automatically submit those results to C3 using the secure_id specified.

Tags: cqa-verified

Related branches

Zygmunt Krynicki (zyga)
Changed in checkbox:
status: New → Confirmed
importance: Undecided → Wishlist
affects: checkbox → checkbox-ng
Changed in checkbox-ng:
assignee: nobody → Sylvain Pineau (sylvain-pineau)
status: Confirmed → In Progress
Changed in checkbox-ng:
status: In Progress → Fix Committed
Changed in checkbox-ng:
milestone: none → 0.21
Changed in checkbox-ng:
milestone: 0.21 → 0.20
Revision history for this message
Pierre Equoy (pieq) wrote :

I tested this with a Stella launcher:

    ./stella-tui -T '2014.com.canonical.ce::stella-wireless' --non-interactive

bypassed the selection screens, selected the stella-wireless test plan, bypassed every user-verify tests and finally provided results locally (xml, html, xlsx, json).

It looks like it works properly!

Pierre Equoy (pieq)
tags: added: cqa-verified
Changed in checkbox-ng:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

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