To help spot missing entries in .gitignore, or build steps that somehow
modify source files, do a `git status` in the git repo after builds.
Fail the build if there are untracked or modified files.
Change-Id: Id93da324d234e30979418f8f77d29e98f24677c8
Signed-off-by: Simon Marchi <simon.marchi@polymtl.ca>
rsync -a --include 'test-suite.log' --include '*/' --exclude='*' tests/ "$WORKSPACE/log"
fi
+# Check that the git repository has no untracked files, meaning that
+# .gitignore is not missing anything.
+pushd "$SRCDIR"
+
+git_status_output=$(git status --short)
+if [ -n "$git_status_output" ]; then
+ echo "Error: There are untracked or modified files in the repository:"
+ echo "git_status_output"
+ exit_status=1
+else
+ echo "No untracked or modified files."
+fi
+
+popd
+
# Clean the build directory
if [ "$BABELTRACE_MAKE_CLEAN" = "yes" ]; then
print_header "Clean"