mirror of
https://git.kernel.org/pub/scm/fs/ext2/e2fsprogs.git
synced 2024-12-03 23:14:53 +08:00
tests: report if a test is taking a long time
Print out a message if a test takes longer than 60s, with a reminder to potentially add is_slow_test to that test, so that it is easier to find which tests are taking a long time, especially if running with "make -j check" or similar. Add an exclusion for r_expand_full on MacOS since HFS+ does not support sparse devices and doesn't like large test images. Signed-off-by: Andreas Dilger <adilger@dilger.ca> Signed-off-by: Theodore Ts'o <tytso@mit.edu>
This commit is contained in:
parent
20ad2d05df
commit
c8fd5f2338
@ -23,6 +23,12 @@ cat > $CONF << ENDL
|
||||
}
|
||||
ENDL
|
||||
|
||||
if [ $(uname -s) = "Darwin" ]; then
|
||||
# creates a 786MB filesystem
|
||||
echo "$test_name: $DESCRIPTION: skipped for HFS+ (no sparse files)"
|
||||
return 0
|
||||
fi
|
||||
|
||||
echo "resize2fs test" > $OUT
|
||||
|
||||
MKE2FS_CONFIG=$CONF $MKE2FS -F -T ext4h $TMPFILE 786432 >> $OUT 2>&1
|
||||
|
@ -63,6 +63,7 @@ fi
|
||||
rm -f $test_name.ok $test_name.failed
|
||||
#echo -e -n "$test_name: $test_description:\r"
|
||||
|
||||
start=$SECONDS
|
||||
if [ -f $test_dir/script ]; then
|
||||
. $test_dir/script
|
||||
else
|
||||
@ -74,6 +75,11 @@ else
|
||||
echo "$test_name: Missing test script $default_script!"
|
||||
fi
|
||||
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: consider adding $test_dir/is_slow_test"
|
||||
fi
|
||||
|
||||
if [ "$SKIP_UNLINK" != "true" ] ; then
|
||||
rm -f $TMPFILE
|
||||
|
Loading…
Reference in New Issue
Block a user