commit | 09f27d355761990069a7152efc93633e8f4e9a50 | [log] [tgz] |
---|---|---|
author | Prashanth Swaminathan <prashanthsw@google.com> | Fri Feb 26 18:24:42 2021 -0800 |
committer | CQ Bot Account <pigweed-scoped@luci-project-accounts.iam.gserviceaccount.com> | Mon Mar 01 06:05:16 2021 +0000 |
tree | 15b2a080e792ff57a9ec8c7b676974d3992a3ac0 | |
parent | cce2780fdce26a61e5c5bfa034742b7ce77eb801 [diff] |
presubmit: Run build file check from root Running the 'source_is_in_build_files' step in presubmit only succeeds if the user runs it from the root directory. Change the step to run from root regardless of the current working directory. Change-Id: I929d5cfcdfcaafc259bc20dc34052c2d5adfb7bf Reviewed-on: https://pigweed-review.googlesource.com/c/pigweed/pigweed/+/34520 Reviewed-by: Rob Mohr <mohrr@google.com> Commit-Queue: Prashanth Swaminathan <prashanthsw@google.com>
diff --git a/pw_presubmit/py/pw_presubmit/pigweed_presubmit.py b/pw_presubmit/py/pw_presubmit/pigweed_presubmit.py index cade0aa..9e8b034 100755 --- a/pw_presubmit/py/pw_presubmit/pigweed_presubmit.py +++ b/pw_presubmit/py/pw_presubmit/pigweed_presubmit.py
@@ -390,8 +390,8 @@ _GN_SOURCES_IN_BUILD, ctx.paths, bazel_dirs=[ctx.root], - gn_build_files=git_repo.list_files( - pathspecs=['BUILD.gn', '*BUILD.gn'])) + gn_build_files=git_repo.list_files(pathspecs=['BUILD.gn', '*BUILD.gn'], + repo_path=ctx.root)) if missing: _LOG.warning(