revert: "feat(dev-infra): exposed new rule 'component_benchmark' via dev_infra (#36434)" (#36798)

This reverts commit b7f2a033df.

PR Close #36798
This commit is contained in:
Wagner Maciel 2020-04-24 10:26:36 -07:00 committed by Andrew Kushnir
parent f5ff2068a4
commit ad8c4cdd75
98 changed files with 127 additions and 192 deletions

View File

@ -966,6 +966,8 @@ groups:
'docs/TOOLS.md',
'docs/TRIAGE_AND_LABELS.md',
'goldens/*',
'modules/e2e_util/e2e_util.ts',
'modules/e2e_util/perf_util.ts',
'modules/*',
'packages/*',
'packages/examples/test-utils/**',
@ -973,10 +975,14 @@ groups:
'packages/examples/*',
'scripts/**',
'third_party/**',
'tools/brotli-cli/**',
'tools/browsers/**',
'tools/build/**',
'tools/circular_dependency_test/**',
'tools/contributing-stats/**',
'tools/components/**',
'tools/gulp-tasks/**',
'tools/ng_rollup_bundle/**',
'tools/ngcontainer/**',
'tools/npm/**',
'tools/npm_integration_test/**',

View File

@ -2,6 +2,7 @@ package(default_visibility = ["//visibility:public"])
exports_files([
"LICENSE",
"protractor-perf.conf.js",
"karma-js.conf.js",
"browser-providers.conf.js",
"scripts/ci/track-payload-size.sh",

View File

@ -64,7 +64,7 @@ load("@io_bazel_rules_webtesting//web:repositories.bzl", "web_test_repositories"
web_test_repositories()
load("//dev-infra/benchmark/browsers:browser_repositories.bzl", "browser_repositories")
load("//tools/browsers:browser_repositories.bzl", "browser_repositories")
browser_repositories()

View File

@ -1,12 +0,0 @@
package(default_visibility = ["//visibility:public"])
# Make source files available for distribution via pkg_npm
filegroup(
name = "files",
srcs = glob(["*"]) + [
"//dev-infra/benchmark/brotli-cli:files",
"//dev-infra/benchmark/browsers:files",
"//dev-infra/benchmark/component_benchmark:files",
"//dev-infra/benchmark/ng_rollup_bundle:files",
],
)

View File

@ -1,19 +0,0 @@
package(default_visibility = ["//visibility:public"])
load("@build_bazel_rules_nodejs//:index.bzl", "nodejs_binary")
nodejs_binary(
name = "brotli-cli",
data = [
"cli.js",
"@npm//brotli",
],
entry_point = ":cli.js",
visibility = ["//visibility:public"],
)
# Make source files available for distribution via pkg_npm
filegroup(
name = "files",
srcs = glob(["*"]),
)

View File

@ -1,12 +0,0 @@
package(default_visibility = ["//visibility:public"])
exports_files([
"protractor-perf.conf.js",
"start-server.js",
])
# Make source files available for distribution via pkg_npm
filegroup(
name = "files",
srcs = glob(["*"]) + ["//dev-infra/benchmark/component_benchmark/defaults:files"],
)

View File

@ -1,6 +0,0 @@
{
"compilerOptions": {
"lib": ["es2015", "dom"],
"types": ["node", "jasmine"]
}
}

View File

@ -1,9 +0,0 @@
/**
* @license
* Copyright Google Inc. All Rights Reserved.
*
* Use of this source code is governed by an MIT-style license that can be
* found in the LICENSE file at https://angular.io/license
*/
export {openBrowser, verifyNoBrowserErrors} from './e2e_util';
export {runBenchmark} from './perf_util';

View File

@ -1,12 +0,0 @@
package(default_visibility = ["//visibility:public"])
# Make source files available for distribution via pkg_npm
filegroup(
name = "files",
srcs = glob(["*"]) + [
"//dev-infra/benchmark/brotli-cli:files",
"//dev-infra/benchmark/browsers:files",
"//dev-infra/benchmark/component_benchmark:files",
"//dev-infra/benchmark/ng_rollup_bundle:files",
],
)

View File

@ -3,4 +3,5 @@ package(default_visibility = ["//visibility:public"])
exports_files([
"tsconfig-build.json",
"tsconfig-e2e.json",
"start-server.js",
])

View File

@ -1,4 +1,4 @@
load("@npm_bazel_protractor//:index.bzl", "protractor_web_test_suite")
load("//tools:defaults.bzl", "protractor_web_test_suite")
"""
Macro that can be used to define a benchmark test. This differentiates from
@ -10,9 +10,11 @@ load("@npm_bazel_protractor//:index.bzl", "protractor_web_test_suite")
def benchmark_test(name, server, tags = [], **kwargs):
protractor_web_test_suite(
name = name,
browsers = ["//dev-infra/benchmark/browsers:chromium"],
configuration = "//dev-infra/benchmark/component_benchmark:protractor-perf.conf.js",
on_prepare = "//dev-infra/benchmark/component_benchmark:start-server.js",
configuration = "//:protractor-perf.conf.js",
data = [
"//packages/benchpress",
],
on_prepare = "//modules/benchmarks:start-server.js",
server = server,
# Benchmark targets should not run on CI by default.
tags = tags + [

View File

@ -9,7 +9,7 @@ load("//tools:defaults.bzl", "protractor_web_test_suite")
def e2e_test(name, server, **kwargs):
protractor_web_test_suite(
name = name,
on_prepare = "//dev-infra/benchmark/component_benchmark:start-server.js",
on_prepare = "//modules/benchmarks:start-server.js",
server = server,
**kwargs
)

View File

@ -15,7 +15,7 @@ ts_library(
srcs = ["change_detection.perf-spec.ts"],
tsconfig = "//modules/benchmarks:tsconfig-e2e.json",
deps = [
"//dev-infra/benchmark/driver-utilities",
"//modules/e2e_util",
"@npm//protractor",
],
)
@ -26,7 +26,7 @@ ts_library(
srcs = ["change_detection.e2e-spec.ts"],
tsconfig = "//modules/benchmarks:tsconfig-e2e.json",
deps = [
"//dev-infra/benchmark/driver-utilities",
"//modules/e2e_util",
"@npm//protractor",
],
)

View File

@ -8,7 +8,7 @@
import {$} from 'protractor';
import {openBrowser, verifyNoBrowserErrors} from '../../../../dev-infra/benchmark/driver-utilities';
import {openBrowser, verifyNoBrowserErrors} from '../../../e2e_util/e2e_util';
describe('change detection benchmark', () => {
afterEach(verifyNoBrowserErrors);

View File

@ -7,7 +7,7 @@
*/
import {$} from 'protractor';
import {runBenchmark, verifyNoBrowserErrors} from '../../../../dev-infra/benchmark/driver-utilities';
import {runBenchmark, verifyNoBrowserErrors} from '../../../e2e_util/perf_util';
interface Worker {
id: string;

View File

@ -1,5 +1,5 @@
load("//tools:defaults.bzl", "ng_module", "ng_rollup_bundle", "ts_devserver")
load("//dev-infra/benchmark/component_benchmark:benchmark_test.bzl", "benchmark_test")
load("//modules/benchmarks:benchmark_test.bzl", "benchmark_test")
load("//modules/benchmarks:e2e_test.bzl", "e2e_test")
package(default_visibility = ["//modules/benchmarks:__subpackages__"])

View File

@ -7,7 +7,7 @@
*/
import {$, browser} from 'protractor';
import {runBenchmark} from '../../../../dev-infra/benchmark/driver-utilities';
import {runBenchmark} from '../../../e2e_util/perf_util';
describe('class bindings perf', () => {
it('should work for update', async () => {

View File

@ -1,7 +1,7 @@
package(default_visibility = ["//modules/benchmarks:__subpackages__"])
load("//tools:defaults.bzl", "ng_module", "ng_rollup_bundle", "ts_devserver", "ts_library")
load("//dev-infra/benchmark/component_benchmark:benchmark_test.bzl", "benchmark_test")
load("//modules/benchmarks:benchmark_test.bzl", "benchmark_test")
ng_module(
name = "application_lib",
@ -26,7 +26,7 @@ ts_library(
srcs = ["expanding_rows.perf-spec.ts"],
tsconfig = "//modules/benchmarks:tsconfig-e2e.json",
deps = [
"//dev-infra/benchmark/driver-utilities",
"//modules/e2e_util",
"@npm//protractor",
],
)

View File

@ -7,7 +7,7 @@
*/
import {$, browser} from 'protractor';
import {runBenchmark} from '../../../../dev-infra/benchmark/driver-utilities';
import {runBenchmark} from '../../../e2e_util/perf_util';
describe('benchmarks', () => {
it('should work for create', async () => {

View File

@ -8,7 +8,7 @@ ts_library(
srcs = ["js-web-frameworks.perf-spec.ts"],
tsconfig = "//modules/benchmarks:tsconfig-e2e.json",
deps = [
"//dev-infra/benchmark/driver-utilities",
"//modules/e2e_util",
"@npm//protractor",
],
)

View File

@ -7,7 +7,7 @@
*/
import {$} from 'protractor';
import {runBenchmark, verifyNoBrowserErrors} from '../../../../dev-infra/benchmark/driver-utilities';
import {runBenchmark, verifyNoBrowserErrors} from '../../../e2e_util/perf_util';
interface Worker {
id: string;

View File

@ -1,5 +1,5 @@
load("//tools:defaults.bzl", "ng_module", "ng_rollup_bundle", "ts_devserver")
load("//dev-infra/benchmark/component_benchmark:benchmark_test.bzl", "benchmark_test")
load("//modules/benchmarks:benchmark_test.bzl", "benchmark_test")
package(default_visibility = ["//modules/benchmarks:__subpackages__"])

View File

@ -8,7 +8,7 @@ ts_library(
srcs = ["largeform.perf-spec.ts"],
tsconfig = "//modules/benchmarks:tsconfig-e2e.json",
deps = [
"//dev-infra/benchmark/driver-utilities",
"//modules/e2e_util",
"@npm//protractor",
],
)
@ -19,7 +19,7 @@ ts_library(
srcs = ["largeform.e2e-spec.ts"],
tsconfig = "//modules/benchmarks:tsconfig-e2e.json",
deps = [
"//dev-infra/benchmark/driver-utilities",
"//modules/e2e_util",
"@npm//protractor",
],
)

View File

@ -8,7 +8,7 @@
import {$, By, element} from 'protractor';
import {openBrowser, verifyNoBrowserErrors} from '../../../../dev-infra/benchmark/driver-utilities';
import {openBrowser, verifyNoBrowserErrors} from '../../../e2e_util/e2e_util';
describe('largeform benchmark', () => {
afterEach(verifyNoBrowserErrors);

View File

@ -8,7 +8,8 @@
import {$} from 'protractor';
import {runBenchmark, verifyNoBrowserErrors} from '../../../../dev-infra/benchmark/driver-utilities';
import {verifyNoBrowserErrors} from '../../../e2e_util/e2e_util';
import {runBenchmark} from '../../../e2e_util/perf_util';
interface Worker {
id: string;

View File

@ -1,5 +1,5 @@
load("//tools:defaults.bzl", "ng_module", "ts_devserver")
load("//dev-infra/benchmark/component_benchmark:benchmark_test.bzl", "benchmark_test")
load("//modules/benchmarks:benchmark_test.bzl", "benchmark_test")
load("//modules/benchmarks:e2e_test.bzl", "e2e_test")
package(default_visibility = ["//modules/benchmarks:__subpackages__"])

View File

@ -15,7 +15,7 @@ ts_library(
srcs = ["largetable.perf-spec.ts"],
tsconfig = "//modules/benchmarks:tsconfig-e2e.json",
deps = [
"//dev-infra/benchmark/driver-utilities",
"//modules/e2e_util",
"@npm//protractor",
],
)
@ -26,7 +26,7 @@ ts_library(
srcs = ["largetable.e2e-spec.ts"],
tsconfig = "//modules/benchmarks:tsconfig-e2e.json",
deps = [
"//dev-infra/benchmark/driver-utilities",
"//modules/e2e_util",
"@npm//protractor",
],
)

View File

@ -1,5 +1,5 @@
load("//tools:defaults.bzl", "ts_devserver", "ts_library")
load("//dev-infra/benchmark/component_benchmark:benchmark_test.bzl", "benchmark_test")
load("//modules/benchmarks:benchmark_test.bzl", "benchmark_test")
load("//modules/benchmarks:e2e_test.bzl", "e2e_test")
package(default_visibility = ["//modules/benchmarks:__subpackages__"])

View File

@ -1,5 +1,5 @@
load("//tools:defaults.bzl", "ts_devserver", "ts_library")
load("//dev-infra/benchmark/component_benchmark:benchmark_test.bzl", "benchmark_test")
load("//modules/benchmarks:benchmark_test.bzl", "benchmark_test")
load("//modules/benchmarks:e2e_test.bzl", "e2e_test")
package(default_visibility = ["//modules/benchmarks:__subpackages__"])

View File

@ -1,5 +1,5 @@
load("//tools:defaults.bzl", "ts_devserver")
load("//dev-infra/benchmark/component_benchmark:benchmark_test.bzl", "benchmark_test")
load("//modules/benchmarks:benchmark_test.bzl", "benchmark_test")
load("//modules/benchmarks:e2e_test.bzl", "e2e_test")
package(default_visibility = ["//modules/benchmarks:__subpackages__"])

View File

@ -8,7 +8,7 @@
import {$} from 'protractor';
import {openBrowser, verifyNoBrowserErrors} from '../../../../dev-infra/benchmark/driver-utilities';
import {openBrowser, verifyNoBrowserErrors} from '../../../e2e_util/e2e_util';
describe('largetable benchmark', () => {
afterEach(verifyNoBrowserErrors);

View File

@ -7,7 +7,7 @@
*/
import {$} from 'protractor';
import {runBenchmark, verifyNoBrowserErrors} from '../../../../dev-infra/benchmark/driver-utilities';
import {runBenchmark, verifyNoBrowserErrors} from '../../../e2e_util/perf_util';
interface Worker {
id: string;

View File

@ -1,5 +1,5 @@
load("//tools:defaults.bzl", "ng_module", "ng_rollup_bundle", "ts_devserver")
load("//dev-infra/benchmark/component_benchmark:benchmark_test.bzl", "benchmark_test")
load("//modules/benchmarks:benchmark_test.bzl", "benchmark_test")
load("//modules/benchmarks:e2e_test.bzl", "e2e_test")
package(default_visibility = ["//modules/benchmarks:__subpackages__"])

View File

@ -1,5 +1,5 @@
load("//tools:defaults.bzl", "ng_module", "ts_devserver")
load("//dev-infra/benchmark/component_benchmark:benchmark_test.bzl", "benchmark_test")
load("//modules/benchmarks:benchmark_test.bzl", "benchmark_test")
load("//modules/benchmarks:e2e_test.bzl", "e2e_test")
package(default_visibility = ["//modules/benchmarks:__subpackages__"])

View File

@ -1,7 +1,7 @@
package(default_visibility = ["//visibility:public"])
load("//tools:defaults.bzl", "ng_module", "ng_rollup_bundle", "ts_devserver")
load("//dev-infra/benchmark/component_benchmark:benchmark_test.bzl", "benchmark_test")
load("//modules/benchmarks:benchmark_test.bzl", "benchmark_test")
load("//modules/benchmarks:e2e_test.bzl", "e2e_test")
ng_module(

View File

@ -8,7 +8,7 @@ ts_library(
srcs = ["styling_perf.spec.ts"],
tsconfig = "//modules/benchmarks:tsconfig-e2e.json",
deps = [
"//dev-infra/benchmark/driver-utilities",
"//modules/e2e_util",
"@npm//protractor",
],
)

View File

@ -1,5 +1,5 @@
load("//tools:defaults.bzl", "ng_module", "ng_rollup_bundle", "ts_devserver")
load("//dev-infra/benchmark/component_benchmark:benchmark_test.bzl", "benchmark_test")
load("//modules/benchmarks:benchmark_test.bzl", "benchmark_test")
package(default_visibility = ["//modules/benchmarks:__subpackages__"])

View File

@ -7,7 +7,8 @@
*/
import {$, by, element} from 'protractor';
import {openBrowser, runBenchmark, verifyNoBrowserErrors} from '../../../../dev-infra/benchmark/driver-utilities';
import {openBrowser, verifyNoBrowserErrors} from '../../../e2e_util/e2e_util';
import {runBenchmark} from '../../../e2e_util/perf_util';
/** List of possible scenarios that should be tested. */
const SCENARIOS = [

View File

@ -15,7 +15,7 @@ ts_library(
srcs = ["test_utils.ts"],
tsconfig = "//modules/benchmarks:tsconfig-e2e.json",
deps = [
"//dev-infra/benchmark/driver-utilities",
"//modules/e2e_util",
"@npm//protractor",
],
)

View File

@ -1,5 +1,5 @@
load("//tools:defaults.bzl", "ts_devserver", "ts_library")
load("//dev-infra/benchmark/component_benchmark:benchmark_test.bzl", "benchmark_test")
load("//modules/benchmarks:benchmark_test.bzl", "benchmark_test")
load("//modules/benchmarks:e2e_test.bzl", "e2e_test")
package(default_visibility = ["//modules/benchmarks:__subpackages__"])

View File

@ -1,5 +1,5 @@
load("//tools:defaults.bzl", "ts_devserver", "ts_library")
load("//dev-infra/benchmark/component_benchmark:benchmark_test.bzl", "benchmark_test")
load("//modules/benchmarks:benchmark_test.bzl", "benchmark_test")
load("//modules/benchmarks:e2e_test.bzl", "e2e_test")
package(default_visibility = ["//modules/benchmarks:__subpackages__"])

View File

@ -1,5 +1,5 @@
load("//tools:defaults.bzl", "ts_devserver")
load("//dev-infra/benchmark/component_benchmark:benchmark_test.bzl", "benchmark_test")
load("//modules/benchmarks:benchmark_test.bzl", "benchmark_test")
load("//modules/benchmarks:e2e_test.bzl", "e2e_test")
package(default_visibility = ["//modules/benchmarks:__subpackages__"])

View File

@ -1,5 +1,5 @@
load("//tools:defaults.bzl", "ts_devserver", "ts_library")
load("//dev-infra/benchmark/component_benchmark:benchmark_test.bzl", "benchmark_test")
load("//modules/benchmarks:benchmark_test.bzl", "benchmark_test")
load("//modules/benchmarks:e2e_test.bzl", "e2e_test")
package(default_visibility = ["//modules/benchmarks:__subpackages__"])

View File

@ -1,5 +1,5 @@
load("//tools:defaults.bzl", "ng_module", "ng_rollup_bundle", "ts_devserver")
load("//dev-infra/benchmark/component_benchmark:benchmark_test.bzl", "benchmark_test")
load("//modules/benchmarks:benchmark_test.bzl", "benchmark_test")
load("//modules/benchmarks:e2e_test.bzl", "e2e_test")
package(default_visibility = ["//modules/benchmarks:__subpackages__"])

View File

@ -1,5 +1,5 @@
load("//tools:defaults.bzl", "ts_devserver", "ts_library")
load("//dev-infra/benchmark/component_benchmark:benchmark_test.bzl", "benchmark_test")
load("//modules/benchmarks:benchmark_test.bzl", "benchmark_test")
load("//modules/benchmarks:e2e_test.bzl", "e2e_test")
package(default_visibility = ["//modules/benchmarks:__subpackages__"])

View File

@ -1,5 +1,5 @@
load("//tools:defaults.bzl", "ts_devserver", "ts_library")
load("//dev-infra/benchmark/component_benchmark:benchmark_test.bzl", "benchmark_test")
load("//modules/benchmarks:benchmark_test.bzl", "benchmark_test")
load("//modules/benchmarks:e2e_test.bzl", "e2e_test")
package(default_visibility = ["//modules/benchmarks:__subpackages__"])

View File

@ -1,5 +1,5 @@
load("//tools:defaults.bzl", "ng_module", "ts_devserver")
load("//dev-infra/benchmark/component_benchmark:benchmark_test.bzl", "benchmark_test")
load("//modules/benchmarks:benchmark_test.bzl", "benchmark_test")
load("//modules/benchmarks:e2e_test.bzl", "e2e_test")
package(default_visibility = ["//modules/benchmarks:__subpackages__"])

View File

@ -1,7 +1,7 @@
package(default_visibility = ["//modules/benchmarks:__subpackages__"])
load("//tools:defaults.bzl", "ng_module", "ng_rollup_bundle", "ts_devserver")
load("//dev-infra/benchmark/component_benchmark:benchmark_test.bzl", "benchmark_test")
load("//modules/benchmarks:benchmark_test.bzl", "benchmark_test")
load("//modules/benchmarks:e2e_test.bzl", "e2e_test")
ng_module(

View File

@ -1,5 +1,5 @@
load("//tools:defaults.bzl", "ts_devserver", "ts_library")
load("//dev-infra/benchmark/component_benchmark:benchmark_test.bzl", "benchmark_test")
load("//modules/benchmarks:benchmark_test.bzl", "benchmark_test")
load("//modules/benchmarks:e2e_test.bzl", "e2e_test")
package(default_visibility = ["//modules/benchmarks:__subpackages__"])

View File

@ -8,7 +8,8 @@
import {browser} from 'protractor';
import {openBrowser, runBenchmark} from '../../../../dev-infra/benchmark/driver-utilities';
import {openBrowser} from '../../../e2e_util/e2e_util';
import {runBenchmark} from '../../../e2e_util/perf_util';
export function runTreeBenchmark({id, prepare, setup, work}: {
id: string; prepare ? () : void; setup ? () : void; work(): void;

View File

@ -14,7 +14,7 @@
"rxjs/*": ["../../node_modules/rxjs/*"],
"@angular/*": ["../../packages/*"],
"zone.js/*": ["../../packages/zone.js/*"],
"dev_infra/*": ["../../dev-infra/*"]
"e2e_util/*": ["../e2e_util/*"]
},
"rootDir": ".",
"inlineSourceMap": true,
@ -31,6 +31,5 @@
"no-floating-promises": true,
"no-unused-expression": true,
"no-unused-variable": true
},
"include": ["../../dev-infra/benchmark/driver-utilities/"]
}
}

View File

@ -1,16 +1,15 @@
load("//tools:defaults.bzl", "ts_library")
package(default_visibility = ["//visibility:public"])
load("@npm_bazel_typescript//:index.bzl", "ts_library")
ts_library(
name = "driver-utilities",
name = "e2e_util",
testonly = 1,
srcs = glob(["*.ts"]),
module_name = "@angular/dev-infra/benchmark/driver-utilities",
tsconfig = "//dev-infra/benchmark/component_benchmark:tsconfig-e2e.json",
deps = [
"//packages:types",
"//packages/benchpress",
"@npm//@types/fs-extra",
"@npm//@types/node",
"@npm//@types/selenium-webdriver",
"@npm//fs-extra",
"@npm//node-uuid",

View File

@ -9,7 +9,7 @@
import {$, browser} from 'protractor';
import {promise} from 'selenium-webdriver';
import {verifyNoBrowserErrors} from '../../../../dev-infra/benchmark/driver-utilities';
import {verifyNoBrowserErrors} from '../../../e2e_util/e2e_util';
describe('async', () => {
const URL = '/';

View File

@ -7,7 +7,7 @@ def example_test(name, srcs, server, data = [], **kwargs):
srcs = srcs,
tsconfig = "//modules/playground:tsconfig-e2e.json",
deps = [
"//dev-infra/benchmark/driver-utilities",
"//modules/e2e_util",
"//packages/private/testing",
"@npm//@types/jasminewd2",
"@npm//@types/selenium-webdriver",

View File

@ -8,7 +8,7 @@
import {browser} from 'protractor';
import {verifyNoBrowserErrors} from '../../../../dev-infra/benchmark/driver-utilities';
import {verifyNoBrowserErrors} from '../../../e2e_util/e2e_util';
describe('hello world', function() {
afterEach(verifyNoBrowserErrors);

View File

@ -8,7 +8,7 @@
import {browser} from 'protractor';
import {verifyNoBrowserErrors} from '../../../../dev-infra/benchmark/driver-utilities';
import {verifyNoBrowserErrors} from '../../../e2e_util/e2e_util';
describe('http', function() {
afterEach(verifyNoBrowserErrors);

View File

@ -8,7 +8,7 @@
import {browser} from 'protractor';
import {verifyNoBrowserErrors} from '../../../../dev-infra/benchmark/driver-utilities';
import {verifyNoBrowserErrors} from '../../../e2e_util/e2e_util';
describe('jsonp', function() {
afterEach(verifyNoBrowserErrors);

View File

@ -8,7 +8,7 @@
import {browser, by, element, protractor} from 'protractor';
import {verifyNoBrowserErrors} from '../../../../dev-infra/benchmark/driver-utilities';
import {verifyNoBrowserErrors} from '../../../e2e_util/e2e_util';
const Key = protractor.Key;

View File

@ -8,7 +8,7 @@
import {browser, by, element} from 'protractor';
import {verifyNoBrowserErrors} from '../../../../dev-infra/benchmark/driver-utilities';
import {verifyNoBrowserErrors} from '../../../e2e_util/e2e_util';
describe('Model-Driven Forms', function() {
afterEach(verifyNoBrowserErrors);

View File

@ -8,7 +8,7 @@
import {browser} from 'protractor';
import {verifyNoBrowserErrors} from '../../../../dev-infra/benchmark/driver-utilities';
import {verifyNoBrowserErrors} from '../../../e2e_util/e2e_util';
describe('Order Management CRUD', function() {
const URL = '/';

View File

@ -8,7 +8,7 @@
import {browser} from 'protractor';
import {verifyNoBrowserErrors} from '../../../../dev-infra/benchmark/driver-utilities';
import {verifyNoBrowserErrors} from '../../../e2e_util/e2e_util';
describe('Person Management CRUD', function() {
const URL = '/';

View File

@ -8,7 +8,7 @@
import {$, browser, by, element, ExpectedConditions} from 'protractor';
import {verifyNoBrowserErrors} from '../../../../dev-infra/benchmark/driver-utilities';
import {verifyNoBrowserErrors} from '../../../e2e_util/e2e_util';
function waitForElement(selector: string) {
// Waits for the element with id 'abc' to be present on the dom.

View File

@ -8,7 +8,7 @@
import {$, browser, by, element, ExpectedConditions} from 'protractor';
import {verifyNoBrowserErrors} from '../../../../dev-infra/benchmark/driver-utilities';
import {verifyNoBrowserErrors} from '../../../e2e_util/e2e_util';
function waitForElement(selector: string) {
// Waits for the element with id 'abc' to be present on the dom.

View File

@ -8,7 +8,7 @@
import {browser, by, element} from 'protractor';
import {verifyNoBrowserErrors} from '../../../../dev-infra/benchmark/driver-utilities';
import {verifyNoBrowserErrors} from '../../../e2e_util/e2e_util';
describe('SVG', function() {
const URL = '/';

View File

@ -8,7 +8,7 @@
import {browser, by, element} from 'protractor';
import {verifyNoBrowserErrors} from '../../../../dev-infra/benchmark/driver-utilities';
import {verifyNoBrowserErrors} from '../../../e2e_util/e2e_util';
describe('Template-Driven Forms', function() {
afterEach(verifyNoBrowserErrors);

View File

@ -8,7 +8,7 @@
import {browser, by, element} from 'protractor';
import {verifyNoBrowserErrors} from '../../../../dev-infra/benchmark/driver-utilities';
import {verifyNoBrowserErrors} from '../../../e2e_util/e2e_util';
describe('ngUpgrade', function() {
const URL = '/';

View File

@ -8,7 +8,7 @@
import {browser, by, element, protractor} from 'protractor';
import {verifyNoBrowserErrors} from '../../../../../dev-infra/benchmark/driver-utilities';
import {verifyNoBrowserErrors} from '../../../../e2e_util/e2e_util';
// Disabled because with ViewEngine animations within webworkers is not supported.

View File

@ -8,7 +8,7 @@
import {browser, by, element, ExpectedConditions, protractor} from 'protractor';
import {verifyNoBrowserErrors} from '../../../../../dev-infra/benchmark/driver-utilities';
import {verifyNoBrowserErrors} from '../../../../e2e_util/e2e_util';
describe('WebWorkers Input', function() {
afterEach(() => {

View File

@ -8,7 +8,7 @@
import {browser, by, element, ExpectedConditions, protractor} from 'protractor';
import {verifyNoBrowserErrors} from '../../../../../dev-infra/benchmark/driver-utilities';
import {verifyNoBrowserErrors} from '../../../../e2e_util/e2e_util';
describe('WebWorkers Kitchen Sink', function() {
afterEach(() => {

View File

@ -8,7 +8,7 @@
import {browser, by, element, ExpectedConditions, protractor} from 'protractor';
import {verifyNoBrowserErrors} from '../../../../../dev-infra/benchmark/driver-utilities';
import {verifyNoBrowserErrors} from '../../../../e2e_util/e2e_util';
const URL = '/';

View File

@ -8,7 +8,7 @@
import {browser, by, element, protractor} from 'protractor';
import {verifyNoBrowserErrors} from '../../../../../dev-infra/benchmark/driver-utilities';
import {verifyNoBrowserErrors} from '../../../../e2e_util/e2e_util';
describe('WebWorker Router', () => {
beforeEach(() => {

View File

@ -8,7 +8,7 @@
import {browser, by, element, protractor} from 'protractor';
import {verifyNoBrowserErrors} from '../../../../../dev-infra/benchmark/driver-utilities';
import {verifyNoBrowserErrors} from '../../../../e2e_util/e2e_util';
describe('WebWorkers Todo', function() {
afterEach(() => {

View File

@ -8,7 +8,7 @@
import {browser, by, element} from 'protractor';
import {verifyNoBrowserErrors} from '../../../../dev-infra/benchmark/driver-utilities';
import {verifyNoBrowserErrors} from '../../../e2e_util/e2e_util';
describe('Zippy Component', function() {
afterEach(verifyNoBrowserErrors);

View File

@ -23,6 +23,7 @@
"types": ["angular"]
},
"exclude": [
"benchmarks_external",
"payload_tests",
"playground/",
"benchmarks/"

View File

@ -1,4 +1,4 @@
load("//dev-infra/benchmark/ng_rollup_bundle:ng_rollup_bundle.bzl", "ls_rollup_bundle")
load("//tools/ng_rollup_bundle:ng_rollup_bundle.bzl", "ls_rollup_bundle")
ls_rollup_bundle(
name = "language-service",

View File

@ -19,7 +19,8 @@
"selenium-webdriver": ["./node_modules/@types/selenium-webdriver/index.d.ts"],
"rxjs/*": ["./node_modules/rxjs/*"],
"@angular/*": ["./packages/*"],
"zone.js/*": ["./packages/zone.js/*"]
"zone.js/*": ["./packages/zone.js/*"],
"e2e_util/*": ["./modules/e2e_util/*"]
},
"rootDir": ".",
"inlineSourceMap": true,

View File

@ -70,7 +70,7 @@ def karma_test(name, env_srcs, env_deps, env_entry_point, test_srcs, test_deps,
":" + name + "_env_rollup.umd",
] + bootstrap +
_karma_test_required_dist_files,
browsers = ["//dev-infra/benchmark/browsers:chromium"],
browsers = ["//tools/browsers:chromium"],
static_files = [
":assets/sample.json",
":assets/worker.js",
@ -93,7 +93,7 @@ def karma_test(name, env_srcs, env_deps, env_entry_point, test_srcs, test_deps,
":" + name + "_env_rollup.umd",
"//packages/zone.js/dist:zone-testing-bundle.min.js",
] + _karma_test_required_dist_files,
browsers = ["//dev-infra/benchmark/browsers:chromium"],
browsers = ["//tools/browsers:chromium"],
config_file = "//:karma-js.conf.js",
configuration_env_vars = ["KARMA_WEB_TEST_MODE"],
data = [

View File

@ -0,0 +1,11 @@
load("@build_bazel_rules_nodejs//:index.bzl", "nodejs_binary")
nodejs_binary(
name = "brotli-cli",
data = [
"cli.js",
"@npm//brotli",
],
entry_point = ":cli.js",
visibility = ["//:__subpackages__"],
)

View File

@ -14,8 +14,6 @@
#
################################################################################
#
package(default_visibility = ["//visibility:public"])
load("@io_bazel_rules_webtesting//web:web.bzl", "browser", "web_test_archive")
# Override of chromium web_test_archive so that the archive is selected based on platform
@ -33,7 +31,7 @@ web_test_archive(
"@io_bazel_rules_webtesting//common/conditions:mac": {"CHROMIUM": "chrome-mac/Chromium.app/Contents/MacOS/chromium"},
"@io_bazel_rules_webtesting//common/conditions:windows": {"CHROMIUM": "chrome-win/chrome.exe"},
}),
visibility = ["//dev-infra/benchmark/browsers:__subpackages__"],
visibility = ["//tools/browsers:__subpackages__"],
)
# Override of chromedriver web_test_archive so that the archive is selected based on platform
@ -57,7 +55,7 @@ web_test_archive(
"CHROMEDRIVER": "chromedriver_win32/chromedriver.exe",
},
}),
visibility = ["//dev-infra/benchmark/browsers:__subpackages__"],
visibility = ["//tools/browsers:__subpackages__"],
)
browser(
@ -70,9 +68,3 @@ browser(
"@io_bazel_rules_webtesting//go/wsl",
],
)
# Make source files available for distribution via pkg_npm
filegroup(
name = "files",
srcs = glob(["*"]),
)

View File

@ -0,0 +1,4 @@
# This BUILD file exists to mark //tools/components as a package.
#
# Without this, using component_benchmark.bzl would throw an error saying:
# Label '//tools/components:component_benchmark.bzl' is invalid because 'tools/components' is not a package

View File

@ -1,11 +1,9 @@
load("//dev-infra/benchmark/ng_rollup_bundle:ng_rollup_bundle.bzl", "ng_rollup_bundle")
load("//tools:defaults.bzl", "ng_module")
load("@npm_bazel_typescript//:index.bzl", "ts_devserver", "ts_library")
load(":benchmark_test.bzl", "benchmark_test")
load("//tools:defaults.bzl", "ng_module", "ng_rollup_bundle", "ts_devserver", "ts_library")
load("//modules/benchmarks:benchmark_test.bzl", "benchmark_test")
def copy_default_file(origin, destination):
"""
Copies a file from /defaults to the destination.
Copies a file from tools/components/defaults to the destination.
Args:
origin: The name of a file in benchpress/defaults to be copied.
@ -13,7 +11,7 @@ def copy_default_file(origin, destination):
"""
native.genrule(
name = "copy_default_" + origin + "_file_genrule",
srcs = ["//dev-infra/benchmark/component_benchmark/defaults:" + origin],
srcs = ["//tools/components/defaults:" + origin],
outs = [destination],
cmd = "cat $(SRCS) >> $@",
)
@ -107,7 +105,6 @@ def component_benchmark(
# Creates ngFactory and ngSummary to be imported by the app's entry point.
generate_ve_shims = True,
deps = ng_deps,
tsconfig = "//dev-infra/benchmark/component_benchmark:tsconfig-e2e.json",
)
# Bundle the application (needed by ts_devserver).
@ -120,7 +117,7 @@ def component_benchmark(
# The ts_library for the driver that runs tests against the benchmark app.
ts_library(
name = benchmark_driver,
tsconfig = "//dev-infra/benchmark/component_benchmark:tsconfig-e2e.json",
tsconfig = "//modules/benchmarks:tsconfig-e2e.json",
testonly = True,
srcs = [driver],
deps = driver_deps,
@ -133,8 +130,7 @@ def component_benchmark(
port = 4200,
static_files = assets + styles,
deps = [":" + app_main + ".min_debug.es2015.js"],
additional_root_paths = ["//dev-infra/benchmark/component_benchmark/defaults"],
serving_path = "/app_bundle.js",
additional_root_paths = ["tools/components/defaults"],
)
# Runs a protractor test that's set up to use @angular/benchpress.

View File

@ -1,11 +1,5 @@
package(default_visibility = ["//visibility:public"])
# Make source files available for distribution via pkg_npm
filegroup(
name = "files",
srcs = glob(["*"]),
)
exports_files([
"index.html",
"index.ts",

View File

@ -10,7 +10,7 @@ load("@npm_bazel_typescript//:index.bzl", _ts_devserver = "ts_devserver", _ts_li
load("@npm_bazel_protractor//:index.bzl", _protractor_web_test_suite = "protractor_web_test_suite")
load("@npm//typescript:index.bzl", "tsc")
load("//packages/bazel:index.bzl", _ng_module = "ng_module", _ng_package = "ng_package")
load("//dev-infra/benchmark/ng_rollup_bundle:ng_rollup_bundle.bzl", _ng_rollup_bundle = "ng_rollup_bundle")
load("//tools/ng_rollup_bundle:ng_rollup_bundle.bzl", _ng_rollup_bundle = "ng_rollup_bundle")
load("//tools:ng_benchmark.bzl", _ng_benchmark = "ng_benchmark")
load("//tools/ts-api-guardian:index.bzl", _ts_api_guardian_test = "ts_api_guardian_test", _ts_api_guardian_test_npm_package = "ts_api_guardian_test_npm_package")
@ -245,7 +245,7 @@ def karma_web_test_suite(name, **kwargs):
runtime_deps = runtime_deps,
bootstrap = bootstrap,
deps = deps,
browsers = ["//dev-infra/benchmark/browsers:chromium"],
browsers = ["//tools/browsers:chromium"],
data = data,
tags = tags,
**kwargs
@ -282,7 +282,7 @@ def protractor_web_test_suite(**kwargs):
"""Default values for protractor_web_test_suite"""
_protractor_web_test_suite(
browsers = ["//dev-infra/benchmark/browsers:chromium"],
browsers = ["//tools/browsers:chromium"],
**kwargs
)

View File

@ -18,6 +18,7 @@ const srcsToFmt = [
`!${I18N_FOLDER}/currencies.ts`,
`!${I18N_FOLDER}/locale_en.ts`,
'modules/benchmarks/**/*.{js,ts}',
'modules/e2e_util/**/*.{js,ts}',
'modules/playground/**/*.{js,ts}',
'tools/**/*.{js,ts}',
'!tools/gulp-tasks/cldr/extract.js',

View File

@ -18,9 +18,3 @@ nodejs_binary(
],
entry_point = "@npm//:node_modules/rollup/dist/bin/rollup",
)
# Make source files available for distribution via pkg_npm
filegroup(
name = "files",
srcs = glob(["*"]),
)

View File

@ -175,10 +175,10 @@ _NG_ROLLUP_BUNDLE_ATTRS = {
"_rollup": attr.label(
executable = True,
cfg = "host",
default = Label("//dev-infra/benchmark/ng_rollup_bundle:rollup_with_build_optimizer"),
default = Label("//tools/ng_rollup_bundle:rollup_with_build_optimizer"),
),
"_rollup_config_tmpl": attr.label(
default = Label("//dev-infra/benchmark/ng_rollup_bundle:rollup.config.js"),
default = Label("//tools/ng_rollup_bundle:rollup.config.js"),
allow_single_file = True,
),
}
@ -392,7 +392,7 @@ def ng_rollup_bundle(name, **kwargs):
# maintain the comments off behavior. We pass the --comments flag with
# a regex that always evaluates to false to do this.
"args": ["--comments", "/bogus_string_to_suppress_all_comments^/"],
"config_file": "//dev-infra/benchmark/ng_rollup_bundle:terser_config.json",
"config_file": "//tools/ng_rollup_bundle:terser_config.json",
"sourcemap": False,
}
@ -413,7 +413,7 @@ def ng_rollup_bundle(name, **kwargs):
native.filegroup(name = name + ".min_debug.js", srcs = [name + ".min_debug"], visibility = visibility)
npm_package_bin(
name = "_%s_brotli" % name,
tool = "//dev-infra/benchmark/brotli-cli",
tool = "//tools/brotli-cli",
data = [name + ".min.js"],
outs = [name + ".min.js.br"],
args = [
@ -436,7 +436,7 @@ def ng_rollup_bundle(name, **kwargs):
native.filegroup(name = name + ".min_debug.es2015.js", srcs = [name + ".min_debug.es2015"], visibility = visibility)
npm_package_bin(
name = "_%s_es2015_brotli" % name,
tool = "//dev-infra/benchmark/brotli-cli",
tool = "//tools/brotli-cli",
data = [name + ".min.es2015.js"],
outs = [name + ".min.es2015.js.br"],
args = [