ci: Add test to check for untracked files.

Runs a test at the end of tools/ci/backend to check if any untracked
files have been created during this ci tests. Exits with error code 1
if untracked files are found, otherwise exits successfully.

Fixes #14691.
This commit is contained in:
Pranav 2020-04-24 14:55:54 +05:30 committed by Tim Abbott
parent e47e1cd648
commit 93b09d44d6
1 changed files with 8 additions and 0 deletions

View File

@ -38,3 +38,11 @@ set -x
# NB: Everything here should be in `tools/test-all`. If there's a
# reason not to run it there, it should be there as a comment
# explaining why.
# This final check looks for untracked files that may have been
# created by test-backend or provision.
untracked="$(git ls-files --exclude-standard --others)"
if [ -n "$untracked" ]; then
printf >&2 "Error: untracked files:\n%s\n" "$untracked"
exit 1
fi