]> git.ipfire.org Git - thirdparty/tar.git/commitdiff
Provide a way to skip tests that create very large files
authorSergey Poznyakoff <gray@gnu.org.ua>
Tue, 13 Mar 2018 19:55:37 +0000 (21:55 +0200)
committerSergey Poznyakoff <gray@gnu.org.ua>
Tue, 13 Mar 2018 19:58:37 +0000 (21:58 +0200)
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.

tests/sparse03.at
tests/sparse05.at
tests/star/pax-big-10g.at
tests/star/ustar-big-2g.at
tests/star/ustar-big-8g.at
tests/testsuite.at

index 768ca2b8ede0f6833a727eef596eacff9025259b..8495036ebd049dc1d3c46a5f239770cac910e097 100644 (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
index ed5db456f19d1f7de8cbeec3c7b1dfd9f75e3a47..93fd78fcbbe6426c415255663d9c72d3cd95850f 100644 (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
index 4de14486167ed153e89a05664fba62f769bc7d50..25e44d5f51d6318dd65170654a3d1e8ccb0ae46c 100644 (file)
 # 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])
 
index 1d62bfa3b473d4f845c14f3961edd64e209c9695..871ea6a1e0568d184590b1e06877d0353bd51383 100644 (file)
 # 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])
 
index 8caf8161b213fcb2974e06982154bcead16b347a..8e960b61edcfdf345d3e5dca600e34d0d9df949e 100644 (file)
 # 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])
 
index 2a83757667c7e39a562d3a9f44c8a7e4585dd17f..0f2600fb7ad863fcc60fd45b0fe733d509f6621a 100644 (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