From 4120e28e9d84014822f84219661d2bb66c9dee5f Mon Sep 17 00:00:00 2001 From: grechka91 Date: Thu, 15 Nov 2018 15:10:50 +0200 Subject: [PATCH] Provide timestamps when creating pytest_report 1) Because we can run pytest_run during job several times so we want to keep previous results 2) do not show stderr when run pytest, use logs --- plugins/pytest-runner/pytest_run.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/plugins/pytest-runner/pytest_run.yml b/plugins/pytest-runner/pytest_run.yml index 381f1ab5fe..72cabedbfa 100644 --- a/plugins/pytest-runner/pytest_run.yml +++ b/plugins/pytest-runner/pytest_run.yml @@ -4,7 +4,7 @@ any_errors_fatal: true vars: repo_folder: 'pytest-repo/' - pytest_output_filename: 'pytest-results.xml' + pytest_output_filename: 'pytest-results-{{ ansible_date_time.date }}.xml' tasks: - name: Install packages become: true @@ -30,7 +30,7 @@ - name: Execute test ignore_errors: true - shell: pytest -v {{ repo_folder }}{{ test.file }} --junitxml={{ pytest_output_filename }} 2>&1 + shell: pytest -v {{ repo_folder }}{{ test.file }} --junitxml={{ pytest_output_filename }} 2>&1 --tb=no -r fp when: test.run|default(False) register: pytest_execution