linux-ext4.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Andreas Dilger <adilger@dilger.ca>
To: tytso@mit.edu
Cc: linux-ext4@vger.kernel.org, Andreas Dilger <adilger@dilger.ca>
Subject: [PATCH] tests: log tests that are taking a long time
Date: Tue, 10 Oct 2017 16:40:04 -0600	[thread overview]
Message-ID: <1507675204-70036-1-git-send-email-adilger@dilger.ca> (raw)

Create a .slow file for tests that take too long to run, so it is
possible to find them easily after all of the tests have run.

Signed-off-by: Andreas Dilger <adilger@dilger.ca>
---
 .gitignore        | 1 +
 tests/Makefile.in | 3 ++-
 tests/test_one.in | 5 +++--
 3 files changed, 6 insertions(+), 3 deletions(-)

diff --git a/.gitignore b/.gitignore
index baf9b1a..e002298 100644
--- a/.gitignore
+++ b/.gitignore
@@ -206,6 +206,7 @@ tests/*.ok
 tests/*.failed
 tests/*.log
 tests/*.tmp
+tests/*.slow
 tests/mke2fs.conf
 tests/test_script
 tests/test_one
diff --git a/tests/Makefile.in b/tests/Makefile.in
index 7b76354..7b9df62 100644
--- a/tests/Makefile.in
+++ b/tests/Makefile.in
@@ -93,7 +93,8 @@ testend: test_one ${TDIR}/image
 	@echo "If all is well, edit ${TDIR}/name and rename ${TDIR}."
 
 clean::
-	$(RM) -f *~ *.log *.new *.failed *.ok *.tmp test_one test_script mke2fs.conf
+	$(RM) -f *~ *.log *.new *.failed *.ok *.tmp *.slow
+	$(RM) -f test_one test_script mke2fs.conf
 
 distclean:: clean
 	$(RM) -f Makefile
diff --git a/tests/test_one.in b/tests/test_one.in
index b20e207..9bf1185 100644
--- a/tests/test_one.in
+++ b/tests/test_one.in
@@ -22,7 +22,7 @@ case "$1" in
 esac
 
 case "$1" in
-    *.failed|*.new|*.ok|*.log|*.tmp)	exit 0 ;;
+    *.failed|*.new|*.ok|*.log|*.tmp|*.slow)	exit 0 ;;
 esac
 
 test_dir=$1
@@ -77,7 +77,8 @@ else
 fi
 elapsed=$((SECONDS - start))
 if [ $elapsed -gt 60 -a ! -f $test_dir/is_slow_test ]; then
-	echo "$test_name:  *** took $elapsed seconds to finish ***"
+	echo "$test_name:  *** took $elapsed seconds to finish ***" |
+		tee $test_name.slow
 	echo "$test_name:  consider adding $test_dir/is_slow_test"
 fi
 
-- 
1.8.0

             reply	other threads:[~2017-10-10 22:44 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-10-10 22:40 Andreas Dilger [this message]
2017-10-16  2:31 ` [PATCH] tests: log tests that are taking a long time Theodore Ts'o

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1507675204-70036-1-git-send-email-adilger@dilger.ca \
    --to=adilger@dilger.ca \
    --cc=linux-ext4@vger.kernel.org \
    --cc=tytso@mit.edu \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).