commit:     74f095b4da46d896961f219265f62c1dafdf4591
Author:     Mike Gilbert <floppym <AT> gentoo <DOT> org>
AuthorDate: Fri Dec 24 17:31:47 2021 +0000
Commit:     Mike Gilbert <floppym <AT> gentoo <DOT> org>
CommitDate: Fri Dec 24 17:32:04 2021 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=74f095b4

net-misc/openssh: simplify src_test

Signed-off-by: Mike Gilbert <floppym <AT> gentoo.org>

 net-misc/openssh/openssh-8.8_p1-r4.ebuild | 29 +++++++----------------------
 1 file changed, 7 insertions(+), 22 deletions(-)

diff --git a/net-misc/openssh/openssh-8.8_p1-r4.ebuild 
b/net-misc/openssh/openssh-8.8_p1-r4.ebuild
index 229620f1605f..738766f60231 100644
--- a/net-misc/openssh/openssh-8.8_p1-r4.ebuild
+++ b/net-misc/openssh/openssh-8.8_p1-r4.ebuild
@@ -318,34 +318,19 @@ src_configure() {
 }
 
 src_test() {
-       local t skipped=() failed=() passed=()
-       local tests=( interop-tests compat-tests )
-
+       local tests=( compat-tests )
        local shell=$(egetshell "${UID}")
        if [[ ${shell} == */nologin ]] || [[ ${shell} == */false ]] ; then
-               elog "Running the full OpenSSH testsuite requires a usable 
shell for the 'portage'"
-               elog "user, so we will run a subset only."
-               skipped+=( tests )
+               ewarn "Running the full OpenSSH testsuite requires a usable 
shell for the 'portage'"
+               ewarn "user, so we will run a subset only."
+               tests+=( interop-tests )
        else
                tests+=( tests )
        fi
 
-       # It will also attempt to write to the homedir .ssh.
-       local sshhome=${T}/homedir
-       mkdir -p "${sshhome}"/.ssh
-       for t in "${tests[@]}" ; do
-               # Some tests read from stdin ...
-               HOMEDIR="${sshhome}" HOME="${sshhome}" TMPDIR="${T}" \
-                       SUDO="" SSH_SK_PROVIDER="" \
-                       TEST_SSH_UNSAFE_PERMISSIONS=1 \
-                       emake -k -j1 ${t} </dev/null \
-                               && passed+=( "${t}" ) \
-                               || failed+=( "${t}" )
-       done
-
-       einfo "Passed tests: ${passed[*]}"
-       [[ ${#skipped[@]} -gt 0 ]] && ewarn "Skipped tests: ${skipped[*]}"
-       [[ ${#failed[@]}  -gt 0 ]] && die "Some tests failed: ${failed[*]}"
+       local -x SUDO= SSH_SK_PROVIDER= TEST_SSH_UNSAFE_PERMISSIONS=1
+       mkdir -p "${HOME}"/.ssh || die
+       emake -j1 "${tests[@]}" </dev/null
 }
 
 # Gentoo tweaks to default config files.

Reply via email to