From 7855e6d2be639c60fa9f609942f9af89c576826a Mon Sep 17 00:00:00 2001 From: Richard Maw Date: Fri, 26 Oct 2012 16:27:00 +0000 Subject: Add and use sparse-gunzip in loopback-rootfs This reduces the space required from the full size of the compressed disk image, which meant that tests could not be run on systems where TMPDIR is a smallish tmpfs. --- tests.as-root/lib | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'tests.as-root') diff --git a/tests.as-root/lib b/tests.as-root/lib index 6818abde..2492bb53 100644 --- a/tests.as-root/lib +++ b/tests.as-root/lib @@ -21,8 +21,8 @@ loopback_rootfs() { # Find offset partition offset in a rootfs and mount it ROOTFS="$1" - mv "$ROOTFS" "$ROOTFS-unzipped.gz" - gunzip "$ROOTFS-unzipped.gz" + PYTHONPATH="$SRCDIR" "$SRCDIR/scripts/sparse-gunzip" \ + <"$ROOTFS" >"$ROOTFS-unzipped" OFFSET=$(sfdisk -d "$ROOTFS-unzipped" | \ grep -m 1 -o 'start=\s\+\([0-9]\+\)' | awk '{ print $2 }') -- cgit v1.2.1