Provide a way to skip tests that create very large files

Define environment variable TARTEST_SKIP_LARGE_FILES=1 in order
to skip tests that require lots of disk space.

* tests/testsuite.at (AT_SKIP_LARGE_FILES): New macro.
* tests/sparse03.at: Mark test with AT_SKIP_LARGE_FILES.
* tests/sparse05.at: Likewise.
* tests/star/pax-big-10g.at: Likewise.
* tests/star/ustar-big-2g.at: Likewise.
* tests/star/ustar-big-8g.at: Likewise.
This commit is contained in:
Sergey Poznyakoff
2018-03-13 21:55:37 +02:00
parent 847a36f064
commit c13401c0a7
6 changed files with 12 additions and 5 deletions

View File

@@ -20,7 +20,7 @@
# along with this program. If not, see <http://www.gnu.org/licenses/>.
AT_SETUP([storing sparse files > 8G])
AT_KEYWORDS([sparse sparse03])
AT_KEYWORDS([sparse sparse03 largefile])
# Tar 1.15.1 incorrectly computed sparse member size if the extended
# PAX header contained size keyword.
@@ -28,6 +28,7 @@ AT_KEYWORDS([sparse sparse03])
# http://lists.gnu.org/archive/html/bug-tar/2005-06/msg00040.html
AT_TAR_CHECK([
AT_SKIP_LARGE_FILES
genfile --length 1000 --file begin
genfile --length 1000 --file end
genfile --sparse --file sparsefile --block-size 512 8G A || AT_SKIP_TEST

View File

@@ -19,7 +19,7 @@
# along with this program. If not, see <http://www.gnu.org/licenses/>.
AT_SETUP([listing sparse files bigger than 2^33 B])
AT_KEYWORDS([sparse sparse05])
AT_KEYWORDS([sparse sparse05 largefile])
# Description: If an archive in POSIX.1-2001 archive contained a sparse file
# member whose real size (excluding zero blocks) is bigger than 2^33 bytes,
@@ -29,6 +29,7 @@ AT_KEYWORDS([sparse sparse05])
# http://lists.gnu.org/archive/html/bug-tar/2013-01/msg00001.html
AT_TAR_CHECK([
AT_SKIP_LARGE_FILES
AT_DATA([mapfile],
[0 =2560
m4_for([i], 1, 999, 1, [10M =2560

View File

@@ -20,11 +20,12 @@
# along with this program. If not, see <http://www.gnu.org/licenses/>.
AT_SETUP([pax-big-10g])
AT_KEYWORDS([star pax-big-10g])
AT_KEYWORDS([star pax-big-10g largefile])
unset TAR_OPTIONS
AT_CHECK([
AT_SKIP_LARGE_FILES
AT_GZIP_PREREQ([bzip2])
AT_STAR_PREREQ([pax-big-10g.tar.bz2],[ca15c23acc8d8bb1f27e60113a5f8bff])

View File

@@ -20,11 +20,12 @@
# along with this program. If not, see <http://www.gnu.org/licenses/>.
AT_SETUP([ustar-big-2g])
AT_KEYWORDS([star ustar-big-2g])
AT_KEYWORDS([star ustar-big-2g largefile])
unset TAR_OPTIONS
AT_CHECK([
AT_SKIP_LARGE_FILES
AT_GZIP_PREREQ([bzip2])
AT_STAR_PREREQ([ustar-big-2g.tar.bz2],[b63979733629c8fcdf40b60065422767])

View File

@@ -20,11 +20,12 @@
# along with this program. If not, see <http://www.gnu.org/licenses/>.
AT_SETUP([ustar-big-8g])
AT_KEYWORDS([star ustar-big-8g])
AT_KEYWORDS([star ustar-big-8g largefile])
unset TAR_OPTIONS
AT_CHECK([
AT_SKIP_LARGE_FILES
AT_GZIP_PREREQ([bzip2])
AT_STAR_PREREQ([ustar-big-8g.tar.bz2],[60ff503fa4b8288bef7ada89e9c91b0f])

View File

@@ -60,6 +60,8 @@ done
m4_define([AT_SKIP_TEST],[exit 77])
m4_define([AT_SKIP_LARGE_FILES],[test "${TARTEST_SKIP_LARGE_FILES:-0}" != 0 && AT_SKIP_TEST])
dnl AT_TARBALL_PREREQ(tarball, md5sum) - Check if test tarball exists
dnl in $TEST_DATA_DIR. If it does not, try to download it from
dnl $TEST_DATA_URL. If download fails, or it the file's md5 sum does not