0
Commit Graph

6 Commits

Author SHA1 Message Date
Brian Sheedy
fe2702e96c Enable import-error check on //testing
Enables the import-error pylint check on //testing. Most errors are
fixed by updating the PYTHONPATH used by pylint to include the necessary
directories, although some import errors are simply suppressed (most
commonly for vpython-provided modules).

Also takes this opportunity to add comments about where each block of
non-standard imports comes from. This was already present in a number of
places, but not everywhere.

Bug: 353942917
Change-Id: I506d35e5a6ae56471618e6b4af57dd2ecb64dd7b
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6092016
Commit-Queue: Brian Sheedy <bsheedy@chromium.org>
Reviewed-by: Ben Pastene <bpastene@chromium.org>
Reviewed-by: Paul Semel <paulsemel@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1396194}
2024-12-13 13:48:20 -08:00
Ben Pastene
b5c6726e71 Enforce formatting of all py files under //testing/
Some subdirs have their own .style.yapf files (like
//testing/pytype_common/), but most do not. This has lead to a lot of
python code in //testing/ naturally being developed with no
consistent styling. This can make things a little hard to read when
put in the context of other py code throughout the repo that's much
more consistent.

So this:
- adds a basic //testing/.style.yapf file
- adds another testing/trigger_scripts/.style.yapf file that's similar
  but sets indent to 4, since the code in that dir currently uses
  4 indents
- reformats everything
- adds a presubmit checkout to //testing/PRESUBMIT.py to enforce that
  things stay formatted

Bug: 340623285
Change-Id: I2a6707ba2f6f784454d348a19280dca2ca90804b
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5540460
Commit-Queue: Ben Pastene <bpastene@chromium.org>
Reviewed-by: Andrew Grieve <agrieve@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1301583}
2024-05-15 21:24:01 +00:00
Avi Drissman
dfd8808526 Update copyright headers in testing/, tools/
The methodology used to generate this CL is documented in
https://crbug.com/1098010#c95.

No-Try: true
No-Presubmit: true
Bug: 1098010
Change-Id: I3a8a7b150e7bd64690534727150646081df50439
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3900697
Reviewed-by: Mark Mentovai <mark@chromium.org>
Auto-Submit: Avi Drissman <avi@chromium.org>
Owners-Override: Avi Drissman <avi@chromium.org>
Commit-Queue: Avi Drissman <avi@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1047644}
2022-09-15 20:11:09 +00:00
Matt Kotsenas
c8c054c497 Add back python executable in test_env_unittest.py
http://crrev.com/c/2229335 added Python3 support for the `test_env_unittest.py`
files, but appears to have broken the test on Windows in the process.

Fixing by adding back `sys.executable` in the command to run, as Windows
doesn't support running scripts via shebang.

Bug: 942720
Change-Id: I40757a78ad707f36481e2906251ee8451aa89318
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2238269
Reviewed-by: Ben Pastene <bpastene@chromium.org>
Reviewed-by: Dirk Pranke <dpranke@chromium.org>
Commit-Queue: Dirk Pranke <dpranke@chromium.org>
Cr-Commit-Position: refs/heads/master@{#776726}
2020-06-09 22:15:41 +00:00
Chris McDonald
c3e0f26bef Make test_env compatible with python 2 & 3
Use the vendored copy of the `six` library to make this code work across
Python versions.

Bug: 942720
Change-Id: I4bdb1032ed8e89e733b929eb13ada54efeb3b019
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2229335
Commit-Queue: Chris McDonald <cjmcdonald@chromium.org>
Reviewed-by: Dirk Pranke <dpranke@chromium.org>
Reviewed-by: Ben Pastene <bpastene@chromium.org>
Cr-Commit-Position: refs/heads/master@{#774934}
2020-06-04 02:15:14 +00:00
Caleb Rouleau
6844df15de [testing] Fix signal handling on Windows.
See https://bugs.chromium.org/p/chromium/issues/detail?id=733612#c6
for details.

Also add tests both for windows and non-windows.

Bug: 733612
Change-Id: Id656635a5fc79ea8f805658873599b526e764406
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1796572
Reviewed-by: Dirk Pranke <dpranke@chromium.org>
Reviewed-by: John Chen <johnchen@chromium.org>
Commit-Queue: Caleb Rouleau <crouleau@chromium.org>
Cr-Commit-Position: refs/heads/master@{#695429}
2019-09-11 01:11:59 +00:00