From patchwork Tue Jul 13 12:17:53 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: David Marchand X-Patchwork-Id: 1504581 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=openvswitch.org (client-ip=2605:bc80:3010::133; helo=smtp2.osuosl.org; envelope-from=ovs-dev-bounces@openvswitch.org; receiver=) Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=redhat.com header.i=@redhat.com header.a=rsa-sha256 header.s=mimecast20190719 header.b=RR1hWNul; dkim-atps=neutral Received: from smtp2.osuosl.org (smtp2.osuosl.org [IPv6:2605:bc80:3010::133]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4GPKRD35YSz9sXN for ; Tue, 13 Jul 2021 22:18:15 +1000 (AEST) Received: from localhost (localhost [127.0.0.1]) by smtp2.osuosl.org (Postfix) with ESMTP id 50BC54024F; Tue, 13 Jul 2021 12:18:12 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from smtp2.osuosl.org ([127.0.0.1]) by localhost (smtp2.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id g9xoqAcAuVID; Tue, 13 Jul 2021 12:18:10 +0000 (UTC) Received: from lists.linuxfoundation.org (lf-lists.osuosl.org [140.211.9.56]) by smtp2.osuosl.org (Postfix) with ESMTPS id DE8B2400E0; Tue, 13 Jul 2021 12:18:09 +0000 (UTC) Received: from lf-lists.osuosl.org (localhost [127.0.0.1]) by lists.linuxfoundation.org (Postfix) with ESMTP id C0001C001A; Tue, 13 Jul 2021 12:18:09 +0000 (UTC) X-Original-To: dev@openvswitch.org Delivered-To: ovs-dev@lists.linuxfoundation.org Received: from smtp1.osuosl.org (smtp1.osuosl.org [IPv6:2605:bc80:3010::138]) by lists.linuxfoundation.org (Postfix) with ESMTP id 0AEE9C000E for ; Tue, 13 Jul 2021 12:18:08 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by smtp1.osuosl.org (Postfix) with ESMTP id EF1BB830E3 for ; Tue, 13 Jul 2021 12:18:07 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Authentication-Results: smtp1.osuosl.org (amavisd-new); dkim=pass (1024-bit key) header.d=redhat.com Received: from smtp1.osuosl.org ([127.0.0.1]) by localhost (smtp1.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id fnELOZSVuFDN for ; Tue, 13 Jul 2021 12:18:06 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.8.0 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [216.205.24.124]) by smtp1.osuosl.org (Postfix) with ESMTPS id AEFB7826DF for ; Tue, 13 Jul 2021 12:18:06 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1626178685; 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=0R/oR5Cj0gip88CGh4Cs2zjogR6KN8Px1dSpjkSNQ0g=; b=RR1hWNul1ZuJa44VutLwerhxKikJi2Rnt3w/UodBB8bhMuVhGvWijckwPlKmGcU1+zGK0n UBeJLSfnRQCUH1UN+XVvnjZS6vQt3r/D2bFkjRBKGFdtq67w4nw+9kWhOXn6iwNpnkq+ev SWI90e0YiOx0Z9sBmYHPUm2gKovd2SI= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-25--HEDBWKHNPWsA0ccSiw72Q-1; Tue, 13 Jul 2021 08:18:04 -0400 X-MC-Unique: -HEDBWKHNPWsA0ccSiw72Q-1 Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.phx2.redhat.com [10.5.11.15]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 2A569192FDA0; Tue, 13 Jul 2021 12:18:03 +0000 (UTC) Received: from dmarchan.remote.csb (unknown [10.40.193.196]) by smtp.corp.redhat.com (Postfix) with ESMTP id B02985D6BA; Tue, 13 Jul 2021 12:18:01 +0000 (UTC) From: David Marchand To: dev@openvswitch.org Date: Tue, 13 Jul 2021 14:17:53 +0200 Message-Id: <20210713121753.1146-1-david.marchand@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.15 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 Cc: i.maximets@ovn.org Subject: [ovs-dev] [PATCH] ci: Do not dump logs on error for GitHub Actions. X-BeenThere: ovs-dev@openvswitch.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: ovs-dev-bounces@openvswitch.org Sender: "dev" GHA webui directly focus on the last lines for a failing step. config and testsuite logs are attached as artifacts in GHA in case of failures, so dumping them just adds noise. Skip dumping those files. Travis is left untouched though Signed-off-by: David Marchand Signed-off-by: Aaron Conole Acked-by: Aaron Conole --- Note: I could do only little checks on Travis by lack of credits. OSX change is untested but is done nevertheless for consistency sake. ARM jobs pass fine. --- .ci/linux-build.sh | 27 +++++++++++++++++++-------- .ci/osx-build.sh | 30 +++++++++++++++++++----------- 2 files changed, 38 insertions(+), 19 deletions(-) diff --git a/.ci/linux-build.sh b/.ci/linux-build.sh index 0210d6a77e..863f023888 100755 --- a/.ci/linux-build.sh +++ b/.ci/linux-build.sh @@ -7,6 +7,21 @@ CFLAGS_FOR_OVS="-g -O2" SPARSE_FLAGS="" EXTRA_OPTS="--enable-Werror" +on_exit() { + if [ $? = 0 ]; then + exit + fi + FILES_TO_PRINT="config.log" + FILES_TO_PRINT="$FILES_TO_PRINT */_build/sub/tests/testsuite.log" + + for pr_file in $FILES_TO_PRINT; do + cat "$pr_file" 2>/dev/null + 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_exit EXIT + function install_kernel() { if [[ "$1" =~ ^5.* ]]; then @@ -163,7 +178,7 @@ function install_dpdk() function configure_ovs() { ./boot.sh - ./configure CFLAGS="${CFLAGS_FOR_OVS}" $* || { cat config.log; exit 1; } + ./configure CFLAGS="${CFLAGS_FOR_OVS}" $* } function build_ovs() @@ -180,7 +195,7 @@ function build_ovs() make -j4 popd else - make -j4 || { cat config.log; exit 1; } + make -j4 fi } @@ -244,12 +259,8 @@ if [ "$TESTSUITE" ]; then configure_ovs export DISTCHECK_CONFIGURE_FLAGS="$OPTS" - if ! make distcheck -j4 CFLAGS="${CFLAGS_FOR_OVS}" \ - TESTSUITEFLAGS=-j4 RECHECK=yes; then - # testsuite.log is necessary for debugging. - cat */_build/sub/tests/testsuite.log - exit 1 - fi + make distcheck -j4 CFLAGS="${CFLAGS_FOR_OVS}" \ + TESTSUITEFLAGS=-j4 RECHECK=yes else if [ -z "${KERNEL_LIST}" ]; then build_ovs ${KERNEL}; else diff --git a/.ci/osx-build.sh b/.ci/osx-build.sh index bf2c13fa3c..f8facebeb0 100755 --- a/.ci/osx-build.sh +++ b/.ci/osx-build.sh @@ -5,6 +5,21 @@ set -o errexit CFLAGS="-Werror $CFLAGS" EXTRA_OPTS="" +on_exit() { + if [ $? = 0 ]; then + exit + fi + FILES_TO_PRINT="config.log" + FILES_TO_PRINT="$FILES_TO_PRINT */_build/sub/tests/testsuite.log" + + for pr_file in $FILES_TO_PRINT; do + cat "$pr_file" 2>/dev/null + 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_exit EXIT + function configure_ovs() { ./boot.sh && ./configure $* @@ -13,20 +28,13 @@ function configure_ovs() configure_ovs $EXTRA_OPTS $* if [ "$CC" = "clang" ]; then - set make CFLAGS="$CFLAGS -Wno-error=unused-command-line-argument" + make CFLAGS="$CFLAGS -Wno-error=unused-command-line-argument" else - set make CFLAGS="$CFLAGS $BUILD_ENV" -fi -if ! "$@"; then - cat config.log - exit 1 + make CFLAGS="$CFLAGS $BUILD_ENV" fi + if [ "$TESTSUITE" ] && [ "$CC" != "clang" ]; then - if ! make distcheck RECHECK=yes; then - # testsuite.log is necessary for debugging. - cat */_build/sub/tests/testsuite.log - exit 1 - fi + make distcheck RECHECK=yes fi exit 0