0
Commit Graph

12 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
Brian Sheedy
84721d701a Enable no-self-use checks on //testing
Enables the no-self-use pylint check on //testing and fixes/suppresses
all current warnings. This should not result in any change in code
behavior.

NO_IFTTT=Python-specific refactor

Bug: 353942917
Change-Id: I925c1ab5a7fabc088cecc223996277949ea09d7a
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6068812
Reviewed-by: Paul Semel <paulsemel@chromium.org>
Commit-Queue: Brian Sheedy <bsheedy@chromium.org>
Reviewed-by: Ben Pastene <bpastene@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1394102}
2024-12-10 06:17:43 +00:00
Brian Sheedy
d776270bcf Remove protected-access disable from //testing
Removes protected-access from the list of disabled checks in
//testing's pylintrc file and fixes/suppresses found issues.

Requires crrev.com/c/5792034 to land and roll first.

Bug: 353942917
Change-Id: I199557a27c3b0ddd127c40fca60aa6dfc7b1037c
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5791830
Reviewed-by: Kentaro Hara <haraken@chromium.org>
Reviewed-by: Ben Pastene <bpastene@chromium.org>
Commit-Queue: Brian Sheedy <bsheedy@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1348412}
2024-08-29 02:35:54 +00:00
Farid
014a22313e Use json.dumps to create network JSON string.
Using `json.dumps` to create a JSON string for the --network argument
aligns better with Crossbench's expected input format and simplifies
adding more parameters in future.

Bug: 338630584
Change-Id: I4c5fc263a8508250527e67e7ae719e2e8ca795d4
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5788648
Reviewed-by: John Chen <johnchen@chromium.org>
Commit-Queue: Farid (Mojtaba) Faridzad <faridzad@google.com>
Reviewed-by: Camillo Bruni <cbruni@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1342245}
2024-08-15 14:10:51 +00:00
Brian Sheedy
0d2300f3e5 Remove invalid-string-quote from //testing
Removes the invalid-string-quote disable from the //testing pylintrc
file and fixes all resulting errors.

Bug: 353942917
Change-Id: I4e8ef60d4f7b7645fee7ee86d579032bb0c24eb1
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5784807
Commit-Queue: Ben Pastene <bpastene@chromium.org>
Auto-Submit: Brian Sheedy <bsheedy@chromium.org>
Reviewed-by: Ben Pastene <bpastene@chromium.org>
Commit-Queue: Brian Sheedy <bsheedy@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1341341}
2024-08-13 23:14:41 +00:00
Farid
6f1a4769b9 Add fileserver support to the Crossbench in run_performance_tests.py
The Android devices do not have network connection in Pinpoint and
Waterfall. The WPR support already added to the run performance tool.
However, we prefer the fileserver approach as it picks the latest
version of benchmarks.

Bug: 338630584
Change-Id: I8f6e84c73c201bd3a9d3b244daa47ab35570a180
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5783757
Reviewed-by: John Chen <johnchen@chromium.org>
Reviewed-by: Wenbin Zhang <wenbinzhang@google.com>
Commit-Queue: Farid (Mojtaba) Faridzad <faridzad@google.com>
Cr-Commit-Position: refs/heads/main@{#1340660}
2024-08-12 22:26:18 +00:00
John Chen
4088d5492d Use browser_finder to find desktop Chrome
While running crossbench on desktop, use browser_finder from Telemetry
to find Chrome binary.

In addition, while running with a shard map, don't pass most command
line arguments to crossbench, as they are intended for run_benchmark and
will cause errors in crossbench.

Bug: b/338629299
Change-Id: I0eee0767c6c81242afdb8f4a5e1c62680ffd41e0
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5600579
Reviewed-by: Wenbin Zhang <wenbinzhang@google.com>
Commit-Queue: John Chen <johnchen@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1310867}
2024-06-05 20:48:35 +00:00
John Chen
4c8a7ac88f Fix unit tests for run_performance_tests
Change-Id: I1cd31d9d5f74aabcd79c0e9bf37d42e63ba82bc5
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5599481
Commit-Queue: Wenbin Zhang <wenbinzhang@google.com>
Reviewed-by: Wenbin Zhang <wenbinzhang@google.com>
Auto-Submit: John Chen <johnchen@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1310860}
2024-06-05 20:37:32 +00:00
Farid
ecb35545a8 Allow the performance test runner to run crossbench in shard maps.
With this change, the shard map file supports a `crossbench-benchmarks` node to execute target benchmarks for the selected shard index. The benchmark node accepts an optional list of arguments to pass to the `cb.py` tool.

Fixed: 338628699
Change-Id: Id1ee0be4def1c955c46e86a16bc4fc4286dc25d3
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5556249
Reviewed-by: John Chen <johnchen@chromium.org>
Commit-Queue: Farid (Mojtaba) Faridzad <faridzad@google.com>
Reviewed-by: Wenbin Zhang <wenbinzhang@google.com>
Cr-Commit-Position: refs/heads/main@{#1308232}
2024-05-30 20:07:23 +00: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
Wenbin Zhang
0a24d9e3d2 [benchmarking] parse "sections" in shard map to generate index range arguments
This CL added the parsing logic for the new shard map with "sections", which allow stories from multiple index ranges from the same benchmark to run on the same shard.

The generated argument will be: --story-shard-indexes=<range_string>

Bug: chromium:1140389
Change-Id: Ifcd9fc16b6ec1be1ea20e0d68687b0d14b5d1f65
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2617002
Commit-Queue: Wenbin Zhang <wenbinzhang@google.com>
Reviewed-by: John Chen <johnchen@chromium.org>
Cr-Commit-Position: refs/heads/master@{#842777}
2021-01-13 00:07:35 +00:00