packages: release tests: check the content of the qemu-pc_2mb rom archive.
We also need to check if we have all the files and no superfluous files inside the released archives. Signed-off-by: Denis 'GNUtoo' Carikli <GNUtoo@cyberdimension.org> Acked-by: Adrien 'neox' Bourmault <neox@gnu.org>
This commit is contained in:
parent
771688ac4c
commit
e4c2fd5eb6
|
@ -17,6 +17,7 @@
|
||||||
. resources/scripts/misc/sysexits.sh
|
. resources/scripts/misc/sysexits.sh
|
||||||
|
|
||||||
progname="resources/packages/tests/test-release"
|
progname="resources/packages/tests/test-release"
|
||||||
|
rev="$(git --no-pager describe --tags HEAD)"
|
||||||
|
|
||||||
usage()
|
usage()
|
||||||
{
|
{
|
||||||
|
@ -42,10 +43,63 @@ test_file()
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
test_release()
|
test_qemu_rom_archive()
|
||||||
{
|
{
|
||||||
rev="$(git --no-pager describe --tags HEAD)"
|
target="qemu-pc_2mb"
|
||||||
|
dir="release"
|
||||||
|
|
||||||
|
keyboard_layouts=" \
|
||||||
|
colemak \
|
||||||
|
deqwertz \
|
||||||
|
esqwerty \
|
||||||
|
frazerty \
|
||||||
|
frdvbepo \
|
||||||
|
itqwerty \
|
||||||
|
svenska \
|
||||||
|
trqwerty \
|
||||||
|
ukdvorak \
|
||||||
|
ukqwerty \
|
||||||
|
usdvorak \
|
||||||
|
usqwerty \
|
||||||
|
"
|
||||||
|
|
||||||
|
archive_files=""
|
||||||
|
for kb in ${keyboard_layouts} ; do
|
||||||
|
cbfb="libgfxinit_corebootfb"
|
||||||
|
txtmode="libgfxinit_txtmode"
|
||||||
|
|
||||||
|
archive_files="${archive_files} \
|
||||||
|
${target}/grub_${target}_${cbfb}_${kb}.rom \
|
||||||
|
${target}/grub_${target}_${txtmode}_${kb}.rom \
|
||||||
|
${target}/seabios_grubfirst_${target}_${cbfb}_${kb}.rom \
|
||||||
|
${target}/seabios_grubfirst_${target}_${txtmode}_${kb}.rom \
|
||||||
|
${target}/seabios_withgrub_${target}_${cbfb}_${kb}.rom \
|
||||||
|
${target}/seabios_withgrub_${target}_${txtmode}_${kb}s.rom \
|
||||||
|
"
|
||||||
|
done
|
||||||
|
|
||||||
|
archive_files="${archive_files} qemu-pc_2mb/version"
|
||||||
|
archive_files="${archive_files} qemu-pc_2mb/versiondate"
|
||||||
|
archive_files="${archive_files} qemu-pc_2mb/projectname"
|
||||||
|
|
||||||
|
archive="${dir}"/roms/gnuboot-"${rev}"_"${target}".tar.xz
|
||||||
|
|
||||||
|
for path in $(tar tf "${archive}" | grep -v '/$') ; do
|
||||||
|
found=0
|
||||||
|
for archive_file in ${archive_files} ; do
|
||||||
|
if [ "${path}" = "${archive_file}" ] ; then
|
||||||
|
found=1
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
|
||||||
|
if [ $found -eq 0 ] ; then
|
||||||
|
echo "[ !! ] $path"
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
}
|
||||||
|
|
||||||
|
test_release_dir()
|
||||||
|
{
|
||||||
dir="release"
|
dir="release"
|
||||||
|
|
||||||
targets="\
|
targets="\
|
||||||
|
@ -115,8 +169,7 @@ test_release()
|
||||||
test_file "${path}"
|
test_file "${path}"
|
||||||
done
|
done
|
||||||
|
|
||||||
while IFS= read -r -d '' path
|
while IFS= read -r -d '' path ; do
|
||||||
do
|
|
||||||
found=0
|
found=0
|
||||||
for release_file in ${release_files} ; do
|
for release_file in ${release_files} ; do
|
||||||
if [ "${path}" = "${release_file}" ] ; then
|
if [ "${path}" = "${release_file}" ] ; then
|
||||||
|
@ -130,6 +183,12 @@ test_release()
|
||||||
done < <(find "${dir}" -type f -print0)
|
done < <(find "${dir}" -type f -print0)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
test_release()
|
||||||
|
{
|
||||||
|
test_release_dir
|
||||||
|
test_qemu_rom_archive
|
||||||
|
}
|
||||||
|
|
||||||
if [ $# -eq 1 ] && { [ "$1" = "-h" ] || [ "$1" == "--help" ] ;} ; then
|
if [ $# -eq 1 ] && { [ "$1" = "-h" ] || [ "$1" == "--help" ] ;} ; then
|
||||||
usage "${progname}"
|
usage "${progname}"
|
||||||
exit 0
|
exit 0
|
||||||
|
|
Loading…
Reference in New Issue