Paul Gschwendtner 0a4811c4ad build: convert largeform benchmarks to bazel (#28645)
Switches the `largeform` benchmarks to Bazel.
This is the last remaining e2e test within `modules/`.

PR Close #28645
2019-02-13 12:15:01 -08:00

46 lines
1.5 KiB
Python

load("//tools:defaults.bzl", "ng_module")
load("@build_bazel_rules_typescript//:defs.bzl", "ts_devserver")
load("//modules/benchmarks:benchmark_test.bzl", "benchmark_test")
package(default_visibility = ["//modules/benchmarks:__subpackages__"])
# Note that this benchmark has been designed for Angular with ViewEngine, but once ViewEngine is
# removed, we should keep this benchmark and run it with Ivy (potentially rename it to "render3")
ng_module(
name = "ng2",
srcs = glob(["*.ts"]),
# FIXME-IVY(FW-998): ExpressionTranslatorVisitor#visitWriteKeyExpr is not implemented.
tags = ["fixme-ivy-aot"],
tsconfig = "//modules/benchmarks:tsconfig-build.json",
# TODO: FW-1004 Type checking is currently not complete.
type_check = False,
deps = [
"//modules/benchmarks/src:util_lib",
"//packages/core",
"//packages/forms",
"//packages/platform-browser",
"//packages/platform-browser-dynamic",
],
)
ts_devserver(
name = "devserver",
entry_module = "angular/modules/benchmarks/src/largeform/ng2/index",
index_html = "index.html",
port = 4200,
scripts = ["@ngdeps//node_modules/tslib:tslib.js"],
static_files = [
"@ngdeps//node_modules/zone.js:dist/zone.js",
"@ngdeps//node_modules/reflect-metadata:Reflect.js",
],
tags = ["fixme-ivy-aot"],
deps = [":ng2"],
)
benchmark_test(
name = "perf",
server = ":devserver",
tags = ["fixme-ivy-aot"],
deps = ["//modules/benchmarks/src/largeform:tests_lib"],
)