Pass argument values from autopilot run to the tests
Bug #1266589 reported by
Leo Arias
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=
Changed in autopilot: | |
assignee: | nobody → Thomi Richards (thomir) |
status: | New → Fix Released |
To post a comment you must log in.
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.