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:
parent
a113eceaa4
commit
23118cc799
|
@ -176,6 +176,7 @@ test_release_dir()
|
|||
test_file "${path}"
|
||||
done
|
||||
|
||||
missing_in_release_files=0
|
||||
while IFS= read -r -d '' path ; do
|
||||
found=0
|
||||
for release_file in ${release_files} ; do
|
||||
|
@ -186,8 +187,13 @@ test_release_dir()
|
|||
|
||||
if [ $found -eq 0 ] ; then
|
||||
echo "[ !! ] $path missing in \${release_files}"
|
||||
missing_in_release_files=$(expr $missing_in_release_files + 1)
|
||||
fi
|
||||
done < <(find "${dir}" -type f -print0)
|
||||
|
||||
if [ ${missing_in_release_files} -gt 0 ] ; then
|
||||
exit 1
|
||||
fi
|
||||
}
|
||||
|
||||
test_release()
|
||||
|
|
Loading…
Reference in New Issue