update to the ct vm
This commit is contained in:
@@ -1,2 +1,3 @@
|
|||||||
hello world
|
hello world
|
||||||
[info] built /home/igor/programming/IgorCielniak/l2/build/ct_test
|
[info] built <build>/ct_test
|
||||||
|
[warn] redefining word syscall
|
||||||
|
|||||||
6
test.py
6
test.py
@@ -432,11 +432,17 @@ class TestRunner:
|
|||||||
cmd.append("--ct-run-main")
|
cmd.append("--ct-run-main")
|
||||||
if self.args.verbose:
|
if self.args.verbose:
|
||||||
print(f"\n{format_status('CMD', 'blue')} {quote_cmd(cmd)}")
|
print(f"\n{format_status('CMD', 'blue')} {quote_cmd(cmd)}")
|
||||||
|
# When --ct-run-main is used, the compiler executes main at compile time,
|
||||||
|
# so it may need stdin data that would normally go to the binary.
|
||||||
|
compile_input = None
|
||||||
|
if self.args.ct_run_main and case.stdin_data() is not None:
|
||||||
|
compile_input = case.stdin_data()
|
||||||
return subprocess.run(
|
return subprocess.run(
|
||||||
cmd,
|
cmd,
|
||||||
cwd=self.root,
|
cwd=self.root,
|
||||||
capture_output=True,
|
capture_output=True,
|
||||||
text=True,
|
text=True,
|
||||||
|
input=compile_input,
|
||||||
env=self._env_for(case),
|
env=self._env_for(case),
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user