MCPcopy Create free account
hub / github.com/F-Stack/f-stack / _run_single_suite

Function _run_single_suite

dpdk/dts/framework/dts.py:181–217  ·  view source on GitHub ↗

Runs a single test suite. Args: sut_node: Node to run tests on. execution: Execution the test case belongs to. build_target_result: Build target configuration test case is run on test_suite_config: Test suite configuration Raises: BlockingTestSuiteEr

(
    sut_node: SutNode,
    tg_node: TGNode,
    execution: ExecutionConfiguration,
    build_target_result: BuildTargetResult,
    test_suite_config: TestSuiteConfig,
)

Source from the content-addressed store, hash-verified

179
180
181def _run_single_suite(
182 sut_node: SutNode,
183 tg_node: TGNode,
184 execution: ExecutionConfiguration,
185 build_target_result: BuildTargetResult,
186 test_suite_config: TestSuiteConfig,
187) -> None:
188 """Runs a single test suite.
189
190 Args:
191 sut_node: Node to run tests on.
192 execution: Execution the test case belongs to.
193 build_target_result: Build target configuration test case is run on
194 test_suite_config: Test suite configuration
195
196 Raises:
197 BlockingTestSuiteError: If a test suite that was marked as blocking fails.
198 """
199 try:
200 full_suite_path = f"tests.TestSuite_{test_suite_config.test_suite}"
201 test_suite_classes = get_test_suites(full_suite_path)
202 suites_str = ", ".join((x.__name__ for x in test_suite_classes))
203 dts_logger.debug(f"Found test suites '{suites_str}' in '{full_suite_path}'.")
204 except Exception as e:
205 dts_logger.exception("An error occurred when searching for test suites.")
206 result.update_setup(Result.ERROR, e)
207
208 else:
209 for test_suite_class in test_suite_classes:
210 test_suite = test_suite_class(
211 sut_node,
212 tg_node,
213 test_suite_config.test_cases,
214 execution.func,
215 build_target_result,
216 )
217 test_suite.run()
218
219
220def _exit_dts() -> None:

Callers 1

_run_all_suitesFunction · 0.85

Calls 3

get_test_suitesFunction · 0.85
update_setupMethod · 0.80
runMethod · 0.45

Tested by

no test coverage detected