Pass argument values from autopilot run to the tests

Bug #1266589 reported by Leo Arias
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Autopilot
Fix Released
Undecided
Unassigned

Bug Description

There are some times where we want the tests to behave differently, for example, we might want to run the tests against the installed system or the system from the same branch as the test code.

Currently, we don't have nice ways to do this. Discussing with thomi, it seems the nicer way is to have a default (in this case, run from the branch) and then rely on an env var to switch to the alternate behavior.

It would be a lot nicer if we could pass parameters as key=value from *autopilot run* to the test. something like:

autopilot run test_id app_path=/usr/bin/my_app

Tags: elopio
Revision history for this message
Leo Arias (elopio) wrote :

We are now thinking of running the autopilot tests from cmake tasks. For example, define a task to run the unity-scope-click tests using fake servers and the binary just compiled.

With cmake we can get the path to the binary easily, but we can't pass it to autopilot easily.

The task I have in mind will do something like this:

autopilot run unityscopeclick use_fake_servers=True click_scope_path={some-value-from-cmake}

Those values should be available to the tests through argparse or something nicer. Just a dictionary on a namespace like autopilot.arguments would do the work nicely.

Changed in autopilot:
assignee: nobody → Thomi Richards (thomir)
status: New → Fix Released
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.