Update tests to use xz default

This commit is contained in:
Eric Renfro 2024-08-04 02:13:16 -04:00
parent 179dd65705
commit 4b3165a05b
Signed by: psi-jack
SSH key fingerprint: SHA256:1TKB8Z257L8EHK8GWNxKgMhD8a+FAR+f+j3nnlcuNVM
9 changed files with 26 additions and 26 deletions

View file

@ -33,7 +33,7 @@ setup() {
}
teardown() {
rm -rf test test.tar.bz2
rm -rf test test.tar.xz
}
@test "/usr/bin/ping is included" {

View file

@ -10,7 +10,7 @@ setup() {
}
teardown() {
rm -rf test test.tar.bz2
rm -rf test test.tar.xz
}
@test "/usr/bin/ping is included" {

View file

@ -16,7 +16,7 @@ setup() {
}
teardown() {
rm -rf test test.tar.bz2 test.ksrc.tar.bz2 test.kmod.tar.bz2
rm -rf test test.tar.xz test.ksrc.tar.xz test.kmod.tar.xz
}
@test "/usr/bin/ping is included" {
@ -60,31 +60,31 @@ teardown() {
}
@test "/usr/src/linux-$TEST_UNAME/.config is included in ksrc" {
assert_tar_includes test/usr/src/linux-"$TEST_UNAME"/.config test.ksrc.tar.bz2
assert_tar_includes test/usr/src/linux-"$TEST_UNAME"/.config test.ksrc.tar.xz
}
@test "/usr/src/linux-$TEST_UNAME/vmlinux is included in ksrc" {
assert_tar_includes test/usr/src/linux-"$TEST_UNAME"/vmlinux test.ksrc.tar.bz2
assert_tar_includes test/usr/src/linux-"$TEST_UNAME"/vmlinux test.ksrc.tar.xz
}
@test "/usr/src/linux-different-uname/ is excluded in ksrc" {
assert_tar_excludes test/usr/src/linux-different-uname/ test.ksrc.tar.bz2
assert_tar_excludes test/usr/src/linux-different-uname/ test.ksrc.tar.xz
}
@test "/lib/modules/$TEST_UNAME/mod.ko is included in kmod" {
assert_tar_includes test/lib/modules/"$TEST_UNAME"/mod.ko test.kmod.tar.bz2
assert_tar_includes test/lib/modules/"$TEST_UNAME"/mod.ko test.kmod.tar.xz
}
@test "/lib64/modules/$TEST_UNAME/mod.ko is included in kmod" {
assert_tar_includes test/lib64/modules/"$TEST_UNAME"/mod.ko test.kmod.tar.bz2
assert_tar_includes test/lib64/modules/"$TEST_UNAME"/mod.ko test.kmod.tar.xz
}
@test "/lib/modules/different-uname/ is excluded in kmod" {
assert_tar_excludes test/lib/modules/different-uname/ test.kmod.tar.bz2
assert_tar_excludes test/lib/modules/different-uname/ test.kmod.tar.xz
}
@test "/lib64/modules/different-uname/ is excluded in kmod" {
assert_tar_excludes test/lib64/modules/different-uname/ test.kmod.tar.bz2
assert_tar_excludes test/lib64/modules/different-uname/ test.kmod.tar.xz
}
# vim: ft=bash

View file

@ -9,7 +9,7 @@ setup() {
}
teardown() {
rm -rf test test.tar.bz2
rm -rf test test.tar.xz
}
@test "/boot/kernel is excluded" {

View file

@ -10,7 +10,7 @@ setup() {
}
teardown() {
rm -rf test test.tar.bz2
rm -rf test test.tar.xz
}
@test "/var/lib/connman/file is excluded" {

View file

@ -11,7 +11,7 @@ setup() {
}
teardown() {
rm -rf test test.tar.bz2
rm -rf test test.tar.xz
}
@test "/var/db/repos/gentoo/ is included" {

View file

@ -21,40 +21,40 @@ setup() {
}
teardown() {
rm -rf test test.tar.bz2 test0.tar.bz2
rm -rf test test.tar.xz test0.tar.xz
}
@test "-e '/lost+found'" {
assert_tar_excludes test/usr/bin/lost+found test0.tar.bz2
assert_tar_excludes test/usr/bin/lost+found test0.tar.xz
assert_tar_excludes test/usr/bin/lost+found
assert_tar_excludes test/lost+found test0.tar.bz2
assert_tar_excludes test/lost+found test0.tar.xz
assert_tar_excludes test/lost+found
}
@test "-e 'user/.*'" {
assert_tar_excludes test/home/user/.dotfile test0.tar.bz2
assert_tar_excludes test/home/user/.dotfile test0.tar.xz
assert_tar_excludes test/home/user/.dotfile
assert_tar_includes test/home/user/
}
@test "-e 'test/home/user/chroot/var/tmp/file'" {
assert_tar_excludes test/home/user/chroot/var/tmp/file test0.tar.bz2
assert_tar_excludes test/home/user/chroot/var/tmp/file test0.tar.xz
assert_tar_excludes test/home/user/chroot/var/tmp/file
}
@test "-e 'ccache/*'" {
assert_tar_excludes test/home/user/ccache/file test0.tar.bz2
assert_tar_excludes test/home/user/ccache/file test0.tar.xz
assert_tar_excludes test/home/user/ccache/file
assert_tar_excludes test/home/user/ccache/
assert_tar_includes test/root/ccache/file test0.tar.bz2
assert_tar_includes test/root/ccache/file test0.tar.xz
assert_tar_excludes test/root/ccache/file
assert_tar_includes test/root/ccache/
}
@test "-e 'secrets'" {
assert_tar_includes test/etc/secrets/key test0.tar.bz2
assert_tar_includes test/etc/secrets/key test0.tar.xz
assert_tar_excludes test/etc/secrets/key
assert_tar_excludes test/etc/secrets/
}

View file

@ -22,7 +22,7 @@ setup() {
}
teardown() {
rm -rf test test.tar.bz2
rm -rf test test.tar.xz
}
@test "-i 'test/home/user/.keep and -e 'user/.*'" {

View file

@ -32,18 +32,18 @@ f() {
assert_tar_includes() {
test -f "${1}" || test -d "${1}"
tar --list -f "${2-test.tar.bz2}" | grep -q "^${1}$"
tar --list -f "${2-test.tar.xz}" | grep -q "^${1}$"
}
assert_tar_includes_partial() {
tar --list -f "${2-test.tar.bz2}" | grep -q "${1}"
tar --list -f "${2-test.tar.xz}" | grep -q "${1}"
}
assert_tar_excludes() {
test -f "${1}" || test -d "${1}"
! tar --list -f "${2-test.tar.bz2}" | grep -q "^${1}$"
! tar --list -f "${2-test.tar.xz}" | grep -q "^${1}$"
}
assert_tar_excludes_partial() {
! tar --list -f "${2-test.tar.bz2}" | grep -q "${1}"
! tar --list -f "${2-test.tar.xz}" | grep -q "${1}"
}