-
Notifications
You must be signed in to change notification settings - Fork 53
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'ubuntu-24.04' into vim-tiny_noble
- Loading branch information
Showing
2 changed files
with
91 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
package: bzip2 | ||
|
||
essential: | ||
- bzip2_copyright | ||
|
||
slices: | ||
bins: | ||
essential: | ||
- libbz2-1.0_libs | ||
- libc6_libs | ||
contents: | ||
/usr/bin/bunzip2: | ||
/usr/bin/bzcat: { symlink: /usr/bin/bunzip2 } | ||
/usr/bin/bzip2: { symlink: /usr/bin/bunzip2 } | ||
/usr/bin/bzip2recover: | ||
|
||
scripts: | ||
essential: | ||
- base-files_bin | ||
- base-files_tmp | ||
- bzip2_bins | ||
- coreutils_bins | ||
- diffutils_bins | ||
- grep_bins | ||
- grep_deprecated | ||
- less_bins | ||
- sed_bins | ||
- util-linux_file-manipulation | ||
contents: | ||
/usr/bin/bzcmp: | ||
/usr/bin/bzdiff: | ||
/usr/bin/bzegrep: | ||
/usr/bin/bzexe: | ||
/usr/bin/bzfgrep: | ||
/usr/bin/bzgrep: | ||
/usr/bin/bzless: | ||
/usr/bin/bzmore: | ||
|
||
copyright: | ||
contents: | ||
/usr/share/doc/bzip2/copyright: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
summary: Integration tests for bzip2 | ||
|
||
execute: | | ||
# testing for only bins slice | ||
rootfs_bins="$(install-slices bzip2_bins)" | ||
mkdir "${rootfs_bins}"/dev | ||
mount --rbind /dev "${rootfs_bins}"/dev | ||
# generate a test file | ||
echo "this is a test file we use for compression with bzip2" > "${rootfs_bins}/input.txt" | ||
# test compression commands | ||
chroot "${rootfs_bins}" /usr/bin/bzip2 -k input.txt | ||
cmp "${rootfs_bins}/input.txt" <(chroot "${rootfs_bins}" bzip2 -d -c input.txt.bz2) | ||
cmp "${rootfs_bins}/input.txt" <(chroot "${rootfs_bins}" bunzip2 -c input.txt.bz2) | ||
cmp "${rootfs_bins}/input.txt" <(chroot "${rootfs_bins}" bzcat input.txt.bz2) | ||
# test bzip2recover | ||
chroot "${rootfs_bins}" bzip2recover input.txt.bz2 | ||
umount "${rootfs_bins}"/dev -l | ||
# testing for only scripts slice | ||
rootfs_script="$(install-slices bzip2_scripts)" | ||
mkdir "${rootfs_script}"/dev | ||
mount --rbind /dev "${rootfs_script}"/dev | ||
# generate a test file | ||
echo "this is a test file we use for compression with bzip2" > "${rootfs_script}/input.txt" | ||
cp $SHELL "${rootfs_script}/shell" | ||
chroot "${rootfs_script}" /usr/bin/bzip2 -k input.txt | ||
# test executable util | ||
chroot "${rootfs_script}" bzexe shell | ||
head -n1 "${rootfs_script}/shell" | grep "/bin/sh" | ||
# test text utils | ||
chroot "${rootfs_script}" bzcmp input.txt.bz2 input.txt.bz2 | exit_code=$? | ||
chroot "${rootfs_script}" bzdiff input.txt.bz2 input.txt.bz2 | exit_code=$? | ||
chroot "${rootfs_script}" bzgrep "test" input.txt.bz2 | ||
chroot "${rootfs_script}" bzfgrep "test" input.txt.bz2 | ||
chroot "${rootfs_script}" bzegrep "test" input.txt.bz2 | ||
# test pagers | ||
chroot "${rootfs_script}" bzless "test" input.txt.bz2 > /dev/null | ||
chroot "${rootfs_script}" bzmore "test" input.txt.bz2 > /dev/null | ||
umount "${rootfs_script}"/dev -l |