When running tests where the .git directory is not owned by the current
user, various warnings are produced and the tests fail. This happens in
CI.

For patman itself, modify the gitutil.get_top_level() function to return
None in this case. Ensure that the warning is not shown, since it creates
about 1000 lines of output.

For checkpatch, the same warning is produced even though --no-tree is
given. Suppress that as well.

Signed-off-by: Simon Glass <s...@chromium.org>
---

 tools/patman/checkpatch.py     |  7 ++++---
 tools/patman/cmdline.py        |  8 ++++++--
 tools/patman/get_maintainer.py | 13 ++++++++-----
 tools/patman/project.py        |  3 ++-
 tools/patman/settings.py       |  3 ++-
 tools/u_boot_pylib/gitutil.py  | 11 ++++++++---
 6 files changed, 30 insertions(+), 15 deletions(-)

Applied to sjg/master, thanks!

Reply via email to