summaryrefslogtreecommitdiff
path: root/tests/tarcompress.sh.in
diff options
context:
space:
mode:
authorDavid Oberhollenzer <david.oberhollenzer@sigma-star.at>2022-11-27 10:32:13 +0100
committerDavid Oberhollenzer <david.oberhollenzer@sigma-star.at>2022-11-27 10:32:13 +0100
commita487eec3e3e7c1c5552d17acd0db8cd5dcc59fc7 (patch)
tree783c4c23ec005545c1cc04925f17c980a4608d93 /tests/tarcompress.sh.in
parent62e598c500b53902e3d97b62d879e6e9c7785d00 (diff)
Continue cleanup of the test cases
- Force all tests into their proper sub directory - Temporarily remove the corpora tests. They have been used for regression tests before releases and are disabled by default, so we should not ship them either. A script should be added for that, downloading what is needed. - The "pack a directory" test is also removed. It was rather hacky and there already is a test case for the fstree_from_dir function, which isn't ideal either. Something should be added to the regression test suite. Signed-off-by: David Oberhollenzer <david.oberhollenzer@sigma-star.at>
Diffstat (limited to 'tests/tarcompress.sh.in')
-rw-r--r--tests/tarcompress.sh.in71
1 files changed, 0 insertions, 71 deletions
diff --git a/tests/tarcompress.sh.in b/tests/tarcompress.sh.in
deleted file mode 100644
index 726f4e8..0000000
--- a/tests/tarcompress.sh.in
+++ /dev/null
@@ -1,71 +0,0 @@
-#!/bin/bash
-
-set -e
-
-TAR2SQFS="@abs_top_builddir@/tar2sqfs"
-RDSQFS="@abs_top_builddir@/rdsquashfs"
-
-URL="https://mirrors.edge.kernel.org/pub/linux/kernel/v3.x/"
-DIR="/dev/shm/tarcompress/"
-
-mkdir -p "$DIR"
-curl "$URL/linux-3.11.tar.bz2" > "$DIR/linux-3.11.tar.bz2"
-curl "$URL/linux-3.11.tar.gz" > "$DIR/linux-3.11.tar.gz"
-curl "$URL/linux-3.11.tar.xz" > "$DIR/linux-3.11.tar.xz"
-
-sha256sum -c <<_EOF
-e7ae11d20aafdc5a2dfd104f198d87e5ce65fa8ada1ce18a263e89ff0148e1fa $DIR/linux-3.11.tar.bz2
-59904beb1fdae62eb1991f29926c234283c9e4009b6e437499f13d2749bed6ca $DIR/linux-3.11.tar.gz
-803ec8f0ad4b2ddedcb0332a590cd2b5e10dfc57c3b1c95bc9c46af81d51d7f9 $DIR/linux-3.11.tar.xz
-_EOF
-
-"$TAR2SQFS" "$DIR/out1.sqfs" < "$DIR/linux-3.11.tar.bz2"
-"$TAR2SQFS" "$DIR/out2.sqfs" < "$DIR/linux-3.11.tar.gz"
-"$TAR2SQFS" "$DIR/out3.sqfs" < "$DIR/linux-3.11.tar.xz"
-
-# set -e makes sure this explodes if they aren't equal
-diff "$DIR/out1.sqfs" "$DIR/out2.sqfs"
-diff "$DIR/out2.sqfs" "$DIR/out3.sqfs"
-
-rm "$DIR/out2.sqfs" "$DIR/out3.sqfs"
-rm "$DIR/linux-3.11.tar.bz2"
-rm "$DIR/linux-3.11.tar.gz"
-
-# unpack tarball and squashfs image
-tar -C "$DIR" -xf "$DIR/linux-3.11.tar.xz"
-rm "$DIR/linux-3.11.tar.xz"
-
-"$RDSQFS" -DSF -u / -p "$DIR/sqfs/" "$DIR/out1.sqfs"
-rm "$DIR/out1.sqfs"
-
-# every file that exists in the tar ball MUST exist in the squashfs image
-# and they MUST be identical
-find "$DIR/linux-3.11" -type f | sed "s#$DIR/##" | \
-while read fname; do
- set -e
- diff "$DIR/$fname" "$DIR/sqfs/$fname"
- rm "$DIR/sqfs/$fname" "$DIR/$fname"
- echo "match $DIR/$fname"
-done
-
-find "$DIR/linux-3.11" -type l | sed "s#$DIR/##" | \
-while read fname; do
- set -e
- a=$(readlink "$DIR/$fname")
- b=$(readlink "$DIR/sqfs/$fname")
- [ "x$a" = "x$b" ] || exit 1
- unlink "$DIR/sqfs/$fname"
- unlink "$DIR/$fname"
- echo "match $DIR/$fname"
-done
-
-# match directories and cleanup at the same time
-find "$DIR/linux-3.11" -type d | sed "s#$DIR/##" | sort -ur | \
-while read fname; do
- set -e
- rmdir "$DIR/$fname" "$DIR/sqfs/$fname"
-done
-
-rmdir "$DIR/sqfs"
-rmdir "$DIR"
-echo "DONE!"