Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(194)

Issue 782743002: Add presubmit check to //mojo/{public, edk} for BUILD.gn file flexibility. (Closed)

Created:
6 years ago by blundell
Modified:
6 years ago
Reviewers:
jamesr, viettrungluu, qsr
CC:
mojo-reviews_chromium.org, qsr+mojo_chromium.org, viettrungluu+watch_chromium.org, yzshen+watch_chromium.org, abarth-chromium, Aaron Boodman, darin (slow to review), ben+mojo_chromium.org
Base URL:
https://github.com/domokit/mojo.git@master
Project:
mojo
Visibility:
Public.

Description

Add presubmit check to //mojo/{public, edk} for BUILD.gn file flexibility. This script checks for changes to the build files that would break the ability to drop the mojo SDK EDK into a client repo at a location other than //mojo/{public, edk} and have GN work: - References to "//mojo/public" in the SDK (these should be relative paths). - References to other absolute paths in the SDK (these shouldn't be there at all). - References to "//mojo/public" and "//mojo/edk" in the EDK (these should be relative paths). - Source set targets that are not constructed via the appropriate wrapper (mojo_sdk_source_set or mojo_edk_source_set targets as appropriate). R=jamesr@chromium.org Committed: https://chromium.googlesource.com/external/mojo/+/3723fae44e0c178a53e86c772ecc029df371c17a

Patch Set 1 #

Patch Set 2 : Restructure + add EDK checks #

Patch Set 3 : Put all checks in //mojo/PRESUBMIT.py #

Total comments: 18

Patch Set 4 : Response to review #

Patch Set 5 : Add tests + fix bug #

Total comments: 5

Patch Set 6 : Response to review #

Total comments: 2
Unified diffs Side-by-side diffs Delta from patch set Stats (+437 lines, -3 lines) Patch
M mojo/PRESUBMIT.py View 1 2 3 4 2 chunks +194 lines, -3 lines 0 comments Download
A mojo/PRESUBMIT_test.py View 1 2 3 4 5 1 chunk +243 lines, -0 lines 2 comments Download

Messages

Total messages: 31 (7 generated)
blundell
I won't land this until the repo's ready for it, of course. Do you have ...
6 years ago (2014-12-05 15:42:55 UTC) #2
jamesr
I'd guess //mojo/public/tools/. Trung might know how to organize public python utility stuff in the ...
6 years ago (2014-12-05 21:06:45 UTC) #4
blundell
Please hold off on reviewing this CL. I started working on the addition of checks ...
6 years ago (2014-12-08 14:33:26 UTC) #5
blundell
CL ready for review. Added the EDK checks into this CL, as adding those checks ...
6 years ago (2014-12-08 15:22:50 UTC) #7
viettrungluu
On 2014/12/08 15:22:50, blundell wrote: > CL ready for review. Added the EDK checks into ...
6 years ago (2014-12-08 21:42:19 UTC) #8
blundell
On 2014/12/08 21:42:19, viettrungluu wrote: > On 2014/12/08 15:22:50, blundell wrote: > > CL ready ...
6 years ago (2014-12-08 21:44:32 UTC) #9
blundell
On 2014/12/08 21:42:19, viettrungluu wrote: > On 2014/12/08 15:22:50, blundell wrote: > > CL ready ...
6 years ago (2014-12-08 21:44:32 UTC) #10
blundell
On 2014/12/08 21:42:19, viettrungluu wrote: > On 2014/12/08 15:22:50, blundell wrote: > > CL ready ...
6 years ago (2014-12-08 21:45:54 UTC) #11
jamesr
How about just moving the PRESUBMIT.pys one level up (i.e. to //mojo) ?
6 years ago (2014-12-08 21:46:35 UTC) #12
blundell
On 2014/12/08 21:46:35, jamesr wrote: > How about just moving the PRESUBMIT.pys one level up ...
6 years ago (2014-12-08 21:48:19 UTC) #13
jamesr
On 2014/12/08 21:48:19, blundell wrote: > On 2014/12/08 21:46:35, jamesr wrote: > > How about ...
6 years ago (2014-12-08 21:51:28 UTC) #14
blundell
On 2014/12/08 21:51:28, jamesr wrote: > On 2014/12/08 21:48:19, blundell wrote: > > On 2014/12/08 ...
6 years ago (2014-12-08 21:54:13 UTC) #15
blundell
Hi James, Consolidated all the checks in //mojo/PRESUBMIT.py. PTAL.
6 years ago (2014-12-09 15:49:55 UTC) #17
viettrungluu
Drive-by suggestions. (The change basically looks fine to me, but it occurs to me that ...
6 years ago (2014-12-10 00:02:02 UTC) #18
blundell
Thanks. https://codereview.chromium.org/782743002/diff/80001/mojo/PRESUBMIT.py File mojo/PRESUBMIT.py (right): https://codereview.chromium.org/782743002/diff/80001/mojo/PRESUBMIT.py#newcode14 mojo/PRESUBMIT.py:14: SDK_WHITELISTED_EXTERNAL_PATHS = [ On 2014/12/10 00:02:02, viettrungluu wrote: ...
6 years ago (2014-12-10 16:13:06 UTC) #20
jamesr
Seems ok but for something this complicated I think we should have some sanity tests ...
6 years ago (2014-12-10 20:34:43 UTC) #21
blundell
Thanks for the pointer. Tests added - PTAL. All the changes to PRESUBMIT.py are just ...
6 years ago (2014-12-11 20:56:11 UTC) #23
jamesr
https://codereview.chromium.org/782743002/diff/160001/mojo/PRESUBMIT_test.py File mojo/PRESUBMIT_test.py (right): https://codereview.chromium.org/782743002/diff/160001/mojo/PRESUBMIT_test.py#newcode10 mojo/PRESUBMIT_test.py:10: sys.path.insert(0, "..") pretty sure this is wrong - Trung, ...
6 years ago (2014-12-11 23:42:13 UTC) #24
blundell
https://codereview.chromium.org/782743002/diff/160001/mojo/PRESUBMIT_test.py File mojo/PRESUBMIT_test.py (right): https://codereview.chromium.org/782743002/diff/160001/mojo/PRESUBMIT_test.py#newcode10 mojo/PRESUBMIT_test.py:10: sys.path.insert(0, "..") On 2014/12/11 23:42:13, jamesr wrote: > pretty ...
6 years ago (2014-12-12 06:31:32 UTC) #25
blundell
qsr@ is going to take charge of this while I'm out.
6 years ago (2014-12-12 17:18:29 UTC) #26
jamesr
https://codereview.chromium.org/782743002/diff/180001/mojo/PRESUBMIT_test.py File mojo/PRESUBMIT_test.py (right): https://codereview.chromium.org/782743002/diff/180001/mojo/PRESUBMIT_test.py#newcode12 mojo/PRESUBMIT_test.py:12: sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__)))) this is still modifying sys.path, which i don't ...
6 years ago (2014-12-13 01:48:07 UTC) #27
qsr
https://codereview.chromium.org/782743002/diff/180001/mojo/PRESUBMIT_test.py File mojo/PRESUBMIT_test.py (right): https://codereview.chromium.org/782743002/diff/180001/mojo/PRESUBMIT_test.py#newcode12 mojo/PRESUBMIT_test.py:12: sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__)))) On 2014/12/13 01:48:06, jamesr wrote: > this is ...
6 years ago (2014-12-15 09:02:28 UTC) #29
jamesr
Hmm ok, still lgtm them
6 years ago (2014-12-15 19:22:20 UTC) #30
qsr
6 years ago (2014-12-16 09:27:50 UTC) #31
Message was sent while issue was closed.
Committed patchset #6 (id:180001) manually as
3723fae44e0c178a53e86c772ecc029df371c17a (presubmit successful).

Powered by Google App Engine
This is Rietveld 408576698