Skip to contentSkip to conversation

gitlab-ci: Display Avocado log content when tests timeout

PATCH In review Philippe Mathieu-Daudé 4 participants 4 messages Feb 15, 2021 – Feb 17, 2021

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 gitlab-ci: Display Avocado log content when tests timeout

Since commit ba2232bae6d ("gitlab-ci: Refactor code that show logs of failed acceptances") we display the log content of failing tests (Avocado "FAIL" event).

Since we are also interested in tests timeouting, update our global Avocado config to display log content for the "INTERRUPT" event, "possible when the timeout is reached" (See [*]).

[*] https://avocado-framework.readthedocs.io/en/latest/guides/writer/chapters/writing.html#test-statuses

---
 .gitlab-ci.yml | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
.gitlab-ci.yml +1 -1
index 7adb9a4cef0..234cead60c2 100644
@@ -64,7 +64,7 @@ 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"]'
+    - echo -e '[job.output.testlogs]\nstatuses = ["FAIL", "INTERRUPT"]'
            >> ~/.config/avocado/avocado.conf
     - if [ -d ${CI_PROJECT_DIR}/avocado-cache ]; then
         du -chs ${CI_PROJECT_DIR}/avocado-cache ;
Signature · 1 line
2.26.2
Reviewed-by on v1 1/1
#1 lore raw
Quoted 11 lines · Philippe Mathieu-Daudé

Since commit ba2232bae6d ("gitlab-ci: Refactor code that show logs of failed acceptances") we display the log content of failing tests (Avocado "FAIL" event).

Since we are also interested in tests timeouting, update our global Avocado config to display log content for the "INTERRUPT" event, "possible when the timeout is reached" (See [*]).

[*] https://avocado-framework.readthedocs.io/en/latest/guides/writer/chapters/writing.html#test-statuses

Good idea.

Quoted 4 lines
---
  .gitlab-ci.yml | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)
Quoted 14 lines
.gitlab-ci.yml +1 -1
index 7adb9a4cef0..234cead60c2 100644
@@ -64,7 +64,7 @@ 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"]'
+    - echo -e '[job.output.testlogs]\nstatuses = ["FAIL", "INTERRUPT"]'
             >> ~/.config/avocado/avocado.conf
      - if [ -d ${CI_PROJECT_DIR}/avocado-cache ]; then
          du -chs ${CI_PROJECT_DIR}/avocado-cache ;
Reviewed-by on v1 1/1
#2 lore raw
In reply to Philippe Mathieu-Daudé
Quoted 9 lines · Philippe Mathieu-Daudé

Since commit ba2232bae6d ("gitlab-ci: Refactor code that show logs of failed acceptances") we display the log content of failing tests (Avocado "FAIL" event).

Since we are also interested in tests timeouting, update our global Avocado config to display log content for the "INTERRUPT" event, "possible when the timeout is reached" (See [*]).

Quoted 8 lines

[*] https://avocado-framework.readthedocs.io/en/latest/guides/writer/chapters/writing.html#test-statuses

---
 .gitlab-ci.yml | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
#3 lore raw
In reply to Philippe Mathieu-Daudé
Quoted 4 lines · Philippe Mathieu-Daudé

Since commit ba2232bae6d ("gitlab-ci: Refactor code that show logs of failed acceptances") we display the log content of failing tests (Avocado "FAIL" event).

Quoted 8 lines

Since we are also interested in tests timeouting, update our global Avocado config to display log content for the "INTERRUPT" event, "possible when the timeout is reached" (See [*]).

[*] https://avocado-framework.readthedocs.io/en/latest/guides/writer/chapters/writing.html#test-statuses

Queued to testing/next, thanks.

Quoted 17 lines
---
 .gitlab-ci.yml | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
.gitlab-ci.yml +1 -1
index 7adb9a4cef0..234cead60c2 100644
@@ -64,7 +64,7 @@ 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"]'
+    - echo -e '[job.output.testlogs]\nstatuses = ["FAIL", "INTERRUPT"]'
            >> ~/.config/avocado/avocado.conf
     - if [ -d ${CI_PROJECT_DIR}/avocado-cache ]; then
         du -chs ${CI_PROJECT_DIR}/avocado-cache ;
Signature · 1 line
Alex Bennée