From patchwork Tue Apr 26 07:09:16 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: David Marchand X-Patchwork-Id: 110254 X-Patchwork-Delegate: david.marchand@redhat.com Return-Path: X-Original-To: patchwork@inbox.dpdk.org Delivered-To: patchwork@inbox.dpdk.org Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 302DCA00C3; Tue, 26 Apr 2022 09:09:34 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 0F51940691; Tue, 26 Apr 2022 09:09:34 +0200 (CEST) Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by mails.dpdk.org (Postfix) with ESMTP id 163AA4068E for ; Tue, 26 Apr 2022 09:09:31 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1650956971; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=tdUKb3CTY0Tc2O62o44BVYY8+g8MwuH3O+MU8tOL/iM=; b=VQV0/zBn3q+T+Wj/OkhB/A3Mhi+tpTarhzrJZ98inZG8CYvU5+jwP5Bx1aZ7YAxiPKKAWH Gy33SrZ8AWFOG9TeoHwJdm0aU5iKLLJrsT8OgcvjMHS2RFyc41Wxi0ip4C67OPHPskzRqo yib1IKbtpdcztN42ogxvdZ5H5AlXMYg= Received: from mimecast-mx02.redhat.com (mx3-rdu2.redhat.com [66.187.233.73]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-147-Ntb01TrJPOydIQ99L6dEYg-1; Tue, 26 Apr 2022 03:09:28 -0400 X-MC-Unique: Ntb01TrJPOydIQ99L6dEYg-1 Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.rdu2.redhat.com [10.11.54.2]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 96EF81C05B06; Tue, 26 Apr 2022 07:09:28 +0000 (UTC) Received: from dmarchan.remote.csb (unknown [10.40.193.200]) by smtp.corp.redhat.com (Postfix) with ESMTP id AA8FA404E4B2; Tue, 26 Apr 2022 07:09:20 +0000 (UTC) From: David Marchand To: dev@dpdk.org Cc: Aaron Conole , Michael Santana Subject: [PATCH] ci: do not dump error logs in GHA containers Date: Tue, 26 Apr 2022 09:09:16 +0200 Message-Id: <20220426070916.532-1-david.marchand@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.84 on 10.11.54.2 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=david.marchand@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org 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 --- .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: