Commit 83839822 by dorpvom

Merge branch 'master' of github.com:fkie-cad/fact_pdf_report into…

Merge branch 'master' of github.com:fkie-cad/fact_pdf_report into SD1262-move-chown-into-pdf-container
parents b2973161 2b920d40
...@@ -2,13 +2,14 @@ language: python ...@@ -2,13 +2,14 @@ language: python
python: python:
- "3.6" - "3.6"
- "3.7" - "3.7"
# command to install dependencies before_install:
- "sudo apt-get update"
install: install:
- "apt-get install -y texlive-fonts-extra texlive-latex-recommended" - "sudo apt-get install -y texlive-fonts-extra texlive-latex-extra texlive-latex-recommended"
- "pip install -r requirements.txt" - "pip install -r requirements.txt"
- "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