0
Commit Graph

29 Commits

Author SHA1 Message Date
Fabrice de Gans
45a495b131 [code-health] Migrate //base/PRESUBMIT.py to python3
Bug: 1211951
Change-Id: I060e1ffca3c03c0394a55e1a1fbb0e53787a3e57
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2980198
Commit-Queue: Fabrice de Gans <fdegans@chromium.org>
Commit-Queue: danakj <danakj@chromium.org>
Auto-Submit: Fabrice de Gans <fdegans@chromium.org>
Reviewed-by: danakj <danakj@chromium.org>
Cr-Commit-Position: refs/heads/master@{#894851}
2021-06-22 20:40:29 +00:00
Eric Seckler
c345e605ab base/tracing: Fix enable_base_tracing=false build
To unblock the WebRTC roll, which was failing:
https://logs.chromium.org/logs/webrtc/buildbucket/cr-buildbucket.appspot.com/8853653174088320992/+/steps/compile/0/logs/raw_io.output_failure_summary_/0

Also updates the presubmit warning to suggest running "gn check" and
fixes fuchsia build errors by including base_tracing_forward.h instead
of base_tracing.h from some //base headers.

Change-Id: I73c832a0586cce44976ae9b12fe2d86eb0f86981
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2741130
Commit-Queue: Eric Seckler <eseckler@chromium.org>
Commit-Queue: François Doray <fdoray@chromium.org>
Auto-Submit: Eric Seckler <eseckler@chromium.org>
Reviewed-by: François Doray <fdoray@chromium.org>
Owners-Override: François Doray <fdoray@chromium.org>
Cr-Commit-Position: refs/heads/master@{#860995}
2021-03-09 02:31:11 +00:00
Alexander Timin
2349697d65 [tracing] Add proxy headers for perfetto::TracedValue to //base.
Add proxy headers to ensure that even when the base tracing is disabled,
some stub implementations of perfetto::TracedValue are available and the
end users of the API don't have to worry about whether base tracing is
enabled or not.

R=skyostil@chromium.org
BUG=1137154
TEST=compiled with enable_base_tracing=false

Change-Id: Id89c1d3bea76ab3bf57cffda969903a63db3574a
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2723791
Reviewed-by: Eric Seckler <eseckler@chromium.org>
Reviewed-by: Gabriel Charette <gab@chromium.org>
Reviewed-by: Sami Kyöstilä <skyostil@chromium.org>
Commit-Queue: Alexander Timin <altimin@chromium.org>
Cr-Commit-Position: refs/heads/master@{#859231}
2021-03-03 02:27:19 +00:00
Eric Seckler
05f7e90907 base: Replace third_party/perfetto includes with base_tracing.h
Replace includes of third_party/perfetto/include headers with
//base/trace_event/base_tracing.h, and updates the presubmit check to
avoid such includes in the future.

Also adds a warning for includes to pbzero headers to remind us to keep
enable_base_tracing=false working when adding typed events.

This should also help unblock the base => WebRTC roll together with
https://crrev.com/c/2717767.

Change-Id: I1d17801e209b19de37ca0081de351897ea7c3643
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2717824
Reviewed-by: Gabriel Charette <gab@chromium.org>
Reviewed-by: Sami Kyöstilä <skyostil@chromium.org>
Commit-Queue: Eric Seckler <eseckler@chromium.org>
Cr-Commit-Position: refs/heads/master@{#857663}
2021-02-25 14:47:36 +00:00
Josip Sokcevic
8b6cc43b85 Use inclusive parameter names in PRESUBMIT.py
Bug: 1098562
Change-Id: I10e83b99a480d2d96b911e26b09e8db5d34a082e
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2333301
Commit-Queue: Josip Sokcevic <sokcevic@google.com>
Reviewed-by: Scott Violet <sky@chromium.org>
Reviewed-by: Dirk Pranke <dpranke@google.com>
Reviewed-by: Peter Kasting <pkasting@chromium.org>
Cr-Commit-Position: refs/heads/master@{#795088}
2020-08-05 17:45:33 +00:00
Eric Seckler
7d7dd3c336 base tracing: Make trace_event includes a bypassable presubmit error
Base code should include base_tracing.h instead of trace_event impl
headers, so that base can build with enable_base_tracing = false.

Previously, a presubmit check emitted a warning if a trace_event
implementation header was included outside trace_event implementation
directories. This modifies the warning into an error, which can be
bypassed via a source code comment.

TBR: rsesek@chromium.org
Bug: 1093406
Change-Id: Ic82f399390ededd12c04ad6005de8f68929bae87
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2264555
Reviewed-by: Eric Seckler <eseckler@chromium.org>
Reviewed-by: Sami Kyöstilä <skyostil@chromium.org>
Reviewed-by: Gabriel Charette <gab@chromium.org>
Commit-Queue: Eric Seckler <eseckler@chromium.org>
Cr-Commit-Position: refs/heads/master@{#782901}
2020-06-26 09:24:12 +00:00
Eric Seckler
f6c544f656 base: Hide tracing support behind a gn arg
In order to support Perfetto-powered typed trace events in //base, we
will add a dependency on //third_party/perfetto. This dependency would
be hard to support in libchrome -- for that reason, we're making
tracing support in //base optional at build time.

This patch introduces a gn arg that enables base's tracing support.
Disabling it is not supported in Chrome, but base_unittests and
libchrome can also be built & run with enable_base_tracing=false.

When support is disabled, a large part of the TRACE_EVENT API surface
is mocked out with an empty implementation, so that few other places in
//base code require preprocessor ifdefs.

Doc: https://docs.google.com/document/d/1UQ4Ez7B-TeowijOUuMXuoWj1amZcQ7E2abt3s4jaAEY/edit?usp=sharing
Test: args.gn: enable_base_tracing=false
Bug: 1065905,1006541
Change-Id: I067e85411c51659626af0713ccfa6c18cfffc3e7
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2207225
Commit-Queue: Eric Seckler <eseckler@chromium.org>
Reviewed-by: Gabriel Charette <gab@chromium.org>
Reviewed-by: Daniel Cheng <dcheng@chromium.org>
Reviewed-by: Sami Kyöstilä <skyostil@chromium.org>
Cr-Commit-Position: refs/heads/master@{#774081}
2020-06-02 10:49:21 +00:00
bttk
ec1765979b Exclude *.java files from a presubmit check intended for Objective-C
This check accidentally prevents package-private declarations
of annotations.

Change-Id: I7516f653d8b75ed82bb82c975586301f7fcb360a
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2014050
Reviewed-by: Yaron Friedman <yfriedman@chromium.org>
Commit-Queue: Yaron Friedman <yfriedman@chromium.org>
Auto-Submit: bttk <bttk@chromium.org>
Cr-Commit-Position: refs/heads/master@{#734516}
2020-01-23 17:04:17 +00:00
jam
93a6ee79f3 Turn on clang format as an upload step for all the repo.
Discussion at https://groups.google.com/a/chromium.org/forum/#!topic/chromium-dev/7Zm1Z49TV7U
CQ_INCLUDE_TRYBOTS=master.tryserver.blink:linux_trusty_blink_rel

Review-Url: https://codereview.chromium.org/2680413002
Cr-Commit-Position: refs/heads/master@{#449148}
2017-02-08 23:59:22 +00:00
dcheng
c2f1eb5795 Enforce clang-format in //base
BUG=none

Review-Url: https://codereview.chromium.org/2489153003
Cr-Commit-Position: refs/heads/master@{#431766}
2016-11-12 04:14:14 +00:00
tfarina
78bb92f458 Cleanup: Presubmit API is built into depot_tools.
Not in gcl, which probably these days nobody working on Chromium uses.

BUG=None
R=maruel@chromium.org
TBR=maruel@chromium.org
NOPRESUBMIT=true

Review URL: https://codereview.chromium.org/887033002

Cr-Commit-Position: refs/heads/master@{#314039}
2015-01-31 00:21:47 +00:00
droger
114a60b29b Allow Objective-C interfaces in //base/ios
Objective-C interfaces are disallowed in base because of a bug related
to plugins.
There are no plugins on iOS, and //base/ios is not compiled for other
platforms.

Review URL: https://codereview.chromium.org/708513002

Cr-Commit-Position: refs/heads/master@{#303007}
2014-11-06 11:07:13 +00:00
Paweł Hajdan, Jr
60f8228ca3 Update PRESUBMIT files for first round of ng trybots
Clean up redundant PRESUBMIT files.

linux_redux has been 100% red since at least August 2014,
and is presumably not useful.

BUG=380709
R=sergiyb@chromium.org

Review URL: https://codereview.chromium.org/685363002

Cr-Commit-Position: refs/heads/master@{#302067}
2014-10-30 10:56:15 +00:00
John Abd-El-Malek
a2226a6c81 Convert manually triggered try runs to use bots without _swarming prefix.
BUG=425813
R=phajdan.jr@chromium.org

Review URL: https://codereview.chromium.org/664413006

Cr-Commit-Position: refs/heads/master@{#300691}
2014-10-22 16:50:53 +00:00
mostynb
a924ebe97c remove OVERRIDE/FINAL presubmit checks now the macros are gone
BUG=417463

Review URL: https://codereview.chromium.org/670073003

Cr-Commit-Position: refs/heads/master@{#300681}
2014-10-22 15:11:02 +00:00
mostynb
9e096de10e replace OVERRIDE and FINAL with override and final in base/
BUG=417463

Review URL: https://codereview.chromium.org/611153004

Cr-Commit-Position: refs/heads/master@{#298520}
2014-10-07 17:59:25 +00:00
jam@chromium.org
02a7f63626 Update presubmit files to send windows tryjobs to swarming bots, now that the CQ has switched over.
R=avi@chromium.org

Review URL: https://codereview.chromium.org/461313002

Cr-Commit-Position: refs/heads/master@{#289157}
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@289157 0039d316-1c4b-4281-b951-d872f2087c98
2014-08-13 02:05:30 +00:00
jam@chromium.org
ce5195398a Update manually triggered try jobs to use swarming for ChromeOS and Mac since they're switched by CQ already.
TBR=ben

Review URL: https://codereview.chromium.org/450583002

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@288050 0039d316-1c4b-4281-b951-d872f2087c98
2014-08-07 15:43:24 +00:00
sergeyberezin@chromium.org
0bb112369a Update masters after the tryserver split.
Also replace deprecated linux_chromium_rel with linux_chromium_rel_swarming, while I'm at it.

R=agable@chromium.org, maruel@chromium.org
BUG=395196

Review URL: https://codereview.chromium.org/415323002

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@285752 0039d316-1c4b-4281-b951-d872f2087c98
2014-07-26 04:38:32 +00:00
phajdan.jr@chromium.org
7cb45cf494 Keep presubmit more in sync with CQ
BUG=none
R=maruel@chromium.org

Review URL: https://codereview.chromium.org/286023006

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@272936 0039d316-1c4b-4281-b951-d872f2087c98
2014-05-27 09:08:58 +00:00
phajdan.jr@chromium.org
0094fa132f More sync of PRESUBMIT with what CQ runs
This removes some configs that were here below in an attempt to reduce
the tryserver load.

They can be added later slowly after we verify they don't cause unnecessary
load. Note that CQ was not checking them anyway, so they were losing at least
50% CL coverage.

TBR=maruel

BUG=317931

Review URL: https://codereview.chromium.org/198333003

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@256739 0039d316-1c4b-4281-b951-d872f2087c98
2014-03-13 03:18:28 +00:00
phajdan.jr@chromium.org
1c649fa48d Convert most Chromium presubmit files to use new multiple-tryserver-compatible protocol
BUG=334892
R=maruel@chromium.org

Review URL: https://codereview.chromium.org/194903007

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@256318 0039d316-1c4b-4281-b951-d872f2087c98
2014-03-11 21:45:27 +00:00
rsesek@chromium.org
43016609b3 [Mac] Move the large block of NSEvent forward declarations to a shared header.
BUG=none
R=mark@chromium.org

Review URL: https://codereview.chromium.org/15979009

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@203155 0039d316-1c4b-4281-b951-d872f2087c98
2013-05-30 16:09:14 +00:00
leng@chromium.org
a35203a459 Allow Objective-C files in base/test/.
BUG=None
TEST=None

Review URL: https://chromiumcodereview.appspot.com/10695172

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@146348 0039d316-1c4b-4281-b951-d872f2087c98
2012-07-12 15:12:55 +00:00
avi@chromium.org
23e6cbc5da Simplify PRESUBMITs.
BUG=none
TEST=none


Review URL: https://chromiumcodereview.appspot.com/10554009

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@142608 0039d316-1c4b-4281-b951-d872f2087c98
2012-06-16 18:51:20 +00:00
maruel@chromium.org
2c92353880 Convert the XXX_sync builders to using directly sync_integration_tests.
TBR=nsylvain@chromium.org
BUG=109517
TEST=sync_integration_tests is properly run.
NOTRY=true

Review URL: http://codereview.chromium.org/9513008

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@124732 0039d316-1c4b-4281-b951-d872f2087c98
2012-03-02 21:16:55 +00:00
thakis@chromium.org
4ddc5df971 Switch the default git try / gcl try bots to _rel.
That matches the CQ bots, and they're significantly faster.

The global trybots are added to all subdirectory PRESUBMITs automatically, so remove win, linux, mac from subdirectory PRESUBMITs (instead of changing them too).

BUG=99521
TEST=`git try` creates faster tryjobs.
TBR=willchan (net), akalin (sync)

Review URL: http://codereview.chromium.org/8162009

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@113979 0039d316-1c4b-4281-b951-d872f2087c98
2011-12-12 03:05:04 +00:00
maruel@chromium.org
aa539ba4c9 Fix many* python scripts in src/
Make sure that:
- shebang is only present for executable files
- shebang is #!/usr/bin/env python
- __main__ is only present for executable files
- file's executable bit is coherent

Also fix EOF LF to be only one.

* Do not fix them all at once otherwise the CL would be too large.

TBR=jamiewalch@chromium.org
BUG=105108
TEST=

Review URL: http://codereview.chromium.org/8665013

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@111427 0039d316-1c4b-4281-b951-d872f2087c98
2011-11-23 22:22:20 +00:00
rsimha@chromium.org
0732a49d94 Force sync integration try jobs on patches that touch sync dependencies
Chrome sync is dependent on other areas of chrome, and patches committed to
these areas could potentially break sync. In the past, we have seen
sync integration test failures caused by patches to net, jingle and base.

This patch adds a PRESUBMIT.py file to each of these directories, that
will result the sync integration tests being run on any code that
touches these directories as part of their try runs.

BUG=70311
TEST=modify something under base, net or jingle and do a "git try" or "gcl try"

Review URL: http://codereview.chromium.org/6624086

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@77242 0039d316-1c4b-4281-b951-d872f2087c98
2011-03-08 03:37:28 +00:00