mirror of
https://github.com/erenfro/gen2stage4.git
synced 2024-11-13 02:38:57 -05:00
Update tests to use xz default
This commit is contained in:
parent
179dd65705
commit
4b3165a05b
9 changed files with 26 additions and 26 deletions
|
@ -33,7 +33,7 @@ setup() {
|
|||
}
|
||||
|
||||
teardown() {
|
||||
rm -rf test test.tar.bz2
|
||||
rm -rf test test.tar.xz
|
||||
}
|
||||
|
||||
@test "/usr/bin/ping is included" {
|
||||
|
|
|
@ -10,7 +10,7 @@ setup() {
|
|||
}
|
||||
|
||||
teardown() {
|
||||
rm -rf test test.tar.bz2
|
||||
rm -rf test test.tar.xz
|
||||
}
|
||||
|
||||
@test "/usr/bin/ping is included" {
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -9,7 +9,7 @@ setup() {
|
|||
}
|
||||
|
||||
teardown() {
|
||||
rm -rf test test.tar.bz2
|
||||
rm -rf test test.tar.xz
|
||||
}
|
||||
|
||||
@test "/boot/kernel is excluded" {
|
||||
|
|
|
@ -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" {
|
||||
|
|
|
@ -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" {
|
||||
|
|
|
@ -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/
|
||||
}
|
||||
|
|
|
@ -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/.*'" {
|
||||
|
|
|
@ -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}"
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue