From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id CFE011582E8 for ; Sat, 18 May 2024 15:32:25 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 21B8BE2A52; Sat, 18 May 2024 15:32:25 +0000 (UTC) Received: from smtp.gentoo.org (woodpecker.gentoo.org [140.211.166.183]) (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 pigeon.gentoo.org (Postfix) with ESMTPS id 047A3E2A52 for ; Sat, 18 May 2024 15:32:25 +0000 (UTC) Received: from oystercatcher.gentoo.org (oystercatcher.gentoo.org [148.251.78.52]) (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 smtp.gentoo.org (Postfix) with ESMTPS id 043C133BE9F for ; Sat, 18 May 2024 15:32:24 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 5C3D61ACD for ; Sat, 18 May 2024 15:32:22 +0000 (UTC) From: "Sam James" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Sam James" Message-ID: <1716046336.66c893e7e073006d9b437ed1b5d24644d4a384af.sam@gentoo> Subject: [gentoo-commits] proj/gentoo-functions:master commit in: / X-VCS-Repository: proj/gentoo-functions X-VCS-Files: test-functions X-VCS-Directories: / X-VCS-Committer: sam X-VCS-Committer-Name: Sam James X-VCS-Revision: 66c893e7e073006d9b437ed1b5d24644d4a384af X-VCS-Branch: master Date: Sat, 18 May 2024 15:32:22 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply X-Archives-Salt: 2f00bbd7-644a-488d-bda5-e942bb239f97 X-Archives-Hash: 0f8c431a5e42c7d32f105189e01000e9 commit: 66c893e7e073006d9b437ed1b5d24644d4a384af Author: Kerin Millar plushkava net> AuthorDate: Sat May 18 15:16:54 2024 +0000 Commit: Sam James gentoo org> CommitDate: Sat May 18 15:32:16 2024 +0000 URL: https://gitweb.gentoo.org/proj/gentoo-functions.git/commit/?id=66c893e7 test-functions: Fix spurious edo() test failures Portage amends PATH in such a way that "ebuild-helper" utilities can be found. One of those is a die utility. What purpose that can serve is presently unclear to me. In any case, it was impeding the declaration of the die() function provided by gentoo-functions. Address it by setting PATH to a sane, generic value prior to sourcing the functions for testing. Signed-off-by: Kerin Millar plushkava.net> Signed-off-by: Sam James gentoo.org> test-functions | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/test-functions b/test-functions index 0dea9f3..0c0bb45 100755 --- a/test-functions +++ b/test-functions @@ -451,17 +451,19 @@ printf 'TAP version 13\n' unset -v dir +# PATH is redefined to prevent ebuild-helpers such as die from interfering. +export PATH=/sbin:/bin:/usr/sbin:/usr/bin +export TEST_GENFUNCS=1 +export TZ=UTC +testnum=0 +rc=0 + if ! . ./functions.sh; then bailout "Couldn't source ./functions.sh" fi assign_tmpdir -export TEST_GENFUNCS=1 -export TZ=UTC -testnum=0 -rc=0 - test_chdir || rc=1 test_chdir_noop || rc=1 ( test_ebegin ) || rc=1; testnum=$((testnum + 1))