build: move _testing_init into tools; limit web_test concurrency (#21053)

PR Close #21053
This commit is contained in:
Miško Hevery 2017-12-18 15:37:05 -08:00 committed by Igor Minar
parent 533a010b28
commit ae97920fe2
17 changed files with 63 additions and 51 deletions

View File

@ -2,8 +2,6 @@ package(default_visibility = ["//visibility:public"])
exports_files([ exports_files([
"tsconfig.json", "tsconfig.json",
"node_modules/angular/angular.js",
"node_modules/angular-mocks/angular-mocks.js",
]) ])
# This rule belongs in node_modules/BUILD # This rule belongs in node_modules/BUILD
@ -44,7 +42,7 @@ filegroup(
) )
filegroup( filegroup(
name = "angular_bootstrap_scripts", name = "web_test_bootstrap_scripts",
# do not sort # do not sort
srcs = [ srcs = [
"//:node_modules/reflect-metadata/Reflect.js", "//:node_modules/reflect-metadata/Reflect.js",
@ -56,3 +54,12 @@ filegroup(
"//:node_modules/zone.js/dist/jasmine-patch.js", "//:node_modules/zone.js/dist/jasmine-patch.js",
], ],
) )
filegroup(
name = "angularjs",
# do not sort
srcs = [
"//:node_modules/angular/angular.js",
"//:node_modules/angular-mocks/angular-mocks.js",
],
)

View File

@ -23,21 +23,21 @@ ts_library(
jasmine_node_test( jasmine_node_test(
name = "test", name = "test",
bootstrap = ["angular_src/packages/_testing_init/init_node_spec.js"], bootstrap = ["angular_src/tools/testing/init_node_spec.js"],
deps = [ deps = [
":test_lib", ":test_lib",
"//packages/_testing_init:node", "//tools/testing:node",
], ],
) )
ts_web_test( ts_web_test(
name = "test_web", name = "test_web",
bootstrap = [ bootstrap = [
"//:angular_bootstrap_scripts", "//:web_test_bootstrap_scripts",
], ],
# do not sort # do not sort
deps = [ deps = [
"//packages/_testing_init:browser", "//tools/testing:browser",
":test_lib", ":test_lib",
], ],
) )

View File

@ -37,27 +37,27 @@ ts_library(
jasmine_node_test( jasmine_node_test(
name = "test", name = "test",
bootstrap = ["angular_src/packages/_testing_init/init_node_spec.js"], bootstrap = ["angular_src/tools/testing/init_node_spec.js"],
# dissable since tests are running but not yet passing # dissable since tests are running but not yet passing
tags = ["manual"], tags = ["manual"],
deps = [ deps = [
":test_lib", ":test_lib",
":test_node_only_lib", ":test_node_only_lib",
"//packages/_testing_init:node",
"//packages/core", "//packages/core",
"//tools/testing:node",
], ],
) )
ts_web_test( ts_web_test(
name = "test_web", name = "test_web",
bootstrap = [ bootstrap = [
"//:angular_bootstrap_scripts", "//:web_test_bootstrap_scripts",
], ],
# dissable since tests are running but not yet passing # dissable since tests are running but not yet passing
tags = ["manual"], tags = ["manual"],
# do not sort # do not sort
deps = [ deps = [
"//packages/_testing_init:browser", "//tools/testing:browser",
":test_lib", ":test_lib",
], ],
) )

View File

@ -51,24 +51,24 @@ ts_library(
jasmine_node_test( jasmine_node_test(
name = "test", name = "test",
bootstrap = ["angular_src/packages/_testing_init/init_node_spec.js"], bootstrap = ["angular_src/tools/testing/init_node_spec.js"],
deps = [ deps = [
":test_lib", ":test_lib",
":test_node_only_lib", ":test_node_only_lib",
"//packages/_testing_init:node",
"//packages/platform-server", "//packages/platform-server",
"//packages/platform-server/testing", "//packages/platform-server/testing",
"//tools/testing:node",
], ],
) )
ts_web_test( ts_web_test(
name = "test_web", name = "test_web",
bootstrap = [ bootstrap = [
"//:angular_bootstrap_scripts", "//:web_test_bootstrap_scripts",
], ],
# do not sort # do not sort
deps = [ deps = [
"//packages/_testing_init:browser", "//tools/testing:browser",
":test_lib", ":test_lib",
], ],
) )

View File

@ -18,21 +18,23 @@ ts_library(
jasmine_node_test( jasmine_node_test(
name = "test", name = "test",
bootstrap = ["angular_src/packages/_testing_init/init_node_spec.js"], bootstrap = ["angular_src/tools/testing/init_node_spec.js"],
deps = [ deps = [
":test_lib", ":test_lib",
"//packages/_testing_init:node", "//tools/testing:node",
], ],
) )
ts_web_test( ts_web_test(
name = "test_web", name = "test_web",
bootstrap = [ bootstrap = [
"//:angular_bootstrap_scripts", "//:web_test_bootstrap_scripts",
], ],
# "exclusive" - a work around for circle CI to prevent too many concurrent tests. :-()
tags = ["exclusive"],
# do not sort # do not sort
deps = [ deps = [
"//packages/_testing_init:browser", "//tools/testing:browser",
":test_lib", ":test_lib",
], ],
) )

View File

@ -19,21 +19,23 @@ ts_library(
jasmine_node_test( jasmine_node_test(
name = "test", name = "test",
bootstrap = ["angular_src/packages/_testing_init/init_node_spec.js"], bootstrap = ["angular_src/tools/testing/init_node_spec.js"],
deps = [ deps = [
":test_lib", ":test_lib",
"//packages/_testing_init:node", "//tools/testing:node",
], ],
) )
ts_web_test( ts_web_test(
name = "test_web", name = "test_web",
bootstrap = [ bootstrap = [
"//:angular_bootstrap_scripts", "//:web_test_bootstrap_scripts",
], ],
# "exclusive" - a work around for circle CI to prevent too many concurrent tests. :-()
tags = ["exclusive"],
# do not sort # do not sort
deps = [ deps = [
"//packages/_testing_init:browser", "//tools/testing:browser",
":test_lib", ":test_lib",
], ],
) )

View File

@ -15,11 +15,11 @@ ts_library(
jasmine_node_test( jasmine_node_test(
name = "test", name = "test",
bootstrap = ["angular_src/packages/_testing_init/init_node_spec.js"], bootstrap = ["angular_src/tools/testing/init_node_spec.js"],
# dissable since tests are running but not yet passing # dissable since tests are running but not yet passing
tags = ["manual"], tags = ["manual"],
deps = [ deps = [
":test_lib", ":test_lib",
"//packages/_testing_init:node", "//tools/testing:node",
], ],
) )

View File

@ -19,25 +19,25 @@ ts_library(
jasmine_node_test( jasmine_node_test(
name = "test", name = "test",
bootstrap = ["angular_src/packages/_testing_init/init_node_spec.js"], bootstrap = ["angular_src/tools/testing/init_node_spec.js"],
# dissable since tests are running but not yet passing # dissable since tests are running but not yet passing
tags = ["manual"], tags = ["manual"],
deps = [ deps = [
":test_lib", ":test_lib",
"//packages/_testing_init:node", "//tools/testing:node",
], ],
) )
ts_web_test( ts_web_test(
name = "test_web", name = "test_web",
bootstrap = [ bootstrap = [
"//:angular_bootstrap_scripts", "//:web_test_bootstrap_scripts",
], ],
# dissable since tests are running but not yet passing # dissable since tests are running but not yet passing
tags = ["manual"], tags = ["manual"],
# do not sort # do not sort
deps = [ deps = [
"//packages/_testing_init:browser", "//tools/testing:browser",
":test_lib", ":test_lib",
], ],
) )

View File

@ -25,25 +25,25 @@ ts_library(
jasmine_node_test( jasmine_node_test(
name = "test", name = "test",
bootstrap = ["angular_src/packages/_testing_init/init_node_spec.js"], bootstrap = ["angular_src/tools/testing/init_node_spec.js"],
# dissable since tests are running but not yet passing # dissable since tests are running but not yet passing
tags = ["manual"], tags = ["manual"],
deps = [ deps = [
":test_lib", ":test_lib",
"//packages/_testing_init:node", "//tools/testing:node",
], ],
) )
ts_web_test( ts_web_test(
name = "test_web", name = "test_web",
bootstrap = [ bootstrap = [
"//:angular_bootstrap_scripts", "//:web_test_bootstrap_scripts",
], ],
# dissable since tests are running but not yet passing # dissable since tests are running but not yet passing
tags = ["manual"], tags = ["manual"],
# do not sort # do not sort
deps = [ deps = [
"//packages/_testing_init:browser", "//tools/testing:browser",
":test_lib", ":test_lib",
], ],
) )

View File

@ -25,9 +25,9 @@ ts_library(
jasmine_node_test( jasmine_node_test(
name = "test", name = "test",
bootstrap = ["angular_src/packages/_testing_init/init_node_spec.js"], bootstrap = ["angular_src/tools/testing/init_node_spec.js"],
deps = [ deps = [
":test_lib", ":test_lib",
"//packages/_testing_init:node", "//tools/testing:node",
], ],
) )

View File

@ -21,21 +21,21 @@ ts_library(
jasmine_node_test( jasmine_node_test(
name = "test", name = "test",
bootstrap = ["angular_src/packages/_testing_init/init_node_spec.js"], bootstrap = ["angular_src/tools/testing/init_node_spec.js"],
deps = [ deps = [
":test_lib", ":test_lib",
"//packages/_testing_init:node", "//tools/testing:node",
], ],
) )
ts_web_test( ts_web_test(
name = "test_web", name = "test_web",
bootstrap = [ bootstrap = [
"//:angular_bootstrap_scripts", "//:web_test_bootstrap_scripts",
], ],
# do not sort # do not sort
deps = [ deps = [
"//packages/_testing_init:browser", "//tools/testing:browser",
":test_lib", ":test_lib",
], ],
) )

View File

@ -22,21 +22,21 @@ ts_library(
jasmine_node_test( jasmine_node_test(
name = "test", name = "test",
bootstrap = ["angular_src/packages/_testing_init/init_node_spec.js"], bootstrap = ["angular_src/tools/testing/init_node_spec.js"],
deps = [ deps = [
":test_lib", ":test_lib",
"//packages/_testing_init:node", "//tools/testing:node",
], ],
) )
ts_web_test( ts_web_test(
name = "test_web", name = "test_web",
bootstrap = [ bootstrap = [
"//:angular_bootstrap_scripts", "//:web_test_bootstrap_scripts",
], ],
# do not sort # do not sort
deps = [ deps = [
"//packages/_testing_init:browser", "//tools/testing:browser",
":test_lib", ":test_lib",
], ],
) )

View File

@ -20,21 +20,21 @@ ts_library(
jasmine_node_test( jasmine_node_test(
name = "test", name = "test",
bootstrap = ["angular_src/packages/_testing_init/init_node_spec.js"], bootstrap = ["angular_src/tools/testing/init_node_spec.js"],
deps = [ deps = [
":test_lib", ":test_lib",
"//packages/_testing_init:node", "//tools/testing:node",
], ],
) )
ts_web_test( ts_web_test(
name = "test_web", name = "test_web",
bootstrap = [ bootstrap = [
"//:angular_bootstrap_scripts", "//:web_test_bootstrap_scripts",
], ],
# do not sort # do not sort
deps = [ deps = [
"//packages/_testing_init:browser", "//tools/testing:browser",
":test_lib", ":test_lib",
], ],
) )

View File

@ -22,13 +22,14 @@ ts_library(
ts_web_test( ts_web_test(
name = "test_web", name = "test_web",
bootstrap = [ bootstrap = [
"//:angular_bootstrap_scripts", "//:web_test_bootstrap_scripts",
"//:node_modules/angular/angular.js", "//:angularjs",
"//:node_modules/angular-mocks/angular-mocks.js",
], ],
# "exclusive" - a work around for circle CI to prevent too many concurrent tests. :-()
tags = ["exclusive"],
# do not sort # do not sort
deps = [ deps = [
"//packages/_testing_init:browser", "//tools/testing:browser",
":test_lib", ":test_lib",
], ],
) )