summaryrefslogtreecommitdiff
path: root/test/utils/remote_execution/test_runner.py
diff options
context:
space:
mode:
authorPaul Cristian Sarbu <paul.cristian.sarbu@huawei.com>2023-06-27 15:35:45 +0200
committerPaul Cristian Sarbu <paul.cristian.sarbu@huawei.com>2023-08-29 17:19:14 +0200
commit9e4b146941a9a31d952b19cfcf016f248882a826 (patch)
treed5be705912d9e05c7f6b90b3dd4fc0bc319d83ec /test/utils/remote_execution/test_runner.py
parent0d8aeb4655446d05ecbb3fc3336ebe02741e91bf (diff)
downloadjustbuild-9e4b146941a9a31d952b19cfcf016f248882a826.tar.gz
python: Add type hints and fix style in test scripts
For maximum compatibility, we use the uppercase types from the typing package instead of the built-in types, therefore compliant with PEP 484 and PEP 526.
Diffstat (limited to 'test/utils/remote_execution/test_runner.py')
-rwxr-xr-xtest/utils/remote_execution/test_runner.py25
1 files changed, 15 insertions, 10 deletions
diff --git a/test/utils/remote_execution/test_runner.py b/test/utils/remote_execution/test_runner.py
index 5295efa3..948b626e 100755
--- a/test/utils/remote_execution/test_runner.py
+++ b/test/utils/remote_execution/test_runner.py
@@ -18,14 +18,14 @@ import os
import subprocess
import time
-time_start = time.time()
-time_stop = 0
-result = "UNKNOWN"
-stderr = ""
-stdout = ""
+time_start: float = time.time()
+time_stop: float = 0
+result: str = "UNKNOWN"
+stderr: str = ""
+stdout: str = ""
-def dump_results():
+def dump_results() -> None:
with open("result", "w") as f:
f.write("%s\n" % (result, ))
with open("time-start", "w") as f:
@@ -57,10 +57,15 @@ if os.path.exists(REMOTE_INFO):
os.remove(REMOTE_INFO)
remote_cmd = [
- "./bin/just", "execute",
- "--info-file", REMOTE_INFO,
- "--local-build-root", REMOTE_LBR,
- "--log-limit", "6", "--plain-log",
+ "./bin/just",
+ "execute",
+ "--info-file",
+ REMOTE_INFO,
+ "--local-build-root",
+ REMOTE_LBR,
+ "--log-limit",
+ "6",
+ "--plain-log",
]
with open("compatible-remote.json") as f: