From patchwork Wed May 25 11:25:50 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?b?w4Z2YXIgQXJuZmrDtnLDsCBCamFybWFzb24=?= X-Patchwork-Id: 12861034 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 037F2C433EF for ; Wed, 25 May 2022 11:26:29 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S239071AbiEYL01 (ORCPT ); Wed, 25 May 2022 07:26:27 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46178 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229835AbiEYL0X (ORCPT ); Wed, 25 May 2022 07:26:23 -0400 Received: from mail-wm1-x32b.google.com (mail-wm1-x32b.google.com [IPv6:2a00:1450:4864:20::32b]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 809BA994F7 for ; Wed, 25 May 2022 04:26:22 -0700 (PDT) Received: by mail-wm1-x32b.google.com with SMTP id n124-20020a1c2782000000b003972dfca96cso3149300wmn.4 for ; Wed, 25 May 2022 04:26:22 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=egLKGOAL6OQbN+jgvrbBVQcSfuL+AN0CAVgLeaD+GMU=; b=q176DyNan1BcZ1eUBhRmQ2/6xbOWlPYtcSHsY4xLQNXfDsOanZL87CWuD2Io6yMXV+ c+0X9DkG4ss0HVYD+EYGaZff9N+BeX3/+pR4bX0W6yu7r8Jd9RmzVJFN9GUB1X19N/wv t7zUoA+1tqdyB2PFlXsnZCTknkq9ED8dpCpO3olTqDO6nCKqQ93qtFS0IfuMs+km1xDm uFLCONMgmwXbRSPsIbgw9gGk5x/SwdGzpKqQWNy+bG5Te9gElVaO6KnKf12uQe8vD44U RA/5z7i5hoIW1snkvC9mpI32Ct9baGgx/W20vWicO0myz4ata3n/M9nphh68VKAPY5Dt GXOA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=egLKGOAL6OQbN+jgvrbBVQcSfuL+AN0CAVgLeaD+GMU=; b=HzoW/Glr0FnP+XGSLQ4zJcOxCrqgFmQ5vikgYkGOJd+f2HOY18IdQZ9fbZhpR4IyRw gcVYMkhy4uwvCOM3QZSjbE1MLRF1kia9OIcoobplwCMI53vMFQC/chKr5YFCs1NEkQLZ Aly0jSF17OsshgLTa8G/ssmRMpFPoVr2+noj3wvZiQbMfFcM0/TzMOgV0/4Mtrg/s1bd 1cQYHouf1mPlke1lgGpXqu7XFs8fmaTWP2yNCYYaFIep6U6dC2yjcw1syXduO6zzmdwD IHUwW+dAqOzSi+M9Sobc9XZZjP7yjZK0M6Mgct9ciJ5YoCMj7dt02lXhavQUQaw5kSuW BuUw== X-Gm-Message-State: AOAM533KVYMedoWTM5QUANE/UJHP9HI6GsSnDuQxFg3seTt3NQjlb2GX PdE3oEAny0jgyYdqqbHIRHJbswVrIRG3oQ== X-Google-Smtp-Source: ABdhPJxerd2C7m08XaiRGBa0sEesFYfWF5IvR/h3uX+NmVaumwA5jI03BQkyx1WNTs6FlHteYeT20w== X-Received: by 2002:a7b:cd95:0:b0:397:3c5e:9639 with SMTP id y21-20020a7bcd95000000b003973c5e9639mr7842009wmj.12.1653477980847; Wed, 25 May 2022 04:26:20 -0700 (PDT) Received: from vm.nix.is (vm.nix.is. [2a01:4f8:120:2468::2]) by smtp.gmail.com with ESMTPSA id z13-20020adfd0cd000000b0020d0dfcd10asm1851095wrh.65.2022.05.25.04.26.20 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 25 May 2022 04:26:20 -0700 (PDT) From: =?utf-8?b?w4Z2YXIgQXJuZmrDtnLDsCBCamFybWFzb24=?= To: git@vger.kernel.org Cc: Junio C Hamano , Taylor Blau , =?utf-8?q?SZEDER_G=C3=A1bor?= , =?utf-8?b?xJBvw6Bu?= =?utf-8?b?IFRy4bqnbiBDw7RuZyBEYW5o?= , =?utf-8?q?Car?= =?utf-8?q?lo_Marcelo_Arenas_Bel=C3=B3n?= , Johannes Schindelin , Victoria Dye , Matheus Tavares , Lars Schneider , Eric Sunshine , =?utf-8?b?w4Z2YXIgQXJuZmrDtnLDsCBC?= =?utf-8?b?amFybWFzb24=?= Subject: [PATCH v6 01/14] CI: don't "cd" in ci/print-test-failures.sh Date: Wed, 25 May 2022 13:25:50 +0200 Message-Id: X-Mailer: git-send-email 2.36.1.1045.gf356b5617dd In-Reply-To: References: MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: git@vger.kernel.org Change the logic in ci/print-test-failures.sh so that we don't need to "cd" at the top-level, we'll now only do so for the "tar" command. This way we can remove some duplicate code added in aea8879a6ac (travis-ci: include the trash directories of failed tests in the trace log, 2018-08-01), i.e. not have both a $TEST_NAME and $test_name. The output is exactly the same as before, i.e. "test-results/" was included in the heading. Signed-off-by: Ævar Arnfjörð Bjarmason --- ci/print-test-failures.sh | 29 ++++++++++++++++------------- 1 file changed, 16 insertions(+), 13 deletions(-) diff --git a/ci/print-test-failures.sh b/ci/print-test-failures.sh index ec395c79ccd..f6736f424e0 100755 --- a/ci/print-test-failures.sh +++ b/ci/print-test-failures.sh @@ -8,33 +8,36 @@ set -e . ${0%/*}/lib-ci-type.sh . ${0%/*}/lib-tput.sh -cd t/ - -if ! ls test-results/*.exit >/dev/null 2>/dev/null +if ! ls t/test-results/*.exit >/dev/null 2>/dev/null then echo "Build job failed before the tests could have been run" exit fi -for TEST_EXIT in test-results/*.exit +for TEST_EXIT in t/test-results/*.exit do if [ "$(cat "$TEST_EXIT")" != "0" ] then - TEST_OUT="${TEST_EXIT%exit}out" + TEST_NAME="${TEST_EXIT%.exit}" + TEST_NAME="${TEST_NAME##*/}" + TEST_OUT="${TEST_NAME}.out" + TEST_MARKUP="${TEST_NAME}.markup" + echo "------------------------------------------------------------------------" - echo "$(tput setaf 1)${TEST_OUT}...$(tput sgr0)" + echo "$(tput setaf 1)test-results/${TEST_OUT}...$(tput sgr0)" echo "------------------------------------------------------------------------" - cat "${TEST_OUT}" + cat "t/test-results/${TEST_OUT}" - test_name="${TEST_EXIT%.exit}" - test_name="${test_name##*/}" - trash_dir="trash directory.$test_name" + trash_dir="trash directory.$TEST_NAME" case "$CI_TYPE" in github-actions) - mkdir -p failed-test-artifacts + mkdir -p t/failed-test-artifacts echo "FAILED_TEST_ARTIFACTS=t/failed-test-artifacts" >>$GITHUB_ENV - cp "${TEST_EXIT%.exit}.out" failed-test-artifacts/ - tar czf failed-test-artifacts/"$test_name".trash.tar.gz "$trash_dir" + cp "t/test-results/${TEST_OUT}" t/failed-test-artifacts/ + ( + cd t && + tar czf failed-test-artifacts/"$TEST_NAME".trash.tar.gz "$trash_dir" + ) ;; esac fi From patchwork Wed May 25 11:25:51 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?b?w4Z2YXIgQXJuZmrDtnLDsCBCamFybWFzb24=?= X-Patchwork-Id: 12861035 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 9F84AC433FE for ; Wed, 25 May 2022 11:26:30 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S240683AbiEYL03 (ORCPT ); Wed, 25 May 2022 07:26:29 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46184 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234832AbiEYL0Y (ORCPT ); Wed, 25 May 2022 07:26:24 -0400 Received: from mail-wm1-x32e.google.com (mail-wm1-x32e.google.com [IPv6:2a00:1450:4864:20::32e]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 8230D9AE73 for ; Wed, 25 May 2022 04:26:23 -0700 (PDT) Received: by mail-wm1-x32e.google.com with SMTP id o29-20020a05600c511d00b00397697f172dso954807wms.0 for ; Wed, 25 May 2022 04:26:23 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=je6OJ96oelNs9vB0ASUeL0IdSQZy/0cGa8Vh4ggtMFg=; b=G7inlS8D5oxvQJC9XaA0gbCIhwrBPYxraCEBkfdRU6EWdDocBD//vtrYor9Ex5ZiYL O6wVKytdrgCsfTjfan6d1MpFn5sl3xToqvEW6ziL8v4jL0wDV0lpYTvPgx70UZR3Vr84 OAVy8mKCjT5uEzfGH0c0FtIL5uokrQtZ/W4HJVJhmsQ8RnPMPuoqZdy17sMG5pV81huT KoL7L6WZmW5G+Wijp8ROjnpA78h2AVDsWjDHJcdNJLeEDLVriKFJK1T0dIzs3NAfXzeu C757EuzoeXeAmO1N+SowfO1g408dFjMCsCMlnM/CMbxiYrVfbDMBvxKKmQYxTb+uAvLC x8Bg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=je6OJ96oelNs9vB0ASUeL0IdSQZy/0cGa8Vh4ggtMFg=; b=nQYWfoUt8Z+I/Bb6L46dM3brXigNgaJYKYC/1Gz5mpRljFDhJHTVaSje7QTBHAdJt6 O3MZxPU2SWX0iPb8rZHQVhL+s+C30OkxnogCfqxqJmgR+GsQlWVkmlrnanMwjj8DRhP3 sZ6HA0HtT8tH7EltM/PjxqI3KhyjKQ74CTO4Ex0NEbu+yoLZxWw0n7j1SY+qZd2q2nfp WO4PVZA5bAPz9Y+4lTX3kp2tP098RI9QBqvZGuE9qxoOyNqopJXur1T7NIkbBdmHFMKq bvFRS1+lmHUfouPQlC96lfMAaW4uQEXNEf+skx+oGR31nrHXz8TKna0GlcsE2UnjAGNi +flQ== X-Gm-Message-State: AOAM533MEVK21ZL7kQMpDEMTlfpTB/Vz/W0GOsydkq4nkbYuhX2o+VJq 6s++FL+T+8HH/g6yppUoYjb7Q6MIf+whIg== X-Google-Smtp-Source: ABdhPJwMzyp2RNbKKMIsHw6asDF5BW0/GFi3J8TCCadeQmSAfolFTpuF+uMgDmWC3E/15hARFHtBeg== X-Received: by 2002:a1c:f40a:0:b0:397:306b:caec with SMTP id z10-20020a1cf40a000000b00397306bcaecmr7797983wma.22.1653477981823; Wed, 25 May 2022 04:26:21 -0700 (PDT) Received: from vm.nix.is (vm.nix.is. [2a01:4f8:120:2468::2]) by smtp.gmail.com with ESMTPSA id z13-20020adfd0cd000000b0020d0dfcd10asm1851095wrh.65.2022.05.25.04.26.20 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 25 May 2022 04:26:21 -0700 (PDT) From: =?utf-8?b?w4Z2YXIgQXJuZmrDtnLDsCBCamFybWFzb24=?= To: git@vger.kernel.org Cc: Junio C Hamano , Taylor Blau , =?utf-8?q?SZEDER_G=C3=A1bor?= , =?utf-8?b?xJBvw6Bu?= =?utf-8?b?IFRy4bqnbiBDw7RuZyBEYW5o?= , =?utf-8?q?Car?= =?utf-8?q?lo_Marcelo_Arenas_Bel=C3=B3n?= , Johannes Schindelin , Victoria Dye , Matheus Tavares , Lars Schneider , Eric Sunshine , =?utf-8?b?w4Z2YXIgQXJuZmrDtnLDsCBC?= =?utf-8?b?amFybWFzb24=?= Subject: [PATCH v6 02/14] CI: don't include "test-results/" in ci/print-test-failures.sh output Date: Wed, 25 May 2022 13:25:51 +0200 Message-Id: X-Mailer: git-send-email 2.36.1.1045.gf356b5617dd In-Reply-To: References: MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: git@vger.kernel.org Change the ci/print-test-failures.sh output introduced in 657343a602e (travis-ci: move Travis CI code into dedicated scripts, 2017-09-10) to stop including "test-results/" in the heading, it was more of an artifact of how the iteration was being done in that initial version than anything else. Signed-off-by: Ævar Arnfjörð Bjarmason --- ci/print-test-failures.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ci/print-test-failures.sh b/ci/print-test-failures.sh index f6736f424e0..1249bb0c0cf 100755 --- a/ci/print-test-failures.sh +++ b/ci/print-test-failures.sh @@ -24,7 +24,7 @@ do TEST_MARKUP="${TEST_NAME}.markup" echo "------------------------------------------------------------------------" - echo "$(tput setaf 1)test-results/${TEST_OUT}...$(tput sgr0)" + echo "$(tput setaf 1)${TEST_OUT}...$(tput sgr0)" echo "------------------------------------------------------------------------" cat "t/test-results/${TEST_OUT}" From patchwork Wed May 25 11:25:52 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?b?w4Z2YXIgQXJuZmrDtnLDsCBCamFybWFzb24=?= X-Patchwork-Id: 12861037 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 1764EC433FE for ; Wed, 25 May 2022 11:26:36 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S242030AbiEYL0d (ORCPT ); Wed, 25 May 2022 07:26:33 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46198 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S237020AbiEYL0Z (ORCPT ); Wed, 25 May 2022 07:26:25 -0400 Received: from mail-wr1-x433.google.com (mail-wr1-x433.google.com [IPv6:2a00:1450:4864:20::433]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 53C139CCA2 for ; Wed, 25 May 2022 04:26:24 -0700 (PDT) Received: by mail-wr1-x433.google.com with SMTP id k30so29681100wrd.5 for ; Wed, 25 May 2022 04:26:24 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=8mblGx6pFdQlsypWTrdNcDZYS6qoOJE6NOKFvWW6TxA=; b=AfbXvJabA9w5aNpl+DynxX4PEcSnKddMWejc8nwQ4HtFV8uJfNAi+ld5zb3JE5VPOi v6M+nEMsG3z8t07S0MJoD6xMEJCNX1DgOw/oIZ7yVBXz1llVypTNhUNnpHvcL+vTy5XF 4C/xtP/fa8GdlnF4ZKDTNsOm05WvshUmbue8Xctdy3s/uyVT+0aExoV0euzUTdm2aphE LYhG54tfpUI40v4LkyLk5mZ2j8GBkMpoDO5MyfjUzt4og0x9YhmlNavOox4uAKyO/bDW GuCGO9QiasQIuZLUBAzWIUJhGZdPuz/kgR9O2pmZy3NrZDwcNEehjsJzcvHMwevaj0ZO fBBg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=8mblGx6pFdQlsypWTrdNcDZYS6qoOJE6NOKFvWW6TxA=; b=WLcj04GNy3aZpx08TyIVnh1l5Hq1h4+VbL5TkVQIW8tOdWeiGk8A/FzviT/Qda1Z+3 7Llbgg0x+rSPoGRstqaeI9Twcrz9EBYmpdd7RteZpn90r2RSUh7QKR+sb4rgB22ZfOTf Kbtx2vd52cnNTzjNMJo8lfO87eVw487vx2OoQoYuOSOFTzCYoMUjAwM+/+X2TXe+YQwS WoxfBqglSxeWNx4ORP5qaPuRzuNUdwv/xDyZOY8GeznpECP40v6ELPHEP1wUU1+G4rJX CW1FIas5fd+ZdGBOw5qeBqymEM1gWBAs+XTTY9SLSV+G+xsJFaNxEUx6CXpn67mOyld/ 0NmQ== X-Gm-Message-State: AOAM531iXqBQL7Fbg6VOLtOzp/KdUOO0o1KcZdnfC6JJMPkZBMfzndYd gK17iPi2L2PL8M/5lZSd1sYjNrYMlTRILg== X-Google-Smtp-Source: ABdhPJwL0E9yogVBm3ily6lWoLodD7iS2iVk65xwUKwVXm3i6BCrb47HhvOc9C/wVv+oCfEPAS1pNQ== X-Received: by 2002:a05:6000:1546:b0:20f:c62a:b0e with SMTP id 6-20020a056000154600b0020fc62a0b0emr16640536wry.283.1653477982710; Wed, 25 May 2022 04:26:22 -0700 (PDT) Received: from vm.nix.is (vm.nix.is. [2a01:4f8:120:2468::2]) by smtp.gmail.com with ESMTPSA id z13-20020adfd0cd000000b0020d0dfcd10asm1851095wrh.65.2022.05.25.04.26.21 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 25 May 2022 04:26:22 -0700 (PDT) From: =?utf-8?b?w4Z2YXIgQXJuZmrDtnLDsCBCamFybWFzb24=?= To: git@vger.kernel.org Cc: Junio C Hamano , Taylor Blau , =?utf-8?q?SZEDER_G=C3=A1bor?= , =?utf-8?b?xJBvw6Bu?= =?utf-8?b?IFRy4bqnbiBDw7RuZyBEYW5o?= , =?utf-8?q?Car?= =?utf-8?q?lo_Marcelo_Arenas_Bel=C3=B3n?= , Johannes Schindelin , Victoria Dye , Matheus Tavares , Lars Schneider , Eric Sunshine , =?utf-8?b?w4Z2YXIgQXJuZmrDtnLDsCBC?= =?utf-8?b?amFybWFzb24=?= Subject: [PATCH v6 03/14] CI: stop setting FAILED_TEST_ARTIFACTS N times Date: Wed, 25 May 2022 13:25:52 +0200 Message-Id: X-Mailer: git-send-email 2.36.1.1045.gf356b5617dd In-Reply-To: References: MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: git@vger.kernel.org The FAILED_TEST_ARTIFACTS variable introduced in f72f328bc57 (ci: let GitHub Actions upload failed tests' directories, 2020-04-11) is only used once in the main.yml, there is no need to set it N times if we have N failing tests. See also 92bf1b60673 (ci: avoid `set-env` construct in print-test-failures.sh, 2020-11-17) which moved it to using $GITHUB_ENV, we'll now check if it's set like ci/lib.sh, this makes it easier to test this script locally. Signed-off-by: Ævar Arnfjörð Bjarmason --- ci/print-test-failures.sh | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/ci/print-test-failures.sh b/ci/print-test-failures.sh index 1249bb0c0cf..8d4d2225371 100755 --- a/ci/print-test-failures.sh +++ b/ci/print-test-failures.sh @@ -32,7 +32,6 @@ do case "$CI_TYPE" in github-actions) mkdir -p t/failed-test-artifacts - echo "FAILED_TEST_ARTIFACTS=t/failed-test-artifacts" >>$GITHUB_ENV cp "t/test-results/${TEST_OUT}" t/failed-test-artifacts/ ( cd t && @@ -42,3 +41,11 @@ do esac fi done + +if test -n "$failed" +then + if test -n "$GITHUB_ENV" + then + echo "FAILED_TEST_ARTIFACTS=t/failed-test-artifacts" >>$GITHUB_ENV + fi +fi From patchwork Wed May 25 11:25:53 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?b?w4Z2YXIgQXJuZmrDtnLDsCBCamFybWFzb24=?= X-Patchwork-Id: 12861038 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 622D6C433F5 for ; Wed, 25 May 2022 11:26:38 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S242257AbiEYL0g (ORCPT ); Wed, 25 May 2022 07:26:36 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46208 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S237877AbiEYL00 (ORCPT ); Wed, 25 May 2022 07:26:26 -0400 Received: from mail-wm1-x330.google.com (mail-wm1-x330.google.com [IPv6:2a00:1450:4864:20::330]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 767AB9CCA3 for ; Wed, 25 May 2022 04:26:25 -0700 (PDT) Received: by mail-wm1-x330.google.com with SMTP id m32-20020a05600c3b2000b0039756bb41f2so3151711wms.3 for ; Wed, 25 May 2022 04:26:25 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=AYfYAlR0fWadogSSzkvQW0EPjNlg/8AWBp7e1GEt4RQ=; b=HAJAuPFK5wV82UDn0Bxv0hOM0x5limN8LPsByrsBQ1Z24N9MoZPKvMe/0gJd8+0iiX 5aaxWt4q5ghxD4UK3nq9/K2ScrbZjoLlGKIpTNycaWnCNdnZGlbkfo6rYHmwYMwExALf ar30Itck5h6V3RxwwkTWK5xFhN9Qj4a2drJY3M3mp1oBZo583PZyM0hQfdk+y7f4KBDO MtUTMoVSm+/h06Fwd/5z4YaLTnpCJSVkxaI0oRWBOQ2Ts27K34VAtZ9g1BOv4YVw8MCR C+dVG8x74Hizfss5fArxKfPAWpnJSsmEEdcMqN/nvzzdFFt3baXJf/Rv5vs4A6nTTH4Z lAZQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=AYfYAlR0fWadogSSzkvQW0EPjNlg/8AWBp7e1GEt4RQ=; b=CHUEr57hFor6iwfcTU/LuJaUf9XtCfXFlPmCT9UEr+WjocCjK3WXH5GQfVcx23R+HY STsB9wAFuwfAb8Wko8Dmbr0jGMn2PLjLONb/TZ2rB1m3esmtl7/LNNMZ62Q80gUWY5Ct nFoTNa0JP/Dg9bX1+QFt510rtMr3mvxa/eL2i58zBs9waitKwRZpBWwRjic6Tnyj56+q eIEmsGOXX5sRNyFEmNh5DGXCYhnZFOfselv+uYMsepGSC4iKkllKln6rv343LAHzpAhL TuTIPo5CpY7M5xmhSIwfxqSWGzxZjatMBkotz8p4Mm2PmUbiwURHu2xrRh0epX5LtoE1 Bu/Q== X-Gm-Message-State: AOAM53305d0S4tzkXc5pPp6ahX2L23Tvck98X8LRgHcpdCtvXE7Riuov DyRlQmdGL2CKUZtnGQ2zqJj/WwP+m0+8DQ== X-Google-Smtp-Source: ABdhPJzW/MMZKNpGpw+FmkpkYsJp1MhqL5ZOXaFJ0qsQ3Xwc96AX90FqDvhlNS8xJ9X67a4Wynd+Fw== X-Received: by 2002:a05:600c:5127:b0:397:4862:e474 with SMTP id o39-20020a05600c512700b003974862e474mr7830577wms.68.1653477983594; Wed, 25 May 2022 04:26:23 -0700 (PDT) Received: from vm.nix.is (vm.nix.is. [2a01:4f8:120:2468::2]) by smtp.gmail.com with ESMTPSA id z13-20020adfd0cd000000b0020d0dfcd10asm1851095wrh.65.2022.05.25.04.26.22 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 25 May 2022 04:26:23 -0700 (PDT) From: =?utf-8?b?w4Z2YXIgQXJuZmrDtnLDsCBCamFybWFzb24=?= To: git@vger.kernel.org Cc: Junio C Hamano , Taylor Blau , =?utf-8?q?SZEDER_G=C3=A1bor?= , =?utf-8?b?xJBvw6Bu?= =?utf-8?b?IFRy4bqnbiBDw7RuZyBEYW5o?= , =?utf-8?q?Car?= =?utf-8?q?lo_Marcelo_Arenas_Bel=C3=B3n?= , Johannes Schindelin , Victoria Dye , Matheus Tavares , Lars Schneider , Eric Sunshine , Johannes Schindelin , =?utf-8?b?w4Z2YXIgQXJu?= =?utf-8?b?ZmrDtnLDsCBCamFybWFzb24=?= Subject: [PATCH v6 04/14] tests: refactor --write-junit-xml code Date: Wed, 25 May 2022 13:25:53 +0200 Message-Id: X-Mailer: git-send-email 2.36.1.1045.gf356b5617dd In-Reply-To: References: MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: git@vger.kernel.org From: Johannes Schindelin The code writing JUnit XML is interspersed directly with all the code in `t/test-lib.sh`, and it is therefore not only ill-separated, but introducing yet another output format would make the situation even worse. Let's introduce an abstraction layer by hiding the JUnit XML code behind four new functions that are supposed to be called before and after each test and test case. This is not just an academic exercise, refactoring for refactoring's sake. We _actually_ want to introduce such a new output format, to make it substantially easier to diagnose test failures in our GitHub workflow, therefore we do need this refactoring. This commit is best viewed with `git show --color-moved --color-moved-ws=allow-indentation-change `. Signed-off-by: Johannes Schindelin Signed-off-by: Ævar Arnfjörð Bjarmason --- t/test-lib-junit.sh | 126 ++++++++++++++++++++++++++++++++++++++++++++ t/test-lib.sh | 124 ++++++------------------------------------- 2 files changed, 142 insertions(+), 108 deletions(-) create mode 100644 t/test-lib-junit.sh diff --git a/t/test-lib-junit.sh b/t/test-lib-junit.sh new file mode 100644 index 00000000000..9d55d74d764 --- /dev/null +++ b/t/test-lib-junit.sh @@ -0,0 +1,126 @@ +# Library of functions to format test scripts' output in JUnit XML +# format, to support Git's test suite result to be presented in an +# easily digestible way on Azure Pipelines. +# +# Copyright (c) 2022 Johannes Schindelin +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see http://www.gnu.org/licenses/ . +# +# The idea is for `test-lib.sh` to source this file when the user asks +# for JUnit XML; these functions will then override (empty) functions +# that are are called at the appropriate times during the test runs. + +start_test_output () { + junit_xml_dir="$TEST_OUTPUT_DIRECTORY/out" + mkdir -p "$junit_xml_dir" + junit_xml_base=${1##*/} + junit_xml_path="$junit_xml_dir/TEST-${junit_xml_base%.sh}.xml" + junit_attrs="name=\"${junit_xml_base%.sh}\"" + junit_attrs="$junit_attrs timestamp=\"$(TZ=UTC \ + date +%Y-%m-%dT%H:%M:%S)\"" + write_junit_xml --truncate "" " " + junit_suite_start=$(test-tool date getnanos) + if test -n "$GIT_TEST_TEE_OUTPUT_FILE" + then + GIT_TEST_TEE_OFFSET=0 + fi +} + +start_test_case_output () { + junit_start=$(test-tool date getnanos) +} + +finalize_test_case_output () { + test_case_result=$1 + shift + case "$test_case_result" in + ok) + set "$*" + ;; + failure) + junit_insert="" + junit_insert="$junit_insert $(xml_attr_encode \ + "$(if test -n "$GIT_TEST_TEE_OUTPUT_FILE" + then + test-tool path-utils skip-n-bytes \ + "$GIT_TEST_TEE_OUTPUT_FILE" $GIT_TEST_TEE_OFFSET + else + printf '%s\n' "$@" | sed 1d + fi)")" + junit_insert="$junit_insert" + if test -n "$GIT_TEST_TEE_OUTPUT_FILE" + then + junit_insert="$junit_insert$(xml_attr_encode \ + "$(cat "$GIT_TEST_TEE_OUTPUT_FILE")")" + fi + set "$1" " $junit_insert" + ;; + fixed) + set "$* (breakage fixed)" + ;; + broken) + set "$* (known breakage)" + ;; + skip) + message="$(xml_attr_encode "$skipped_reason")" + set "$1" " " + ;; + esac + + junit_attrs="name=\"$(xml_attr_encode "$this_test.$test_count $1")\"" + shift + junit_attrs="$junit_attrs classname=\"$this_test\"" + junit_attrs="$junit_attrs time=\"$(test-tool \ + date getnanos $junit_start)\"" + write_junit_xml "$(printf '%s\n' \ + " " "$@" " ")" + junit_have_testcase=t +} + +finalize_test_output () { + if test -n "$junit_xml_path" + then + test -n "$junit_have_testcase" || { + junit_start=$(test-tool date getnanos) + write_junit_xml_testcase "all tests skipped" + } + + # adjust the overall time + junit_time=$(test-tool date getnanos $junit_suite_start) + sed -e "s/\(]*/& time=\"$junit_time\"/" \ + -e '/^ *<\/testsuite/d' \ + <"$junit_xml_path" >"$junit_xml_path.new" + mv "$junit_xml_path.new" "$junit_xml_path" + + write_junit_xml " " "" + write_junit_xml= + fi +} + +write_junit_xml () { + case "$1" in + --truncate) + >"$junit_xml_path" + junit_have_testcase= + shift + ;; + esac + printf '%s\n' "$@" >>"$junit_xml_path" +} + +xml_attr_encode () { + printf '%s\n' "$@" | test-tool xml-encode +} diff --git a/t/test-lib.sh b/t/test-lib.sh index 8ba5ca15345..27e17c569d4 100644 --- a/t/test-lib.sh +++ b/t/test-lib.sh @@ -137,6 +137,12 @@ mark_option_requires_arg () { store_arg_to=$2 } +# These functions can be overridden e.g. to output JUnit XML +start_test_output () { :; } +start_test_case_output () { :; } +finalize_test_case_output () { :; } +finalize_test_output () { :; } + parse_option () { local opt="$1" @@ -196,7 +202,7 @@ parse_option () { tee=t ;; --write-junit-xml) - write_junit_xml=t + . "$TEST_DIRECTORY/test-lib-junit.sh" ;; --stress) stress=t ;; @@ -664,7 +670,7 @@ exec 6<&0 exec 7>&2 _error_exit () { - finalize_junit_xml + finalize_test_output GIT_EXIT_OK=t exit 1 } @@ -774,35 +780,13 @@ trap '{ code=$?; set +x; } 2>/dev/null; exit $code' INT TERM HUP # the test_expect_* functions instead. test_ok_ () { - if test -n "$write_junit_xml" - then - write_junit_xml_testcase "$*" - fi + finalize_test_case_output ok "$@" test_success=$(($test_success + 1)) say_color "" "ok $test_count - $@" } test_failure_ () { - if test -n "$write_junit_xml" - then - junit_insert="" - junit_insert="$junit_insert $(xml_attr_encode \ - "$(if test -n "$GIT_TEST_TEE_OUTPUT_FILE" - then - test-tool path-utils skip-n-bytes \ - "$GIT_TEST_TEE_OUTPUT_FILE" $GIT_TEST_TEE_OFFSET - else - printf '%s\n' "$@" | sed 1d - fi)")" - junit_insert="$junit_insert" - if test -n "$GIT_TEST_TEE_OUTPUT_FILE" - then - junit_insert="$junit_insert$(xml_attr_encode \ - "$(cat "$GIT_TEST_TEE_OUTPUT_FILE")")" - fi - write_junit_xml_testcase "$1" " $junit_insert" - fi + finalize_test_case_output failure "$@" test_failure=$(($test_failure + 1)) say_color error "not ok $test_count - $1" shift @@ -815,19 +799,13 @@ test_failure_ () { } test_known_broken_ok_ () { - if test -n "$write_junit_xml" - then - write_junit_xml_testcase "$* (breakage fixed)" - fi + finalize_test_case_output fixed "$@" test_fixed=$(($test_fixed+1)) say_color error "ok $test_count - $@ # TODO known breakage vanished" } test_known_broken_failure_ () { - if test -n "$write_junit_xml" - then - write_junit_xml_testcase "$* (known breakage)" - fi + finalize_test_case_output broken "$@" test_broken=$(($test_broken+1)) say_color warn "not ok $test_count - $@ # TODO known breakage" } @@ -1104,10 +1082,7 @@ test_start_ () { test_count=$(($test_count+1)) maybe_setup_verbose maybe_setup_valgrind - if test -n "$write_junit_xml" - then - junit_start=$(test-tool date getnanos) - fi + start_test_case_output } test_finish_ () { @@ -1158,12 +1133,7 @@ test_skip () { case "$to_skip" in t) - if test -n "$write_junit_xml" - then - message="$(xml_attr_encode "$skipped_reason")" - write_junit_xml_testcase "$1" \ - " " - fi + finalize_test_case_output skip "$@" say_color skip "ok $test_count # skip $1 ($skipped_reason)" : true @@ -1179,53 +1149,6 @@ test_at_end_hook_ () { : } -write_junit_xml () { - case "$1" in - --truncate) - >"$junit_xml_path" - junit_have_testcase= - shift - ;; - esac - printf '%s\n' "$@" >>"$junit_xml_path" -} - -xml_attr_encode () { - printf '%s\n' "$@" | test-tool xml-encode -} - -write_junit_xml_testcase () { - junit_attrs="name=\"$(xml_attr_encode "$this_test.$test_count $1")\"" - shift - junit_attrs="$junit_attrs classname=\"$this_test\"" - junit_attrs="$junit_attrs time=\"$(test-tool \ - date getnanos $junit_start)\"" - write_junit_xml "$(printf '%s\n' \ - " " "$@" " ")" - junit_have_testcase=t -} - -finalize_junit_xml () { - if test -n "$write_junit_xml" && test -n "$junit_xml_path" - then - test -n "$junit_have_testcase" || { - junit_start=$(test-tool date getnanos) - write_junit_xml_testcase "all tests skipped" - } - - # adjust the overall time - junit_time=$(test-tool date getnanos $junit_suite_start) - sed -e "s/\(]*/& time=\"$junit_time\"/" \ - -e '/^ *<\/testsuite/d' \ - <"$junit_xml_path" >"$junit_xml_path.new" - mv "$junit_xml_path.new" "$junit_xml_path" - - write_junit_xml " " "" - write_junit_xml= - fi -} - test_atexit_cleanup=: test_atexit_handler () { # In a succeeding test script 'test_atexit_handler' is invoked @@ -1248,7 +1171,7 @@ test_done () { # removed, so the commands can access pidfiles and socket files. test_atexit_handler - finalize_junit_xml + finalize_test_output if test -z "$HARNESS_ACTIVE" then @@ -1539,22 +1462,7 @@ fi # in subprocesses like git equals our $PWD (for pathname comparisons). cd -P "$TRASH_DIRECTORY" || exit 1 -if test -n "$write_junit_xml" -then - junit_xml_dir="$TEST_OUTPUT_DIRECTORY/out" - mkdir -p "$junit_xml_dir" - junit_xml_base=${0##*/} - junit_xml_path="$junit_xml_dir/TEST-${junit_xml_base%.sh}.xml" - junit_attrs="name=\"${junit_xml_base%.sh}\"" - junit_attrs="$junit_attrs timestamp=\"$(TZ=UTC \ - date +%Y-%m-%dT%H:%M:%S)\"" - write_junit_xml --truncate "" " " - junit_suite_start=$(test-tool date getnanos) - if test -n "$GIT_TEST_TEE_OUTPUT_FILE" - then - GIT_TEST_TEE_OFFSET=0 - fi -fi +start_test_output "$0" # Convenience # A regexp to match 5 and 35 hexdigits From patchwork Wed May 25 11:25:54 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?b?w4Z2YXIgQXJuZmrDtnLDsCBCamFybWFzb24=?= X-Patchwork-Id: 12861039 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 5E710C433EF for ; Wed, 25 May 2022 11:26:42 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S242360AbiEYL0k (ORCPT ); Wed, 25 May 2022 07:26:40 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46210 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S237936AbiEYL01 (ORCPT ); Wed, 25 May 2022 07:26:27 -0400 Received: from mail-wr1-x42d.google.com (mail-wr1-x42d.google.com [IPv6:2a00:1450:4864:20::42d]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 772219CCAC for ; Wed, 25 May 2022 04:26:26 -0700 (PDT) Received: by mail-wr1-x42d.google.com with SMTP id j25so5256941wrb.6 for ; Wed, 25 May 2022 04:26:26 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=9I4SldCNl3+bo1kofQPG37j+uYanyoYofvpytaTOI4U=; b=b0rn2N4kte0HkAxKhlAAfXClrqit7JYwCiFoplIKjI3JoD7amCvA2izxkj/WeaYmEL e8LpGd5+iY/wp45q58CoyJgEcym34G+3BmIY5QO+o0RBFmC/gLWR+c3k+s+JiftNGjkr ZvhLYeuzbkPUWu5dyaTS1Dwdah4ILuBLjDgNK3tYhIXFXwu/KVwGcnStZZ1Y5xejAeRH B2VbYssK4LjleDurchDznnV452VTLsceMhUJBUXVLWRwq8jEWlNJGd0+NIFVt7HG4B3I CkDq+uOTv5uTbHz+GL0jtuyH6hXQOm6FGOTTjR3ujMS7255//peMteFNA+9T7j5w0Bi0 fM5A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=9I4SldCNl3+bo1kofQPG37j+uYanyoYofvpytaTOI4U=; b=THX1Uicosmk5BnJv3BryAh3NjYFYiKgxEnheIUY50BveLUZrKc3R3FqTPz5oBeWWqQ 90MW6092FqEUcujHw9FargH/XTbZ9u7+m45EN7S5Bn3ytYtawJH8DFul4f1r6V+b7dcW GV6Ldnxae4jSJ8XbnhHgVhO97u4e4ccIIAe0AvAOCY9J2uk7ktqEcKa1tk8lmXAoGBYf /71jSJlFgOzb+iwDJWReOsY4iSAN2ylXxRSkIM2hXK6zldzxWAEjLD9ztq9F4dqSNt33 BQnHuQhxI9aG/G2ATF8CIqYVzSufrL2ZHTKPUt0k30gDkoLh25e8DjaCdRS8hw7jomkY T+qg== X-Gm-Message-State: AOAM532LGWf0RxPB+J0DRDzvF6x+OuGgOSINV/EHzHpqapb8v0RIg18V Qqv5zGo3kd1/X3y0bv+ntPTlIlFI4+pIEQ== X-Google-Smtp-Source: ABdhPJwF3Vz1Mu51Ov7vRN3/j70P7TpLKrAEF8O1tj4as98b5H33LewJgLorvbv830VaR9F1MaDWAQ== X-Received: by 2002:adf:f4c5:0:b0:20f:c397:81d6 with SMTP id h5-20020adff4c5000000b0020fc39781d6mr18549427wrp.240.1653477984836; Wed, 25 May 2022 04:26:24 -0700 (PDT) Received: from vm.nix.is (vm.nix.is. [2a01:4f8:120:2468::2]) by smtp.gmail.com with ESMTPSA id z13-20020adfd0cd000000b0020d0dfcd10asm1851095wrh.65.2022.05.25.04.26.23 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 25 May 2022 04:26:23 -0700 (PDT) From: =?utf-8?b?w4Z2YXIgQXJuZmrDtnLDsCBCamFybWFzb24=?= To: git@vger.kernel.org Cc: Junio C Hamano , Taylor Blau , =?utf-8?q?SZEDER_G=C3=A1bor?= , =?utf-8?b?xJBvw6Bu?= =?utf-8?b?IFRy4bqnbiBDw7RuZyBEYW5o?= , =?utf-8?q?Car?= =?utf-8?q?lo_Marcelo_Arenas_Bel=C3=B3n?= , Johannes Schindelin , Victoria Dye , Matheus Tavares , Lars Schneider , Eric Sunshine , Johannes Schindelin , =?utf-8?b?w4Z2YXIgQXJu?= =?utf-8?b?ZmrDtnLDsCBCamFybWFzb24=?= Subject: [PATCH v6 05/14] test(junit): avoid line feeds in XML attributes Date: Wed, 25 May 2022 13:25:54 +0200 Message-Id: X-Mailer: git-send-email 2.36.1.1045.gf356b5617dd In-Reply-To: References: MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: git@vger.kernel.org From: Johannes Schindelin In the test case's output, we do want newline characters, but in the XML attributes we do not want them. However, the `xml_attr_encode` function always adds a Line Feed at the end (which are then encoded as ` `, even for XML attributes. This seems not to faze Azure Pipelines' XML parser, but it still is incorrect, so let's fix it. Signed-off-by: Johannes Schindelin Signed-off-by: Ævar Arnfjörð Bjarmason --- t/test-lib-junit.sh | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/t/test-lib-junit.sh b/t/test-lib-junit.sh index 9d55d74d764..c959183c7e2 100644 --- a/t/test-lib-junit.sh +++ b/t/test-lib-junit.sh @@ -50,7 +50,7 @@ finalize_test_case_output () { ;; failure) junit_insert="" + junit_insert="$junit_insert $(xml_attr_encode --no-lf "$1")\">" junit_insert="$junit_insert $(xml_attr_encode \ "$(if test -n "$GIT_TEST_TEE_OUTPUT_FILE" then @@ -74,12 +74,12 @@ finalize_test_case_output () { set "$* (known breakage)" ;; skip) - message="$(xml_attr_encode "$skipped_reason")" + message="$(xml_attr_encode --no-lf "$skipped_reason")" set "$1" " " ;; esac - junit_attrs="name=\"$(xml_attr_encode "$this_test.$test_count $1")\"" + junit_attrs="name=\"$(xml_attr_encode --no-lf "$this_test.$test_count $1")\"" shift junit_attrs="$junit_attrs classname=\"$this_test\"" junit_attrs="$junit_attrs time=\"$(test-tool \ @@ -122,5 +122,11 @@ write_junit_xml () { } xml_attr_encode () { - printf '%s\n' "$@" | test-tool xml-encode + if test "x$1" = "x--no-lf" + then + shift + printf '%s' "$*" | test-tool xml-encode + else + printf '%s\n' "$@" | test-tool xml-encode + fi } From patchwork Wed May 25 11:25:55 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?b?w4Z2YXIgQXJuZmrDtnLDsCBCamFybWFzb24=?= X-Patchwork-Id: 12861040 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id D0943C433FE for ; Wed, 25 May 2022 11:26:44 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S242435AbiEYL0m (ORCPT ); Wed, 25 May 2022 07:26:42 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46236 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S240594AbiEYL03 (ORCPT ); Wed, 25 May 2022 07:26:29 -0400 Received: from mail-wm1-x333.google.com (mail-wm1-x333.google.com [IPv6:2a00:1450:4864:20::333]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7B0D0972B6 for ; Wed, 25 May 2022 04:26:27 -0700 (PDT) Received: by mail-wm1-x333.google.com with SMTP id 206-20020a1c02d7000000b00397345f2c6fso486187wmc.4 for ; Wed, 25 May 2022 04:26:27 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=HIAH4ji6WFj3RiIj2Y6NlD7lYR1h/OxJp3MXk3dTvS0=; b=mjJoLqCoRr46RexgYjn+Q2/nTUuD3UR0qwy2bGNh2UFIsjkseUA3+7r/vSRuZbvnMu wSo1lso9Xdwv6LXc1I4F9gPlqeW8qHLVl4N98YL27bTx2eZT/0FSRjpxOzOk9Oa2gWmF N442d4W7o99N41PcvUaUZs9afHF7Xa+Lxf+ZSyb/k7WxWhFPl7njs7686nUcK/p6ZFvQ JmOFTvSEcyzUtQWVEP4yXeL1On3w9ia9bNAnTOORNWGOpHFLHzRTmjZ4wzsepbA92YQh m21xT1o//TNSqLU9p9/D8Duef4hNtEUcbgwrfBq1wXLXYS2PT5udxtSQD2nOkhDAoFG6 23Tg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=HIAH4ji6WFj3RiIj2Y6NlD7lYR1h/OxJp3MXk3dTvS0=; b=iqHn43ORG9ijBZ72MQPIG+0lpgA8HIEdYT5+TvxD7ALXRKu8aPwkY6kb1Q6D4rkdht Y0tVpk04lVNhC4RXNYi59M1NMuKPGJVv+CZxZQFvH5wUssrA0brj4O0EVXqxybUZfy+T kqBW21rPXWuazPu0+wpEzteKvNmprOIenUfodzjGrHO7iHXI+ERPT8VoDWons2RYIl2Y gCUtrMIRIdpj1SexVcT5Vk3NmTLORlZD+CKQxaaWZQJCbZSLsMnksQvIN01pvsGqQbTh 5bwcTKS63V7IrmX2J23NsigEy9Q9+K3xpJTA1hJkqgHvYxjMhZqHVQCU+YsYXv3aUBua DZ2A== X-Gm-Message-State: AOAM5300nYSLB6BUcn8lwkrITfqwUIwLMJMgRKEKrioTDxeXVzz26HPI yV3EC5qkwKvyok/crw2hVuYNTMMX98xWLg== X-Google-Smtp-Source: ABdhPJxBNgdkBf1peJqzeT74udWiD3x9HgL5V0LA6spg1fJSu2t6OoHhExkYIC8MyxJBh24asal+QQ== X-Received: by 2002:a05:600c:1d28:b0:397:65ef:fb9e with SMTP id l40-20020a05600c1d2800b0039765effb9emr4107272wms.136.1653477985832; Wed, 25 May 2022 04:26:25 -0700 (PDT) Received: from vm.nix.is (vm.nix.is. [2a01:4f8:120:2468::2]) by smtp.gmail.com with ESMTPSA id z13-20020adfd0cd000000b0020d0dfcd10asm1851095wrh.65.2022.05.25.04.26.24 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 25 May 2022 04:26:25 -0700 (PDT) From: =?utf-8?b?w4Z2YXIgQXJuZmrDtnLDsCBCamFybWFzb24=?= To: git@vger.kernel.org Cc: Junio C Hamano , Taylor Blau , =?utf-8?q?SZEDER_G=C3=A1bor?= , =?utf-8?b?xJBvw6Bu?= =?utf-8?b?IFRy4bqnbiBDw7RuZyBEYW5o?= , =?utf-8?q?Car?= =?utf-8?q?lo_Marcelo_Arenas_Bel=C3=B3n?= , Johannes Schindelin , Victoria Dye , Matheus Tavares , Lars Schneider , Eric Sunshine , Johannes Schindelin , =?utf-8?b?w4Z2YXIgQXJu?= =?utf-8?b?ZmrDtnLDsCBCamFybWFzb24=?= Subject: [PATCH v6 06/14] ci: optionally mark up output in the GitHub workflow Date: Wed, 25 May 2022 13:25:55 +0200 Message-Id: X-Mailer: git-send-email 2.36.1.1045.gf356b5617dd In-Reply-To: References: MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: git@vger.kernel.org From: Johannes Schindelin A couple of commands exist to spruce up the output in GitHub workflows: https://docs.github.com/en/actions/learn-github-actions/workflow-commands-for-github-actions In addition to the `::group::