packages: release: test: really fail when files are missing from ${release_files}.

We have a test for catching a situation where new files are added in
releases without adding them as well in the ${release_files} variable
to test for their existance.

But this test only warn of the issue instead of failing. And since
people might not inspect all the log details in depth, it's better to
fail instead.

Signed-off-by: Denis 'GNUtoo' Carikli <GNUtoo@cyberdimension.org>
Acked-by: Adrien Bourmault <neox@gnu.org>
This commit is contained in:
Denis 'GNUtoo' Carikli 2024-08-17 11:53:07 +02:00 committed by Adrien Bourmault
parent a113eceaa4
commit 23118cc799
Signed by: neox
GPG Key ID: 57BC26A3687116F6
1 changed files with 6 additions and 0 deletions

View File

@ -176,6 +176,7 @@ test_release_dir()
test_file "${path}" test_file "${path}"
done done
missing_in_release_files=0
while IFS= read -r -d '' path ; do while IFS= read -r -d '' path ; do
found=0 found=0
for release_file in ${release_files} ; do for release_file in ${release_files} ; do
@ -186,8 +187,13 @@ test_release_dir()
if [ $found -eq 0 ] ; then if [ $found -eq 0 ] ; then
echo "[ !! ] $path missing in \${release_files}" echo "[ !! ] $path missing in \${release_files}"
missing_in_release_files=$(expr $missing_in_release_files + 1)
fi fi
done < <(find "${dir}" -type f -print0) done < <(find "${dir}" -type f -print0)
if [ ${missing_in_release_files} -gt 0 ] ; then
exit 1
fi
} }
test_release() test_release()