summaryrefslogtreecommitdiffstats
path: root/tests/ts/partx
diff options
context:
space:
mode:
authorRuediger Meier2015-12-07 17:48:56 +0100
committerRuediger Meier2015-12-09 08:40:44 +0100
commit84918ad0fcc03d065dbe238459cc31b26225420f (patch)
tree70564200a52862aef2f23764ef9ea61882a90505 /tests/ts/partx
parenttests: add some line tests (diff)
downloadkernel-qcow2-util-linux-84918ad0fcc03d065dbe238459cc31b26225420f.tar.gz
kernel-qcow2-util-linux-84918ad0fcc03d065dbe238459cc31b26225420f.tar.xz
kernel-qcow2-util-linux-84918ad0fcc03d065dbe238459cc31b26225420f.zip
tests: use xz instead of bzip2 for blkid images
xz decompression creates sparse files if possible. This saves about 1G disk space in build directory and a lot I/O and time. BTW regarding compatibility ... CentOS 7 is the first system I've met which does not install bzip2 but xz only by default. Signed-off-by: Ruediger Meier <ruediger.meier@ga-group.nl>
Diffstat (limited to 'tests/ts/partx')
-rwxr-xr-xtests/ts/partx/partx7
1 files changed, 4 insertions, 3 deletions
diff --git a/tests/ts/partx/partx b/tests/ts/partx/partx
index ed6d0e184..91bab4f18 100755
--- a/tests/ts/partx/partx
+++ b/tests/ts/partx/partx
@@ -22,6 +22,7 @@ TS_IMGDIR="$TS_TOPDIR/ts/blkid/images-pt"
PARTS=3
. $TS_TOPDIR/functions.sh
+ts_check_prog "xz"
ts_init "$*"
@@ -32,13 +33,13 @@ ts_check_test_command "$TS_CMD_DELPART"
ts_skip_nonroot
mkdir -p $TS_OUTDIR/images-pt
-for img in $(ls $TS_IMGDIR/*.img.bz2 | sort); do
- name=$(basename $img .img.bz2)
+for img in $(ls $TS_IMGDIR/*.img.xz | sort); do
+ name=$(basename $img .img.xz)
outimg=$TS_OUTDIR/images-pt/${name}.img
ts_init_subtest $name
- bunzip2 < $img > $outimg
+ xz -dc $img > $outimg
$TS_CMD_PARTX $outimg &> $TS_OUTPUT
ts_finalize_subtest