Commit 07ed2532 by dorpvom

increased verbosity in error log when failing

parent d62b4e93
...@@ -10,6 +10,6 @@ install: ...@@ -10,6 +10,6 @@ install:
- "pip install -r requirements-dev.txt" - "pip install -r requirements-dev.txt"
- "pip install codecov" - "pip install codecov"
# command to run tests # command to run tests
script: "pytest" script: "pytest -v"
after_success: after_success:
- codecov - codecov
...@@ -16,7 +16,8 @@ def execute_latex(tmp_dir): ...@@ -16,7 +16,8 @@ def execute_latex(tmp_dir):
os.chdir(tmp_dir) os.chdir(tmp_dir)
output, return_code = execute_shell_command_get_return_code('env buf_size=1000000 pdflatex {}'.format(MAIN_TEMPLATE)) output, return_code = execute_shell_command_get_return_code('env buf_size=1000000 pdflatex {}'.format(MAIN_TEMPLATE))
if return_code != 0: if return_code != 0:
print(f'Warnings / Errors when trying to build PDF:\n{output}') error_log = output if not Path('main.log').is_file() else Path('main.log').read_text()
print(f'Warnings / Errors when trying to build PDF:\n{error_log}')
if not Path('main.pdf').exists(): if not Path('main.pdf').exists():
raise RuntimeError('No pdf output generated. Aborting.') raise RuntimeError('No pdf output generated. Aborting.')
os.chdir(current_dir) os.chdir(current_dir)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment