summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorSergey Poznyakoff <gray@gnu.org.ua>2018-03-13 21:55:37 +0200
committerSergey Poznyakoff <gray@gnu.org.ua>2018-03-13 21:58:37 +0200
commitc13401c0a74e62e50a899c4ceed6af10a8b7377d (patch)
tree3f752cfd3bca7b7ed8d78501427368ef5b9cac0e /tests
parent847a36f064efed676ae007b1def3c0db364cdddb (diff)
downloadtar-c13401c0a74e62e50a899c4ceed6af10a8b7377d.tar.gz
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.
Diffstat (limited to 'tests')
-rw-r--r--tests/sparse03.at3
-rw-r--r--tests/sparse05.at3
-rw-r--r--tests/star/pax-big-10g.at3
-rw-r--r--tests/star/ustar-big-2g.at3
-rw-r--r--tests/star/ustar-big-8g.at3
-rw-r--r--tests/testsuite.at2
6 files changed, 12 insertions, 5 deletions
diff --git a/tests/sparse03.at b/tests/sparse03.at
index 768ca2b8..8495036e 100644
--- a/tests/sparse03.at
+++ b/tests/sparse03.at
@@ -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
diff --git a/tests/sparse05.at b/tests/sparse05.at
index ed5db456..93fd78fc 100644
--- a/tests/sparse05.at
+++ b/tests/sparse05.at
@@ -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
diff --git a/tests/star/pax-big-10g.at b/tests/star/pax-big-10g.at
index 4de14486..25e44d5f 100644
--- a/tests/star/pax-big-10g.at
+++ b/tests/star/pax-big-10g.at
@@ -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])
diff --git a/tests/star/ustar-big-2g.at b/tests/star/ustar-big-2g.at
index 1d62bfa3..871ea6a1 100644
--- a/tests/star/ustar-big-2g.at
+++ b/tests/star/ustar-big-2g.at
@@ -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])
diff --git a/tests/star/ustar-big-8g.at b/tests/star/ustar-big-8g.at
index 8caf8161..8e960b61 100644
--- a/tests/star/ustar-big-8g.at
+++ b/tests/star/ustar-big-8g.at
@@ -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])
diff --git a/tests/testsuite.at b/tests/testsuite.at
index 2a837576..0f2600fb 100644
--- a/tests/testsuite.at
+++ b/tests/testsuite.at
@@ -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