tmt icon indicating copy to clipboard operation
tmt copied to clipboard

Allow `tmt run` to run plans in parallel

Open lukaszachy opened this issue 4 years ago • 4 comments

Use case: As a developer/tester I need test results fast Use case: As a user I want to see progress of testing Use case: As a user I want control utilisation of resources used by tmt

As a first step tmt could run selected number of plans in parallel (currently they are run in sequence). User should pick the number in first iterations, in the future tmt might guess it (e.g. 'auto') based on resources.

Idea (credits to @thrix ): Master tmt process Controls all interaction with user Creates run, discovers plans and each plan is put to the queue. Spawns workers Updates testing progress Grants "interaction" with user to workers Points user to logs

Worker process Picks one plan from queue and runs it. Saves data to run directory.

Console output We might keep current output if there is single worker. But for multiple workers it might be enough to prefix output with worker name. Will be a bit messy to read for more verbose/debug levels, but it was user's choice.

In addition to that: a) add progress bar option When user wants to see progress. It could utilize number of items from each step. A bit of tweaking per step might be necessary (e.g. discovery of 10 tests should be 1 task, but execution of 10 tests should be 10 tasks)

/var/tmp/tmt/run-036
  /plans/example: [#### ] report,  30/32 tasks
  /plans/other: [#       ] provision, 1/100 tasks
  /plan/third: queued

b) add worker debug/verbose level So 'master' process is not verbose but 'workers' are producing more output so user can check run directory for additional details (e.g. by tail -f)

lukaszachy avatar May 29 '20 13:05 lukaszachy