We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 6dbcca3 commit 8781de9Copy full SHA for 8781de9
test-runner/wasi_test_runner/runtime_adapter.py
@@ -42,15 +42,20 @@ def run_test(
42
+ [e for env in self._env_to_list(env_variables) for e in ("--env", env)]
43
)
44
45
- result = subprocess.run(
+ p = subprocess.Popen(
46
args,
47
- capture_output=True,
+ stdout=subprocess.PIPE,
48
+ stderr=subprocess.PIPE,
49
text=True,
- check=False,
50
cwd=Path(test_path).parent,
51
- timeout=3.
52
53
- return Output(result.returncode, result.stdout, result.stderr)
+ try:
+ out, err = p.communicate(timeout=3)
54
+ except subprocess.TimeoutExpired:
55
+ p.terminate()
56
+ p.wait()
57
+ raise
58
+ return Output(p.returncode, out, err)
59
60
@staticmethod
61
def _abs(path: str) -> str:
0 commit comments