test: ensure global options for benchmark tests can be set in bazel (#34753)

Previously, when the benchmark tests ran outside of Bazel, developers
had the posibility to control how the tests run through command line
options. e.g. `--dryrun`. This no longer works reliable in Bazel where
command line arguments are not passed to the text executable.

To make the global options still usable (as they could be still useful
in some cases), we just pass them through the Bazel `--test_env`. This
reduces the code we need to read the command line, but still preserves
the flexibility in a Bazel idiomatic way.

PR Close #34753
This commit is contained in:
Paul Gschwendtner
2020-01-16 14:34:03 +01:00
committed by Andrew Kushnir
parent 8f0732fb17
commit 03690442dc
6 changed files with 40 additions and 54 deletions

View File

@ -6,10 +6,6 @@
* found in the LICENSE file at https://angular.io/license
*/
// Make sure that the command line is read as the first thing
// as this could exit node if the help script should be printed.
require('angular/modules/e2e_util/perf_util').readCommandLine();
const CHROME_OPTIONS = {
'args': ['--js-flags=--expose-gc', '--no-sandbox', '--headless', '--disable-dev-shm-usage'],
'perfLoggingPrefs': {