Run the given execution. This involves running the execution setup as well as running all build targets in the given execution.
(
sut_node: SutNode,
tg_node: TGNode,
execution: ExecutionConfiguration,
result: DTSResult,
)
| 83 | |
| 84 | |
| 85 | def _run_execution( |
| 86 | sut_node: SutNode, |
| 87 | tg_node: TGNode, |
| 88 | execution: ExecutionConfiguration, |
| 89 | result: DTSResult, |
| 90 | ) -> None: |
| 91 | """ |
| 92 | Run the given execution. This involves running the execution setup as well as |
| 93 | running all build targets in the given execution. |
| 94 | """ |
| 95 | dts_logger.info(f"Running execution with SUT '{execution.system_under_test_node.name}'.") |
| 96 | execution_result = result.add_execution(sut_node.config) |
| 97 | execution_result.add_sut_info(sut_node.node_info) |
| 98 | |
| 99 | try: |
| 100 | sut_node.set_up_execution(execution) |
| 101 | execution_result.update_setup(Result.PASS) |
| 102 | except Exception as e: |
| 103 | dts_logger.exception("Execution setup failed.") |
| 104 | execution_result.update_setup(Result.FAIL, e) |
| 105 | |
| 106 | else: |
| 107 | for build_target in execution.build_targets: |
| 108 | _run_build_target(sut_node, tg_node, build_target, execution, execution_result) |
| 109 | |
| 110 | finally: |
| 111 | try: |
| 112 | sut_node.tear_down_execution() |
| 113 | execution_result.update_teardown(Result.PASS) |
| 114 | except Exception as e: |
| 115 | dts_logger.exception("Execution teardown failed.") |
| 116 | execution_result.update_teardown(Result.FAIL, e) |
| 117 | |
| 118 | |
| 119 | def _run_build_target( |
no test coverage detected