diff mbox series

gitlab-ci: Display Avocado log content when tests timeout

Message ID 20210215171438.935665-1-philmd@redhat.com (mailing list archive)
State New, archived
Headers show
Series gitlab-ci: Display Avocado log content when tests timeout | expand

Commit Message

Philippe Mathieu-Daudé Feb. 15, 2021, 5:14 p.m. UTC
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

Suggested-by: Willian Rampazzo <willianr@redhat.com>
Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com>
---
 .gitlab-ci.yml | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Wainer dos Santos Moschetta Feb. 15, 2021, 5:49 p.m. UTC | #1
On 2/15/21 2:14 PM, Philippe Mathieu-Daudé wrote:
> 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
>
> Suggested-by: Willian Rampazzo <willianr@redhat.com>
Good idea.
> Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com>
> ---
>   .gitlab-ci.yml | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)


Reviewed-by: Wainer dos Santos Moschetta <wainersm@redhat.com>


>
> diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
> index 7adb9a4cef0..234cead60c2 100644
> --- a/.gitlab-ci.yml
> +++ b/.gitlab-ci.yml
> @@ -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 ;
Willian Rampazzo Feb. 15, 2021, 6:27 p.m. UTC | #2
On Mon, Feb 15, 2021 at 2:14 PM Philippe Mathieu-Daudé
<philmd@redhat.com> wrote:
>
> 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
>
> Suggested-by: Willian Rampazzo <willianr@redhat.com>
> Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com>
> ---
>  .gitlab-ci.yml | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>

Reviewed-by: Willian Rampazzo <willianr@redhat.com>
Alex Bennée Feb. 17, 2021, 12:07 p.m. UTC | #3
Philippe Mathieu-Daudé <philmd@redhat.com> writes:

> 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
>
> Suggested-by: Willian Rampazzo <willianr@redhat.com>
> Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com>

Queued to testing/next, thanks.

> ---
>  .gitlab-ci.yml | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
> index 7adb9a4cef0..234cead60c2 100644
> --- a/.gitlab-ci.yml
> +++ b/.gitlab-ci.yml
> @@ -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 ;
diff mbox series

Patch

diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index 7adb9a4cef0..234cead60c2 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -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 ;