[PATCH v6 03/14] CI: stop setting FAILED_TEST_ARTIFACTS N times

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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 <avarab@xxxxxxxxx>
---
 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
-- 
2.36.1.1045.gf356b5617dd




[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux