[openssh-commits] [openssh] 02/02: Improve github test driver script.

git+noreply at mindrot.org git+noreply at mindrot.org
Mon Aug 16 21:49:55 AEST 2021


This is an automated email from the git hooks/post-receive script.

dtucker pushed a commit to branch master
in repository openssh.

commit 6a24567a29bd7b4ab64e1afad859ea845cbc6b8c
Author: Darren Tucker <dtucker at dtucker.net>
Date:   Mon Aug 16 14:13:02 2021 +1000

    Improve github test driver script.
    
     - use a trap to always output any failed regress logs (since the script
       sets -e, the existing log output is never invoked).
     - pass LTESTS and SKIP_LTESTS when re-running with sshd options (eg.
       UsePAM).
---
 .github/run_test.sh | 33 +++++++++++++++++----------------
 1 file changed, 17 insertions(+), 16 deletions(-)

diff --git a/.github/run_test.sh b/.github/run_test.sh
index 7ef17697..adf2568a 100755
--- a/.github/run_test.sh
+++ b/.github/run_test.sh
@@ -6,28 +6,29 @@
 
 set -ex
 
+output_failed_logs() {
+    for i in regress/failed*; do
+        if [ -f "$i" ]; then
+            echo -------------------------------------------------------------------------
+            echo LOGFILE $i
+            cat $i
+            echo -------------------------------------------------------------------------
+        fi
+    done
+}
+trap output_failed_logs 0
+
 if [ -z "${LTESTS}" ]; then
     make ${TEST_TARGET} SKIP_LTESTS="${SKIP_LTESTS}"
-    result=$?
 else
     make ${TEST_TARGET} SKIP_LTESTS="${SKIP_LTESTS}" LTESTS="${LTESTS}"
-    result=$?
 fi
 
 if [ ! -z "${SSHD_CONFOPTS}" ]; then
-    echo "rerunning tests with TEST_SSH_SSHD_CONFOPTS='${SSHD_CONFOPTS}'"
-    make t-exec TEST_SSH_SSHD_CONFOPTS="${SSHD_CONFOPTS}"
-    result2=$?
-    if [ "${result2}" -ne 0 ]; then
-        result="${result2}"
+    echo "rerunning t-exec with TEST_SSH_SSHD_CONFOPTS='${SSHD_CONFOPTS}'"
+    if [ -z "${LTESTS}" ]; then
+        make t-exec SKIP_LTESTS="${SKIP_LTESTS}" TEST_SSH_SSHD_CONFOPTS="${SSHD_CONFOPTS}"
+    else
+        make t-exec SKIP_LTESTS="${SKIP_LTESTS}" LTESTS="${LTESTS}" TEST_SSH_SSHD_CONFOPTS="${SSHD_CONFOPTS}"
     fi
 fi
-
-if [ "$result" -ne "0" ]; then
-    for i in regress/failed*; do
-        echo -------------------------------------------------------------------------
-        echo LOGFILE $i
-        cat $i
-        echo -------------------------------------------------------------------------
-    done
-fi

-- 
To stop receiving notification emails like this one, please contact
djm at mindrot.org.


More information about the openssh-commits mailing list