Skip to content

Commit

Permalink
gitlab-ci: Refactor code that show logs of failed acceptances
Browse files Browse the repository at this point in the history
Replace the code (python) on after_script of the acceptance jobs that
is currently used to show the logs of failed tests. Instead it is used
the Avocado's testlogs plug-in which works likewise.

Signed-off-by: Wainer dos Santos Moschetta <wainersm@redhat.com>
Reviewed-by: Willian Rampazzo <willianr@redhat.com>
Message-Id: <20201211183827.915232-3-wainersm@redhat.com>
Signed-off-by: Thomas Huth <thuth@redhat.com>
  • Loading branch information
wainersm authored and huth committed Dec 18, 2020
1 parent d44423a commit ba2232b
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion .gitlab-ci.yml
Expand Up @@ -58,13 +58,14 @@ include:
- echo "[datadir.paths]" > ~/.config/avocado/avocado.conf
- echo "cache_dirs = ['${CI_PROJECT_DIR}/avocado-cache']"
>> ~/.config/avocado/avocado.conf
- echo -e '[job.output.testlogs]\nstatuses = ["FAIL"]'
>> ~/.config/avocado/avocado.conf
- if [ -d ${CI_PROJECT_DIR}/avocado-cache ]; then
du -chs ${CI_PROJECT_DIR}/avocado-cache ;
fi
- export AVOCADO_ALLOW_UNTRUSTED_CODE=1
after_script:
- cd build
- python3 -c 'import json; r = json.load(open("tests/results/latest/results.json")); [print(t["logfile"]) for t in r["tests"] if t["status"] not in ("PASS", "SKIP", "CANCEL")]' | xargs cat
- du -chs ${CI_PROJECT_DIR}/avocado-cache

build-system-ubuntu:
Expand Down

0 comments on commit ba2232b

Please sign in to comment.