kunit.py (d26a3a6ce7e02f9c056ad992bcd9624735022337) kunit.py (126901ba3499880c9ed033633817cf7493120fda)
1#!/usr/bin/env python3
2# SPDX-License-Identifier: GPL-2.0
3#
4# A thin wrapper on top of the KUnit Kernel
5#
6# Copyright (C) 2019, Google LLC.
7# Author: Felix Guo <felixguoxiuping@gmail.com>
8# Author: Brendan Higgins <brendanhiggins@google.com>

--- 109 unchanged lines hidden (view full) ---

118
119def _suites_from_test_list(tests: List[str]) -> List[str]:
120 """Extracts all the suites from an ordered list of tests."""
121 suites = [] # type: List[str]
122 for t in tests:
123 parts = t.split('.', maxsplit=2)
124 if len(parts) != 2:
125 raise ValueError(f'internal KUnit error, test name should be of the form "<suite>.<test>", got "{t}"')
1#!/usr/bin/env python3
2# SPDX-License-Identifier: GPL-2.0
3#
4# A thin wrapper on top of the KUnit Kernel
5#
6# Copyright (C) 2019, Google LLC.
7# Author: Felix Guo <felixguoxiuping@gmail.com>
8# Author: Brendan Higgins <brendanhiggins@google.com>

--- 109 unchanged lines hidden (view full) ---

118
119def _suites_from_test_list(tests: List[str]) -> List[str]:
120 """Extracts all the suites from an ordered list of tests."""
121 suites = [] # type: List[str]
122 for t in tests:
123 parts = t.split('.', maxsplit=2)
124 if len(parts) != 2:
125 raise ValueError(f'internal KUnit error, test name should be of the form "<suite>.<test>", got "{t}"')
126 suite, case = parts
126 suite, _ = parts
127 if not suites or suites[-1] != suite:
128 suites.append(suite)
129 return suites
130
131
132
133def exec_tests(linux: kunit_kernel.LinuxSourceTree, request: KunitExecRequest) -> KunitResult:
134 filter_globs = [request.filter_glob]

--- 397 unchanged lines hidden ---
127 if not suites or suites[-1] != suite:
128 suites.append(suite)
129 return suites
130
131
132
133def exec_tests(linux: kunit_kernel.LinuxSourceTree, request: KunitExecRequest) -> KunitResult:
134 filter_globs = [request.filter_glob]

--- 397 unchanged lines hidden ---