]> git.ipfire.org Git - thirdparty/e2fsprogs.git/commitdiff
tests: log tests that are taking a long time
authorAndreas Dilger <adilger@dilger.ca>
Mon, 16 Oct 2017 02:28:39 +0000 (22:28 -0400)
committerTheodore Ts'o <tytso@mit.edu>
Mon, 16 Oct 2017 02:28:39 +0000 (22:28 -0400)
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>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
.gitignore
tests/Makefile.in
tests/test_one.in

index 8a63e9f130e52093d3b49631fe3c41f9e8b4470f..d3bcefc6d6e0b4b10961ea21671ef25dab03c5b6 100644 (file)
@@ -218,6 +218,7 @@ tests/*.ok
 tests/*.failed
 tests/*.log
 tests/*.tmp
+tests/*.slow
 tests/mke2fs.conf
 tests/test_script
 tests/test_one
index 7b76354858d90a8c6ba2486ba532411203a22201..7b9df62a80082357ab58ecaf230123acea73834a 100644 (file)
@@ -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
index 6ec56f55505ef66d049f2ae1e00f61118ab48b26..c1f18dc8f1fa487c145b8be9ca069a7fe1a1daf5 100644 (file)
@@ -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