From: Andreas Dilger Date: Mon, 16 Oct 2017 02:28:39 +0000 (-0400) Subject: tests: log tests that are taking a long time X-Git-Tag: v1.44.0-rc1~42 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=eec6f838ab03789659a05ac74aa0ba1b68de3be6;p=thirdparty%2Fe2fsprogs.git tests: log tests that are taking a long time 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 Signed-off-by: Theodore Ts'o --- diff --git a/.gitignore b/.gitignore index 8a63e9f13..d3bcefc6d 100644 --- a/.gitignore +++ b/.gitignore @@ -218,6 +218,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 7b7635485..7b9df62a8 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 6ec56f555..c1f18dc8f 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