qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Wainer dos Santos Moschetta <wainersm@redhat.com>
To: qemu-devel@nongnu.org
Cc: willianr@redhat.com, alex.bennee@linaro.org, thuth@redhat.com,
	philmd@redhat.com, crosa@redhat.com
Subject: [PATCH 2/3] gitlab-ci: Refactor code that show logs of failed acceptances
Date: Fri, 11 Dec 2020 15:38:26 -0300	[thread overview]
Message-ID: <20201211183827.915232-3-wainersm@redhat.com> (raw)
In-Reply-To: <20201211183827.915232-1-wainersm@redhat.com>

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>
---
 .gitlab-ci.yml | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index 98bff03b47..85aa20ffde 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -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:
-- 
2.28.0



  parent reply	other threads:[~2020-12-11 18:47 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-12-11 18:38 [PATCH 0/3] gitlab-ci: Refactor show logs code and archive logs Wainer dos Santos Moschetta
2020-12-11 18:38 ` [PATCH 1/3] tests/acceptance: Bump avocado requirements to 83.0 Wainer dos Santos Moschetta
2020-12-14 20:48   ` Willian Rampazzo
2020-12-11 18:38 ` Wainer dos Santos Moschetta [this message]
2020-12-14 20:53   ` [PATCH 2/3] gitlab-ci: Refactor code that show logs of failed acceptances Willian Rampazzo
2020-12-11 18:38 ` [PATCH 3/3] gitlab-ci: Archive logs of acceptance tests Wainer dos Santos Moschetta
2020-12-17 12:48   ` Thomas Huth
2020-12-17 13:36   ` Willian Rampazzo

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20201211183827.915232-3-wainersm@redhat.com \
    --to=wainersm@redhat.com \
    --cc=alex.bennee@linaro.org \
    --cc=crosa@redhat.com \
    --cc=philmd@redhat.com \
    --cc=qemu-devel@nongnu.org \
    --cc=thuth@redhat.com \
    --cc=willianr@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).