[openssh-commits] [openssh] 03/05: upstream: Add TEST_SSH_ELAPSED_TIMES environment variable to print the

git+noreply at mindrot.org git+noreply at mindrot.org
Wed Apr 7 17:03:05 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 13e5fa2acffd26e754c6ee1d070d0afd035d4cb7
Author: dtucker at openbsd.org <dtucker at openbsd.org>
Date:   Tue Apr 6 23:57:56 2021 +0000

    upstream: Add TEST_SSH_ELAPSED_TIMES environment variable to print the
    
    elapsed time in seconds of each test.  This depends on "date +%s" which is
    not specified by POSIX but is commonly implemented.
    
    OpenBSD-Regress-ID: ec3c8c19ff49b2192116a0a646ee7c9b944e8a9c
---
 regress/test-exec.sh | 11 ++++++++++-
 1 file changed, 10 insertions(+), 1 deletion(-)

diff --git a/regress/test-exec.sh b/regress/test-exec.sh
index f6d7f38a..da1963aa 100644
--- a/regress/test-exec.sh
+++ b/regress/test-exec.sh
@@ -1,4 +1,4 @@
-#	$OpenBSD: test-exec.sh,v 1.78 2021/03/13 01:52:16 dtucker Exp $
+#	$OpenBSD: test-exec.sh,v 1.79 2021/04/06 23:57:56 dtucker Exp $
 #	Placed in the Public Domain.
 
 #SUDO=sudo
@@ -41,6 +41,10 @@ if test -z "$LOGNAME"; then
 	export LOGNAME
 fi
 
+if [ ! -x "$TEST_SSH_ELAPSED_TIMES" ]; then
+	STARTTIME=`date '+%s'`
+fi
+
 if [ ! -z "$TEST_SSH_PORT" ]; then
 	PORT="$TEST_SSH_PORT"
 else
@@ -385,6 +389,11 @@ cleanup ()
 		rm -rf "$SSH_REGRESS_TMP"
 	fi
 	stop_sshd
+	if [ ! -z "$TEST_SSH_ELAPSED_TIMES" ]; then
+		now=`date '+%s'`
+		elapsed=$(($now - $STARTTIME))
+		echo elapsed $elapsed `basename $SCRIPT .sh`
+	fi
 }
 
 start_debug_log ()

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


More information about the openssh-commits mailing list