Paul Gschwendtner 53c4c8de8f 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
2020-01-29 09:22:27 -08:00

16 lines
481 B
Python

load("//tools:defaults.bzl", "protractor_web_test_suite")
"""
Macro that can be used to define a e2e test in `modules/benchmarks`. Targets created through
this macro differentiate from a "benchmark_test" as they will run on CI and do not run
with `@angular/benchpress`.
"""
def e2e_test(name, server, **kwargs):
protractor_web_test_suite(
name = name,
on_prepare = "//modules/benchmarks:start-server.js",
server = server,
**kwargs
)