DPDK patches and discussions
 help / color / mirror / Atom feed
From: David Marchand <david.marchand@redhat.com>
To: dev@dpdk.org
Cc: Aaron Conole <aconole@redhat.com>,
	Michael Santana <maicolgabriel@hotmail.com>
Subject: [PATCH] ci: do not dump error logs in GHA containers
Date: Tue, 26 Apr 2022 09:09:16 +0200	[thread overview]
Message-ID: <20220426070916.532-1-david.marchand@redhat.com> (raw)

On error, the build logs are displayed in GHA console and logs unless
the GITHUB_WORKFLOW env variable is set.
However, containers in GHA do not automatically inherit this variable.
We could pass this variable in the container environment, but in the
end, dumping those logs is only for Travis which we don't really care
about anymore.

Let's make the linux-build.sh more generic and dump logs from Travis
yaml itself.

Fixes: b35c4b0aa2bc ("ci: add Fedora 35 container in GHA")

Signed-off-by: David Marchand <david.marchand@redhat.com>
---
 .ci/linux-build.sh | 19 -------------------
 .travis.yml        |  4 ++++
 2 files changed, 4 insertions(+), 19 deletions(-)

diff --git a/.ci/linux-build.sh b/.ci/linux-build.sh
index 774a1441bf..6a937611fa 100755
--- a/.ci/linux-build.sh
+++ b/.ci/linux-build.sh
@@ -3,25 +3,6 @@
 # Builds are run as root in containers, no need for sudo
 [ "$(id -u)" != '0' ] || alias sudo=
 
-on_error() {
-    if [ $? = 0 ]; then
-        exit
-    fi
-    FILES_TO_PRINT="build/meson-logs/testlog.txt"
-    FILES_TO_PRINT="$FILES_TO_PRINT build/.ninja_log"
-    FILES_TO_PRINT="$FILES_TO_PRINT build/meson-logs/meson-log.txt"
-    FILES_TO_PRINT="$FILES_TO_PRINT build/gdb.log"
-
-    for pr_file in $FILES_TO_PRINT; do
-        if [ -e "$pr_file" ]; then
-            cat "$pr_file"
-        fi
-    done
-}
-# We capture the error logs as artifacts in Github Actions, no need to dump
-# them via a EXIT handler.
-[ -n "$GITHUB_WORKFLOW" ] || trap on_error EXIT
-
 install_libabigail() {
     version=$1
     instdir=$2
diff --git a/.travis.yml b/.travis.yml
index 5f46dccb54..e4e70fa560 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -38,6 +38,10 @@ _doc_packages: &doc_packages
 
 before_install: ./.ci/${TRAVIS_OS_NAME}-setup.sh
 script: ./.ci/${TRAVIS_OS_NAME}-build.sh
+after_failure:
+- [ ! -e build/meson-logs/testlog.txt ] || cat build/meson-logs/testlog.txt
+- [ ! -e build/.ninja_log ] || cat build/.ninja_log
+- [ ! -e build/meson-logs/meson-log.txt ] || cat build/meson-logs/meson-log.txt
 
 env:
   global:
-- 
2.23.0


             reply	other threads:[~2022-04-26  7:09 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-04-26  7:09 David Marchand [this message]
2022-04-26  7:18 ` David Marchand
2022-04-26 15:05   ` Aaron Conole
2022-04-28  9:51     ` David Marchand
2022-04-29  4:16       ` Honnappa Nagarahalli
2022-04-29 20:12         ` Aaron Conole

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=20220426070916.532-1-david.marchand@redhat.com \
    --to=david.marchand@redhat.com \
    --cc=aconole@redhat.com \
    --cc=dev@dpdk.org \
    --cc=maicolgabriel@hotmail.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).