commit:     5032feb8d914d7c277154aa74d7e04414999e428
Author:     Mike Gilbert <floppym <AT> gentoo <DOT> org>
AuthorDate: Sat Apr 23 15:14:25 2022 +0000
Commit:     Mike Gilbert <floppym <AT> gentoo <DOT> org>
CommitDate: Sat Apr 23 15:14:25 2022 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=5032feb8

app-shells/bash-completion: addpredict ~ for tests

Closes: https://bugs.gentoo.org/839840
Signed-off-by: Mike Gilbert <floppym <AT> gentoo.org>

 app-shells/bash-completion/bash-completion-2.11.ebuild | 7 +++++--
 app-shells/bash-completion/bash-completion-9999.ebuild | 7 +++++--
 2 files changed, 10 insertions(+), 4 deletions(-)

diff --git a/app-shells/bash-completion/bash-completion-2.11.ebuild 
b/app-shells/bash-completion/bash-completion-2.11.ebuild
index 36c924cea3a5..4c55e7352304 100644
--- a/app-shells/bash-completion/bash-completion-2.11.ebuild
+++ b/app-shells/bash-completion/bash-completion-2.11.ebuild
@@ -1,4 +1,4 @@
-# Copyright 1999-2021 Gentoo Authors
+# Copyright 1999-2022 Gentoo Authors
 # Distributed under the terms of the GNU General Public License v2
 
 EAPI=7
@@ -89,7 +89,10 @@ src_prepare() {
 
 src_test() {
        # portage's HOME override breaks tests
-       emake check HOME="$(egethome "${UID}")" PYTESTFLAGS="-vv" NETWORK=none
+       local myhome=$(unset HOME; echo ~)
+       local -x SANDBOX_PREDICT=${SANDBOX_PREDICT}
+       addpredict "${myhome}"
+       emake check HOME="${myhome}" PYTESTFLAGS="-vv" NETWORK=none
 }
 
 src_install() {

diff --git a/app-shells/bash-completion/bash-completion-9999.ebuild 
b/app-shells/bash-completion/bash-completion-9999.ebuild
index 70ce84b4ed82..2f4caf5b89e1 100644
--- a/app-shells/bash-completion/bash-completion-9999.ebuild
+++ b/app-shells/bash-completion/bash-completion-9999.ebuild
@@ -1,4 +1,4 @@
-# Copyright 1999-2021 Gentoo Authors
+# Copyright 1999-2022 Gentoo Authors
 # Distributed under the terms of the GNU General Public License v2
 
 EAPI=7
@@ -99,7 +99,10 @@ src_prepare() {
 
 src_test() {
        # portage's HOME override breaks tests
-       emake check HOME="$(egethome "${UID}")" PYTESTFLAGS="-vv" NETWORK=none
+       local myhome=$(unset HOME; echo ~)
+       local -x SANDBOX_PREDICT=${SANDBOX_PREDICT}
+       addpredict "${myhome}"
+       emake check HOME="${myhome}" PYTESTFLAGS="-vv" NETWORK=none
 }
 
 src_install() {

Reply via email to