From cea67a94b2584cbcc34b027199b3dd7b6cd74247 Mon Sep 17 00:00:00 2001
From: Wolfram Schneider <wosch@FreeBSD.org>
Date: Sat, 7 Oct 2017 09:06:45 +0000
Subject: [PATCH] log time for each test

---
 share/tools/webupdate-regression | 18 +++++++++++++++++-
 1 file changed, 17 insertions(+), 1 deletion(-)

diff --git a/share/tools/webupdate-regression b/share/tools/webupdate-regression
index 590702bb5a..9d73869cda 100755
--- a/share/tools/webupdate-regression
+++ b/share/tools/webupdate-regression
@@ -48,10 +48,19 @@ FORMATS=$WEBUPDATE_FORMATS
 export NO_OBJ
 export FORMATS
 
+buildstart=""
 
 log () {
   file=$1
-  echo " ...done"
+  buildstop="$(date +%s)"
+  build_sec=$(($buildstop - $buildstart))
+
+  echo " ... done in $build_sec seconds"
+}
+
+# global build start
+buildstart () {
+  buildstart="$(date +%s)"
 }
 
 checkout ()
@@ -88,6 +97,7 @@ checkout ()
 build_doc ()
 {
   logfile=$1
+  buildstart
   echo -n "build doc (4-40min) $(pwd)/$logfile"
   time make $make_opt p-all >> $logfile 2>&1; log $logfile
 }
@@ -96,6 +106,7 @@ build_doc ()
 build_htdocs_web ()
 {
   logfile=$1
+  buildstart
   (
   cd en_US.ISO8859-1/htdocs
   echo -n "build htdocs web (1min) $(pwd)/$logfile"
@@ -110,6 +121,7 @@ build_htdocs_web ()
 build_htdocs ()
 {
   logfile=$1
+  buildstart
   (
   cd en_US.ISO8859-1/htdocs
   echo -n "build htdocs (1-3min) $(pwd)/$logfile"
@@ -121,6 +133,7 @@ build_htdocs ()
 install_htdocs ()
 {
   logfile=$1
+  buildstart
   (
   cd en_US.ISO8859-1/htdocs
   echo -n "install htdocs web (<10 sec) $(pwd)/$logfile"
@@ -133,6 +146,7 @@ install_htdocs ()
 install_doc ()
 {
   logfile=$1
+  buildstart
   (
   echo "no parallel install"
   make_opt=
@@ -148,6 +162,7 @@ install_doc ()
 clean_doc ()
 {
   logfile=$1
+  buildstart
   echo -n "clean doc (<5 sec) $(pwd)/$logfile"
   time make $make_opt p-clean >> $logfile 2>&1; log $logfile 
 }
@@ -157,6 +172,7 @@ clean_doc ()
 clean_htdocs ()
 {
   logfile=$1
+  buildstart
   (
   cd en_US.ISO8859-1/htdocs
   echo -n "clean htdocs web + doc (<20 sec) $(pwd)/$logfile"