Execute all processes according to the configuration. Returns: List of ProcessTiming objects with execution results
(self)
| 177 | self.add_dependency(processes[i], processes[i - 1]) |
| 178 | |
| 179 | def run(self) -> list[ProcessTiming]: |
| 180 | """Execute all processes according to the configuration. |
| 181 | |
| 182 | Returns: |
| 183 | List of ProcessTiming objects with execution results |
| 184 | """ |
| 185 | if not self.processes: |
| 186 | return [] |
| 187 | |
| 188 | # Simplified message - avoid technical jargon like "process group" |
| 189 | # Just show the group name if it's user-friendly, otherwise skip |
| 190 | if self.name and self.name != "TestProcesses": |
| 191 | print(f"Running {self.name}...", flush=True) |
| 192 | |
| 193 | if self.config.execution_mode == ExecutionMode.PARALLEL: |
| 194 | return self._run_parallel() |
| 195 | elif self.config.execution_mode == ExecutionMode.SEQUENTIAL: |
| 196 | return self._run_sequential() |
| 197 | elif self.config.execution_mode == ExecutionMode.SEQUENTIAL_WITH_DEPENDENCIES: |
| 198 | return self._run_with_dependencies() |
| 199 | else: |
| 200 | raise ValueError(f"Unknown execution mode: {self.config.execution_mode}") |
| 201 | |
| 202 | def _run_parallel(self) -> list[ProcessTiming]: |
| 203 | """Execute processes in parallel (based on test_runner._run_processes_parallel).""" |