Skip to content

Commit

Permalink
build: move _testing_init into tools; limit web_test concurrency (ang…
Browse files Browse the repository at this point in the history
  • Loading branch information
mhevery authored and IgorMinar committed Dec 22, 2017
1 parent 533a010 commit ae97920
Show file tree
Hide file tree
Showing 17 changed files with 63 additions and 51 deletions.
13 changes: 10 additions & 3 deletions BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@ package(default_visibility = ["//visibility:public"])

exports_files([
"tsconfig.json",
"node_modules/angular/angular.js",
"node_modules/angular-mocks/angular-mocks.js",
])

# This rule belongs in node_modules/BUILD
Expand Down Expand Up @@ -44,7 +42,7 @@ filegroup(
)

filegroup(
name = "angular_bootstrap_scripts",
name = "web_test_bootstrap_scripts",
# do not sort
srcs = [
"//:node_modules/reflect-metadata/Reflect.js",
Expand All @@ -56,3 +54,12 @@ filegroup(
"//: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",
],
)
8 changes: 4 additions & 4 deletions packages/common/test/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -23,21 +23,21 @@ ts_library(

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

ts_web_test(
name = "test_web",
bootstrap = [
"//:angular_bootstrap_scripts",
"//:web_test_bootstrap_scripts",
],
# do not sort
deps = [
"//packages/_testing_init:browser",
"//tools/testing:browser",
":test_lib",
],
)
8 changes: 4 additions & 4 deletions packages/compiler/test/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -37,27 +37,27 @@ ts_library(

jasmine_node_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
tags = ["manual"],
deps = [
":test_lib",
":test_node_only_lib",
"//packages/_testing_init:node",
"//packages/core",
"//tools/testing:node",
],
)

ts_web_test(
name = "test_web",
bootstrap = [
"//:angular_bootstrap_scripts",
"//:web_test_bootstrap_scripts",
],
# dissable since tests are running but not yet passing
tags = ["manual"],
# do not sort
deps = [
"//packages/_testing_init:browser",
"//tools/testing:browser",
":test_lib",
],
)
8 changes: 4 additions & 4 deletions packages/core/test/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -51,24 +51,24 @@ ts_library(

jasmine_node_test(
name = "test",
bootstrap = ["angular_src/packages/_testing_init/init_node_spec.js"],
bootstrap = ["angular_src/tools/testing/init_node_spec.js"],
deps = [
":test_lib",
":test_node_only_lib",
"//packages/_testing_init:node",
"//packages/platform-server",
"//packages/platform-server/testing",
"//tools/testing:node",
],
)

ts_web_test(
name = "test_web",
bootstrap = [
"//:angular_bootstrap_scripts",
"//:web_test_bootstrap_scripts",
],
# do not sort
deps = [
"//packages/_testing_init:browser",
"//tools/testing:browser",
":test_lib",
],
)
10 changes: 6 additions & 4 deletions packages/forms/test/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -18,21 +18,23 @@ ts_library(

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

ts_web_test(
name = "test_web",
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
deps = [
"//packages/_testing_init:browser",
"//tools/testing:browser",
":test_lib",
],
)
10 changes: 6 additions & 4 deletions packages/http/test/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -19,21 +19,23 @@ ts_library(

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

ts_web_test(
name = "test_web",
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
deps = [
"//packages/_testing_init:browser",
"//tools/testing:browser",
":test_lib",
],
)
4 changes: 2 additions & 2 deletions packages/language-service/test/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,11 @@ ts_library(

jasmine_node_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
tags = ["manual"],
deps = [
":test_lib",
"//packages/_testing_init:node",
"//tools/testing:node",
],
)
8 changes: 4 additions & 4 deletions packages/platform-browser-dynamic/test/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -19,25 +19,25 @@ ts_library(

jasmine_node_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
tags = ["manual"],
deps = [
":test_lib",
"//packages/_testing_init:node",
"//tools/testing:node",
],
)

ts_web_test(
name = "test_web",
bootstrap = [
"//:angular_bootstrap_scripts",
"//:web_test_bootstrap_scripts",
],
# dissable since tests are running but not yet passing
tags = ["manual"],
# do not sort
deps = [
"//packages/_testing_init:browser",
"//tools/testing:browser",
":test_lib",
],
)
8 changes: 4 additions & 4 deletions packages/platform-browser/test/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -25,25 +25,25 @@ ts_library(

jasmine_node_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
tags = ["manual"],
deps = [
":test_lib",
"//packages/_testing_init:node",
"//tools/testing:node",
],
)

ts_web_test(
name = "test_web",
bootstrap = [
"//:angular_bootstrap_scripts",
"//:web_test_bootstrap_scripts",
],
# dissable since tests are running but not yet passing
tags = ["manual"],
# do not sort
deps = [
"//packages/_testing_init:browser",
"//tools/testing:browser",
":test_lib",
],
)
4 changes: 2 additions & 2 deletions packages/platform-server/test/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,9 @@ ts_library(

jasmine_node_test(
name = "test",
bootstrap = ["angular_src/packages/_testing_init/init_node_spec.js"],
bootstrap = ["angular_src/tools/testing/init_node_spec.js"],
deps = [
":test_lib",
"//packages/_testing_init:node",
"//tools/testing:node",
],
)
8 changes: 4 additions & 4 deletions packages/platform-webworker/test/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -21,21 +21,21 @@ ts_library(

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

ts_web_test(
name = "test_web",
bootstrap = [
"//:angular_bootstrap_scripts",
"//:web_test_bootstrap_scripts",
],
# do not sort
deps = [
"//packages/_testing_init:browser",
"//tools/testing:browser",
":test_lib",
],
)
8 changes: 4 additions & 4 deletions packages/router/test/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -22,21 +22,21 @@ ts_library(

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

ts_web_test(
name = "test_web",
bootstrap = [
"//:angular_bootstrap_scripts",
"//:web_test_bootstrap_scripts",
],
# do not sort
deps = [
"//packages/_testing_init:browser",
"//tools/testing:browser",
":test_lib",
],
)
8 changes: 4 additions & 4 deletions packages/service-worker/test/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -20,21 +20,21 @@ ts_library(

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

ts_web_test(
name = "test_web",
bootstrap = [
"//:angular_bootstrap_scripts",
"//:web_test_bootstrap_scripts",
],
# do not sort
deps = [
"//packages/_testing_init:browser",
"//tools/testing:browser",
":test_lib",
],
)
9 changes: 5 additions & 4 deletions packages/upgrade/test/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -22,13 +22,14 @@ ts_library(
ts_web_test(
name = "test_web",
bootstrap = [
"//:angular_bootstrap_scripts",
"//:node_modules/angular/angular.js",
"//:node_modules/angular-mocks/angular-mocks.js",
"//:web_test_bootstrap_scripts",
"//:angularjs",
],
# "exclusive" - a work around for circle CI to prevent too many concurrent tests. :-()
tags = ["exclusive"],
# do not sort
deps = [
"//packages/_testing_init:browser",
"//tools/testing:browser",
":test_lib",
],
)
File renamed without changes.
File renamed without changes.
File renamed without changes.

0 comments on commit ae97920

Please sign in to comment.