Skip to content

Commit

Permalink
Add verbosity to test runtime
Browse files Browse the repository at this point in the history
Signed-off-by: romanodanilo <[email protected]>
  • Loading branch information
romanodanilo committed Jun 4, 2024
1 parent db180c0 commit bf68736
Showing 1 changed file with 11 additions and 2 deletions.
13 changes: 11 additions & 2 deletions runtime/tests/test_runtime.py
Original file line number Diff line number Diff line change
Expand Up @@ -75,13 +75,22 @@ def test_runtime_execution():
runtime_script = os.path.join("..", "..", "runtime", "runtime", "runtime.py")

process = subprocess.Popen(
f"python3 {runtime_script} --config={config_xml} --install_dir=./ --schema_dir={schema_dir}",
f"python3 {runtime_script} --config={config_xml} --install_dir={os.getcwd()} --schema_dir={schema_dir}",
shell=True,
stdout=subprocess.PIPE,
stderr=subprocess.PIPE,
cwd=os.getcwd(),
)
_, _ = process.communicate()
stdout, stderr = process.communicate()
exit_code = process.returncode
if exit_code == 0:
print("Command executed successfully.")
print("Output:")
print(stdout.decode())
else:
print("Error occurred while executing the command.")
print("Error message:")
print(stderr.decode())
# Check that result file is correctly generated
result_file = os.path.join("Result.xqar")
assert os.path.isfile(result_file)
Expand Down

0 comments on commit bf68736

Please sign in to comment.