diff options
author | Eli Schwartz <eschwartz@archlinux.org> | 2022-03-20 17:03:35 -0400 |
---|---|---|
committer | Eli Schwartz <eschwartz@archlinux.org> | 2022-03-29 16:44:54 -0400 |
commit | ff8a9c9efb9937e7d7776bba8b85930ed44192fa (patch) | |
tree | 77fb2088bfbeb162088b242b97422e786300a9f9 | |
parent | c9938f8f60c0b7cca7a5668807b17badb7861c86 (diff) | |
download | meson-ff8a9c9efb9937e7d7776bba8b85930ed44192fa.zip meson-ff8a9c9efb9937e7d7776bba8b85930ed44192fa.tar.gz meson-ff8a9c9efb9937e7d7776bba8b85930ed44192fa.tar.bz2 |
move typing-only definition to TYPE_CHECKING
-rwxr-xr-x | run_project_tests.py | 29 |
1 files changed, 15 insertions, 14 deletions
diff --git a/run_project_tests.py b/run_project_tests.py index ea8f901..e08d0cd 100755 --- a/run_project_tests.py +++ b/run_project_tests.py @@ -13,6 +13,7 @@ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. +from __future__ import annotations # Work around some pathlib bugs... from mesonbuild import _pathlib @@ -81,6 +82,20 @@ if T.TYPE_CHECKING: no_unittests: bool only: T.List[str] + # In previous python versions the global variables are lost in ProcessPoolExecutor. + # So, we use this tuple to restore some of them + class GlobalState(T.NamedTuple): + compile_commands: T.List[str] + clean_commands: T.List[str] + test_commands: T.List[str] + install_commands: T.List[str] + uninstall_commands: T.List[str] + + backend: 'Backend' + backend_flags: T.List[str] + + host_c_compiler: T.Optional[str] + ALL_TESTS = ['cmake', 'common', 'native', 'warning-meson', 'failing-meson', 'failing-build', 'failing-test', 'keyval', 'platform-osx', 'platform-windows', 'platform-linux', 'java', 'C#', 'vala', 'cython', 'rust', 'd', 'objective c', 'objective c++', @@ -587,20 +602,6 @@ def detect_parameter_files(test: TestDef, test_build_dir: str) -> T.Tuple[Path, return nativefile, crossfile -# In previous python versions the global variables are lost in ProcessPoolExecutor. -# So, we use this tuple to restore some of them -class GlobalState(T.NamedTuple): - compile_commands: T.List[str] - clean_commands: T.List[str] - test_commands: T.List[str] - install_commands: T.List[str] - uninstall_commands: T.List[str] - - backend: 'Backend' - backend_flags: T.List[str] - - host_c_compiler: T.Optional[str] - def run_test(test: TestDef, extra_args: T.List[str], should_fail: str, |