aboutsummaryrefslogtreecommitdiff
path: root/run_project_tests.py
diff options
context:
space:
mode:
authorDylan Baker <dylan@pnwbakers.com>2021-02-19 12:11:36 -0800
committerDylan Baker <dylan@pnwbakers.com>2021-02-23 08:38:19 -0800
commit3e11da6db5beeb42008d8d807858e054f1129206 (patch)
treea658ac6e4d4efe7f39442cbeb3d9b3ca67576871 /run_project_tests.py
parent8a12115741185a007c1dd0d172af98bb42052146 (diff)
downloadmeson-3e11da6db5beeb42008d8d807858e054f1129206.zip
meson-3e11da6db5beeb42008d8d807858e054f1129206.tar.gz
meson-3e11da6db5beeb42008d8d807858e054f1129206.tar.bz2
run_*_tests: Add some type annotations
Diffstat (limited to 'run_project_tests.py')
-rwxr-xr-xrun_project_tests.py11
1 files changed, 8 insertions, 3 deletions
diff --git a/run_project_tests.py b/run_project_tests.py
index ed1a0e8..b6879ee 100755
--- a/run_project_tests.py
+++ b/run_project_tests.py
@@ -476,7 +476,7 @@ def format_parameter_file(file_basename: str, test: TestDef, test_build_dir: str
return destination
-def detect_parameter_files(test: TestDef, test_build_dir: str) -> (Path, Path):
+def detect_parameter_files(test: TestDef, test_build_dir: str) -> T.Tuple[Path, Path]:
nativefile = test.path / 'nativefile.ini'
crossfile = test.path / 'crossfile.ini'
@@ -488,7 +488,9 @@ def detect_parameter_files(test: TestDef, test_build_dir: str) -> (Path, Path):
return nativefile, crossfile
-def run_test(test: TestDef, extra_args, compiler, backend, flags, commands, should_fail, use_tmp: bool):
+def run_test(test: TestDef, extra_args: T.List[str], compiler: str, backend: Backend,
+ flags: T.List[str], commands: T.Tuple[T.List[str], T.List[str], T.List[str], T.List[str]],
+ should_fail: bool, use_tmp: bool) -> T.Optional[TestResult]:
if test.skip:
return None
build_dir = create_deterministic_builddir(test, use_tmp)
@@ -503,7 +505,10 @@ def run_test(test: TestDef, extra_args, compiler, backend, flags, commands, shou
finally:
mesonlib.windows_proof_rmtree(build_dir)
-def _run_test(test: TestDef, test_build_dir: str, install_dir: str, extra_args, compiler, backend, flags, commands, should_fail):
+def _run_test(test: TestDef, test_build_dir: str, install_dir: str,
+ extra_args: T.List[str], compiler: str, backend: Backend,
+ flags: T.List[str], commands: T.Tuple[T.List[str], T.List[str], T.List[str], T.List[str]],
+ should_fail: bool) -> TestResult:
compile_commands, clean_commands, install_commands, uninstall_commands = commands
gen_start = time.time()
# Configure in-process