From 4237c34c7850f5042bf2347b351b9c078321dc2c Mon Sep 17 00:00:00 2001 From: Igor Minar Date: Mon, 15 Oct 2018 23:24:22 -0700 Subject: [PATCH] test(ivy): mark failing test targets with fixme-ivy-jit and fixme-ivy-local tags (#26471) We are close enough to blacklist a few test targets, rather than whitelist targets to run... Because bazel rules can be composed of other rules that don't inherit tags automatically, I had to explicitly mark all of our ts_library and ng_module targes with "ivy-local" and "ivy-jit" tags so that we can create a query that excludes all fixme- tagged targets even if those targets are composed of other targets that don't inherit this tag. This is the updated overview of ivy related bazel tags: - ivy-only: target that builds or runs only under ivy - fixme-ivy-jit: target that doesn't yet build or run under ivy with --compile=jit - fixme-ivy-local: target that doesn't yet build or run under ivy with --compile=local - no-ivy-jit: target that is not intended to build or run under ivy with --compile=jit - no-ivy-local: target that is not intended to build or run under ivy with --compile=local PR Close #26471 --- .circleci/config.yml | 12 ++--- packages/animations/BUILD.bazel | 2 - packages/animations/browser/test/BUILD.bazel | 22 +++++++-- packages/animations/test/BUILD.bazel | 10 +--- packages/bazel/package.bzl | 1 + packages/bazel/rules_typescript_package.bzl | 1 + packages/bazel/test/ng_package/BUILD.bazel | 5 ++ packages/bazel/test/ngc-wrapped/BUILD.bazel | 1 + .../bazel/test/ngc-wrapped/empty/BUILD.bazel | 1 + packages/bazel/test/protractor-2/BUILD.bazel | 4 +- .../bazel/test/protractor-2/tsconfig.json | 2 +- .../test/protractor-2/tsconfig.test.json | 6 +++ packages/benchpress/test/BUILD.bazel | 20 ++++++++ packages/common/BUILD.bazel | 2 - packages/common/http/test/BUILD.bazel | 11 ++++- packages/common/test/BUILD.bazel | 11 ++++- packages/compiler-cli/BUILD.bazel | 2 - .../bazel/injectable_def/app/BUILD.bazel | 5 ++ .../bazel/injectable_def/app/test/BUILD.bazel | 10 +++- .../ivy_build/app/test/BUILD.bazel | 6 ++- .../bazel/ng_module/BUILD.bazel | 4 ++ .../compiler-cli/src/ngcc/test/BUILD.bazel | 2 +- .../src/ngtsc/annotations/test/BUILD.bazel | 2 +- .../src/ngtsc/metadata/test/BUILD.bazel | 2 +- .../src/ngtsc/testing/BUILD.bazel | 2 +- .../src/ngtsc/typecheck/test/BUILD.bazel | 2 +- .../src/ngtsc/util/test/BUILD.bazel | 2 +- packages/compiler-cli/test/BUILD.bazel | 24 +++++++--- .../compiler-cli/test/compliance/BUILD.bazel | 3 +- .../compiler-cli/test/diagnostics/BUILD.bazel | 18 ++++++-- .../compiler-cli/test/metadata/BUILD.bazel | 2 +- packages/compiler-cli/test/ngcc/BUILD.bazel | 2 +- packages/compiler-cli/test/ngtsc/BUILD.bazel | 2 +- .../test/transformers/BUILD.bazel | 6 ++- packages/compiler/BUILD.bazel | 2 - packages/compiler/test/BUILD.bazel | 12 ++++- .../test/expression_parser/utils/BUILD.bazel | 2 +- packages/compiler/test/render3/BUILD.bazel | 2 +- packages/core/BUILD.bazel | 2 - packages/core/test/BUILD.bazel | 36 ++++----------- .../test/bundling/animation_world/BUILD.bazel | 1 - .../test/bundling/hello_world/BUILD.bazel | 5 +- .../test/bundling/hello_world_r2/BUILD.bazel | 2 +- .../core/test/bundling/injection/BUILD.bazel | 2 +- packages/core/test/bundling/todo/BUILD.bazel | 5 +- .../core/test/bundling/todo_r2/BUILD.bazel | 5 +- packages/core/test/ivy_local_empty_spec.ts | 19 -------- packages/core/test/render3/BUILD.bazel | 14 ++++-- packages/core/test/render3/ivy/BUILD.bazel | 2 +- packages/elements/BUILD.bazel | 1 - .../elements/schematics/ng-add/BUILD.bazel | 2 +- packages/elements/test/BUILD.bazel | 7 ++- packages/forms/BUILD.bazel | 2 - packages/forms/test/BUILD.bazel | 10 +++- packages/http/BUILD.bazel | 1 - packages/http/test/BUILD.bazel | 4 +- packages/language-service/test/BUILD.bazel | 7 ++- .../platform-browser-dynamic/test/BUILD.bazel | 7 ++- packages/platform-browser/BUILD.bazel | 2 - .../animations/test/BUILD.bazel | 46 +++++++++++++++++++ .../test}/animation_renderer_spec.ts | 5 +- .../test}/browser_animation_builder_spec.ts | 2 +- packages/platform-browser/test/BUILD.bazel | 11 ++++- packages/platform-server/test/BUILD.bazel | 6 ++- packages/platform-webworker/BUILD.bazel | 1 - packages/platform-webworker/test/BUILD.bazel | 7 ++- packages/router/BUILD.bazel | 2 - packages/router/test/BUILD.bazel | 10 +++- .../test/aot_ngsummary_test/BUILD.bazel | 12 ++++- packages/router/upgrade/test/BUILD.bazel | 6 ++- packages/service-worker/cli/BUILD.bazel | 4 +- packages/service-worker/test/BUILD.bazel | 4 +- packages/service-worker/testing/BUILD.bazel | 2 +- .../service-worker/worker/test/BUILD.bazel | 3 +- .../service-worker/worker/testing/BUILD.bazel | 2 +- packages/upgrade/BUILD.bazel | 2 - packages/upgrade/test/BUILD.bazel | 6 ++- scripts/build-packages-dist.sh | 1 + tools/defaults.bzl | 26 +++++++++-- 79 files changed, 347 insertions(+), 172 deletions(-) create mode 100644 packages/bazel/test/protractor-2/tsconfig.test.json create mode 100644 packages/benchpress/test/BUILD.bazel delete mode 100644 packages/core/test/ivy_local_empty_spec.ts create mode 100644 packages/platform-browser/animations/test/BUILD.bazel rename packages/platform-browser/{test/animation => animations/test}/animation_renderer_spec.ts (99%) rename packages/platform-browser/{test/animation => animations/test}/browser_animation_builder_spec.ts (97%) diff --git a/.circleci/config.yml b/.circleci/config.yml index f7b5c1be4b..20469ef69d 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -78,16 +78,12 @@ jobs: - run: bazel info release - run: bazel run @nodejs//:yarn - # Use bazel query so that we explicitly ask for all buildable targets to be built as well - # This avoids waiting for the slowest build target to finish before running the first test - # See https://github.com/bazelbuild/bazel/issues/4257 - # NOTE: Angular developers should typically just bazel build //packages/... or bazel test //packages/... # Setup remote execution and run RBE-compatible tests. - *setup_bazel_remote_execution - - run: bazel query --output=label //... | xargs bazel test --build_tag_filters=-ivy-only --test_tag_filters=-manual,-ivy-only,-local + - run: bazel test //... --build_tag_filters=-ivy-only --test_tag_filters=-ivy-only,-local # Now run RBE incompatible tests locally. - run: sudo cp .circleci/bazel.rc /etc/bazel.bazelrc - - run: bazel query --output=label //... | xargs bazel test --build_tag_filters=-ivy-only,local --test_tag_filters=-manual,-ivy-only,local + - run: bazel test //... --build_tag_filters=-ivy-only,local --test_tag_filters=-ivy-only,local # CircleCI will allow us to go back and view/download these artifacts from past builds. # Also we can use a service like https://buildsize.org/ to automatically track binary size of these artifacts. @@ -126,7 +122,7 @@ jobs: - run: bazel run @yarn//:yarn - *setup_bazel_remote_execution - - run: bazel query --output=label //... | xargs bazel test --define=compile=jit --build_tag_filters=ivy-jit --test_tag_filters=-manual,ivy-jit + - run: bazel test //... --define=compile=jit --build_tag_filters=ivy-jit --test_tag_filters=ivy-jit test_ivy_aot: <<: *job_defaults @@ -139,7 +135,7 @@ jobs: - run: bazel run @yarn//:yarn - *setup_bazel_remote_execution - - run: bazel query --output=label //... | xargs bazel test --define=compile=local --build_tag_filters=ivy-local --test_tag_filters=-manual,ivy-local + - run: bazel test //... --define=compile=local --build_tag_filters=ivy-local --test_tag_filters=ivy-local # This job should only be run on PR builds, where `CIRCLE_PR_NUMBER` is defined. aio_preview: diff --git a/packages/animations/BUILD.bazel b/packages/animations/BUILD.bazel index d32879fa70..03e89f808e 100644 --- a/packages/animations/BUILD.bazel +++ b/packages/animations/BUILD.bazel @@ -25,8 +25,6 @@ ng_package( ], entry_point = "packages/animations/index.js", tags = [ - "ivy-jit", - "ivy-local", "release-with-framework", ], deps = [ diff --git a/packages/animations/browser/test/BUILD.bazel b/packages/animations/browser/test/BUILD.bazel index 29603a85f6..120e344b1a 100644 --- a/packages/animations/browser/test/BUILD.bazel +++ b/packages/animations/browser/test/BUILD.bazel @@ -1,8 +1,8 @@ -load("//tools:defaults.bzl", "ts_library") +load("//tools:defaults.bzl", "jasmine_node_test", "ts_library", "ts_web_test_suite") ts_library( - name = "test", - testonly = 1, + name = "test_lib", + testonly = True, srcs = glob(["**/*.ts"]), deps = [ "//packages:types", @@ -13,3 +13,19 @@ ts_library( "//packages/core/testing", ], ) + +jasmine_node_test( + name = "test", + bootstrap = ["angular/tools/testing/init_node_spec.js"], + deps = [ + ":test_lib", + "//tools/testing:node", + ], +) + +ts_web_test_suite( + name = "test_web", + deps = [ + ":test_lib", + ], +) diff --git a/packages/animations/test/BUILD.bazel b/packages/animations/test/BUILD.bazel index 6754cecd5b..60128dce5d 100644 --- a/packages/animations/test/BUILD.bazel +++ b/packages/animations/test/BUILD.bazel @@ -2,7 +2,7 @@ load("//tools:defaults.bzl", "jasmine_node_test", "ts_library", "ts_web_test_sui ts_library( name = "test_lib", - testonly = 1, + testonly = True, srcs = glob(["**/*.ts"]), deps = [ "//packages:types", @@ -14,10 +14,6 @@ ts_library( jasmine_node_test( name = "test", bootstrap = ["angular/tools/testing/init_node_spec.js"], - tags = [ - "ivy-jit", - "ivy-local", - ], deps = [ ":test_lib", "//tools/testing:node", @@ -26,10 +22,6 @@ jasmine_node_test( ts_web_test_suite( name = "test_web", - tags = [ - "ivy-jit", - "ivy-local", - ], deps = [ ":test_lib", ], diff --git a/packages/bazel/package.bzl b/packages/bazel/package.bzl index 7f94a25a64..4638cf2f6e 100644 --- a/packages/bazel/package.bzl +++ b/packages/bazel/package.bzl @@ -26,6 +26,7 @@ def rules_angular_dependencies(): name = "build_bazel_rules_typescript", url = "https://github.com/bazelbuild/rules_typescript/archive/0.20.3.zip", strip_prefix = "rules_typescript-0.20.3", + sha256 = "2a03b23c30c5109ab0863cfa60acce73ceb56337d41efc2dd67f8455a1c1d5f3", ) # Needed for Remote Execution diff --git a/packages/bazel/rules_typescript_package.bzl b/packages/bazel/rules_typescript_package.bzl index f1e03787c1..9c873496ef 100644 --- a/packages/bazel/rules_typescript_package.bzl +++ b/packages/bazel/rules_typescript_package.bzl @@ -36,6 +36,7 @@ def rules_typescript_dependencies(): http_archive, name = "build_bazel_rules_nodejs", urls = ["https://github.com/bazelbuild/rules_nodejs/archive/0.15.1.zip"], + sha256 = "a0a91a2e0cee32e9304f1aeea9e6c1b611afba548058c5980217d44ee11e3dd7", strip_prefix = "rules_nodejs-0.15.1", ) diff --git a/packages/bazel/test/ng_package/BUILD.bazel b/packages/bazel/test/ng_package/BUILD.bazel index 869d77c626..d5585227c6 100644 --- a/packages/bazel/test/ng_package/BUILD.bazel +++ b/packages/bazel/test/ng_package/BUILD.bazel @@ -24,6 +24,10 @@ jasmine_node_test( "@ngdeps//@types/shelljs", "@ngdeps//shelljs", ], + tags = [ + "fixme-ivy-local", + "no-ivy-jit", + ], ) ts_library( @@ -65,6 +69,7 @@ jasmine_node_test( # TODO(alexeagle): re-enable this test # see https://github.com/angular/angular/pull/22933 tags = ["manual"], + deps = ["@ngdeps//diff"], ) nodejs_binary( diff --git a/packages/bazel/test/ngc-wrapped/BUILD.bazel b/packages/bazel/test/ngc-wrapped/BUILD.bazel index 60b8e615c6..5b82d10909 100644 --- a/packages/bazel/test/ngc-wrapped/BUILD.bazel +++ b/packages/bazel/test/ngc-wrapped/BUILD.bazel @@ -33,4 +33,5 @@ jasmine_node_test( "//packages/bazel/test/ngc-wrapped/empty:tsconfig.json", "@build_bazel_rules_typescript//third_party/github.com/bazelbuild/bazel/src/main/protobuf:worker_protocol.proto", ], + tags = ["fixme-ivy-local"], ) diff --git a/packages/bazel/test/ngc-wrapped/empty/BUILD.bazel b/packages/bazel/test/ngc-wrapped/empty/BUILD.bazel index 68e33b75fa..f27c5ec65a 100644 --- a/packages/bazel/test/ngc-wrapped/empty/BUILD.bazel +++ b/packages/bazel/test/ngc-wrapped/empty/BUILD.bazel @@ -5,6 +5,7 @@ package(default_visibility = ["//packages/bazel/test:__subpackages__"]) ng_module( name = "empty", srcs = ["empty.ts"], + tags = ["fixme-ivy-local"], tsconfig = ":tsconfig.json", deps = [ "//packages/core", diff --git a/packages/bazel/test/protractor-2/BUILD.bazel b/packages/bazel/test/protractor-2/BUILD.bazel index 0dfda9e7a8..69a06e435d 100644 --- a/packages/bazel/test/protractor-2/BUILD.bazel +++ b/packages/bazel/test/protractor-2/BUILD.bazel @@ -8,8 +8,6 @@ ts_library( name = "app", srcs = ["app.ts"], tsconfig = ":tsconfig.json", - # FIXME: should not be needed here! - deps = ["@ngdeps//@types/jasmine"], ) ts_devserver( @@ -37,7 +35,7 @@ ts_library( name = "ts_spec", testonly = True, srcs = ["test.spec.ts"], - tsconfig = ":tsconfig.json", + tsconfig = ":tsconfig.test.json", deps = [ "@ngdeps//@types/selenium-webdriver", "@ngdeps//protractor", diff --git a/packages/bazel/test/protractor-2/tsconfig.json b/packages/bazel/test/protractor-2/tsconfig.json index ad2afc19d7..d18dc325cc 100644 --- a/packages/bazel/test/protractor-2/tsconfig.json +++ b/packages/bazel/test/protractor-2/tsconfig.json @@ -1,6 +1,6 @@ { "compilerOptions": { "lib": ["dom", "es2015"], - "types": ["jasmine"] + "types": [] } } diff --git a/packages/bazel/test/protractor-2/tsconfig.test.json b/packages/bazel/test/protractor-2/tsconfig.test.json new file mode 100644 index 0000000000..d4165e8a6a --- /dev/null +++ b/packages/bazel/test/protractor-2/tsconfig.test.json @@ -0,0 +1,6 @@ +{ + "extends": "./tsconfig.json", + "compilerOptions": { + "types": ["jasmine"] + } +} diff --git a/packages/benchpress/test/BUILD.bazel b/packages/benchpress/test/BUILD.bazel new file mode 100644 index 0000000000..4b06debf78 --- /dev/null +++ b/packages/benchpress/test/BUILD.bazel @@ -0,0 +1,20 @@ +load("//tools:defaults.bzl", "jasmine_node_test", "ts_library") + +# TODO: these tests don't even compile under bazel right now +# +# ts_library( +# name = "test_lib", +# testonly = True, +# srcs = glob(["**/*.ts"]), +# tags = ["manual"] +# ) + +# jasmine_node_test( +# name = "test", +# deps = [ +# ":test_lib", +# "//packages/benchpress" +# # "//tools/testing:node", +# ], +# tags = ["manual"] +# ) diff --git a/packages/common/BUILD.bazel b/packages/common/BUILD.bazel index 0b06fa465f..f94a0db7b0 100644 --- a/packages/common/BUILD.bazel +++ b/packages/common/BUILD.bazel @@ -28,8 +28,6 @@ ng_package( entry_point = "packages/common/index.js", packages = ["//packages/common/locales:package"], tags = [ - "ivy-jit", - "ivy-local", "release-with-framework", ], deps = [ diff --git a/packages/common/http/test/BUILD.bazel b/packages/common/http/test/BUILD.bazel index 911051c827..504a4070cd 100644 --- a/packages/common/http/test/BUILD.bazel +++ b/packages/common/http/test/BUILD.bazel @@ -2,10 +2,9 @@ load("//tools:defaults.bzl", "jasmine_node_test", "ts_library", "ts_web_test_sui ts_library( name = "test_lib", - testonly = 1, + testonly = True, srcs = glob( ["**/*.ts"], - exclude = ["**/*_node_only_spec.ts"], ), deps = [ "//packages/common/http", @@ -20,6 +19,10 @@ ts_library( jasmine_node_test( name = "test", bootstrap = ["angular/tools/testing/init_node_spec.js"], + tags = [ + "fixme-ivy-jit", + "fixme-ivy-local", + ], deps = [ ":test_lib", "//tools/testing:node", @@ -28,6 +31,10 @@ jasmine_node_test( ts_web_test_suite( name = "test_web", + tags = [ + "fixme-ivy-jit", + "fixme-ivy-local", + ], deps = [ ":test_lib", ], diff --git a/packages/common/test/BUILD.bazel b/packages/common/test/BUILD.bazel index d24cf87ca5..4f0068465d 100644 --- a/packages/common/test/BUILD.bazel +++ b/packages/common/test/BUILD.bazel @@ -2,10 +2,9 @@ load("//tools:defaults.bzl", "jasmine_node_test", "ts_library", "ts_web_test_sui ts_library( name = "test_lib", - testonly = 1, + testonly = True, srcs = glob( ["**/*.ts"], - exclude = ["**/*_node_only_spec.ts"], ), deps = [ "//packages/common", @@ -22,6 +21,10 @@ ts_library( jasmine_node_test( name = "test", bootstrap = ["angular/tools/testing/init_node_spec.js"], + tags = [ + "fixme-ivy-jit", + "fixme-ivy-local", + ], deps = [ ":test_lib", "//tools/testing:node", @@ -30,6 +33,10 @@ jasmine_node_test( ts_web_test_suite( name = "test_web", + tags = [ + "fixme-ivy-jit", + "fixme-ivy-local", + ], deps = [ ":test_lib", ], diff --git a/packages/compiler-cli/BUILD.bazel b/packages/compiler-cli/BUILD.bazel index 36924e9da1..ad5466d76f 100644 --- a/packages/compiler-cli/BUILD.bazel +++ b/packages/compiler-cli/BUILD.bazel @@ -44,8 +44,6 @@ npm_package( "package.json", ], tags = [ - "ivy-jit", - "ivy-local", "release-with-framework", ], deps = [ diff --git a/packages/compiler-cli/integrationtest/bazel/injectable_def/app/BUILD.bazel b/packages/compiler-cli/integrationtest/bazel/injectable_def/app/BUILD.bazel index 36413e5355..857423df08 100644 --- a/packages/compiler-cli/integrationtest/bazel/injectable_def/app/BUILD.bazel +++ b/packages/compiler-cli/integrationtest/bazel/injectable_def/app/BUILD.bazel @@ -4,12 +4,17 @@ load("//tools:defaults.bzl", "ng_module", "ts_library") ng_module( name = "app", + testonly = True, srcs = glob( [ "src/**/*.ts", ], ), module_name = "app_built", + tags = [ + "fixme-ivy-local", + "no-ivy-jit", + ], deps = [ "//packages/compiler-cli/integrationtest/bazel/injectable_def/lib2", "//packages/core", diff --git a/packages/compiler-cli/integrationtest/bazel/injectable_def/app/test/BUILD.bazel b/packages/compiler-cli/integrationtest/bazel/injectable_def/app/test/BUILD.bazel index 765d930b39..cdbdefc71d 100644 --- a/packages/compiler-cli/integrationtest/bazel/injectable_def/app/test/BUILD.bazel +++ b/packages/compiler-cli/integrationtest/bazel/injectable_def/app/test/BUILD.bazel @@ -4,12 +4,16 @@ load("//tools:defaults.bzl", "jasmine_node_test", "ts_library") ts_library( name = "test_lib", - testonly = 1, + testonly = True, srcs = glob( [ "**/*.ts", ], ), + tags = [ + "fixme-ivy-local", + "no-ivy-jit", + ], deps = [ "//packages/compiler-cli/integrationtest/bazel/injectable_def/app", "//packages/core", @@ -21,6 +25,10 @@ ts_library( jasmine_node_test( name = "test", bootstrap = ["angular/tools/testing/init_node_spec.js"], + tags = [ + "fixme-ivy-local", + "no-ivy-jit", + ], deps = [ ":test_lib", "//packages/platform-server", diff --git a/packages/compiler-cli/integrationtest/bazel/injector_def/ivy_build/app/test/BUILD.bazel b/packages/compiler-cli/integrationtest/bazel/injector_def/ivy_build/app/test/BUILD.bazel index 076f0ef754..5d0c9c2f78 100644 --- a/packages/compiler-cli/integrationtest/bazel/injector_def/ivy_build/app/test/BUILD.bazel +++ b/packages/compiler-cli/integrationtest/bazel/injector_def/ivy_build/app/test/BUILD.bazel @@ -4,7 +4,7 @@ load("//tools:defaults.bzl", "jasmine_node_test", "ts_library") ts_library( name = "test_lib", - testonly = 1, + testonly = True, srcs = glob( [ "**/*.ts", @@ -19,6 +19,10 @@ ts_library( jasmine_node_test( name = "test", bootstrap = ["angular/tools/testing/init_node_spec.js"], + tags = [ + "fixme-ivy-jit", + "fixme-ivy-local", + ], deps = [ ":test_lib", "//tools/testing:node", diff --git a/packages/compiler-cli/integrationtest/bazel/ng_module/BUILD.bazel b/packages/compiler-cli/integrationtest/bazel/ng_module/BUILD.bazel index b925602632..6ba666aba0 100644 --- a/packages/compiler-cli/integrationtest/bazel/ng_module/BUILD.bazel +++ b/packages/compiler-cli/integrationtest/bazel/ng_module/BUILD.bazel @@ -28,4 +28,8 @@ jasmine_node_test( name = "test", srcs = ["spec.js"], data = [":flat_module_index"], + tags = [ + "fixme-ivy-local", + "no-ivy-jit", + ], ) diff --git a/packages/compiler-cli/src/ngcc/test/BUILD.bazel b/packages/compiler-cli/src/ngcc/test/BUILD.bazel index eabf264a66..99ebd0807b 100644 --- a/packages/compiler-cli/src/ngcc/test/BUILD.bazel +++ b/packages/compiler-cli/src/ngcc/test/BUILD.bazel @@ -4,7 +4,7 @@ load("//tools:defaults.bzl", "jasmine_node_test", "ts_library") ts_library( name = "test_lib", - testonly = 1, + testonly = True, srcs = glob([ "**/*.ts", ]), diff --git a/packages/compiler-cli/src/ngtsc/annotations/test/BUILD.bazel b/packages/compiler-cli/src/ngtsc/annotations/test/BUILD.bazel index e3f65fb80d..4c7441a80e 100644 --- a/packages/compiler-cli/src/ngtsc/annotations/test/BUILD.bazel +++ b/packages/compiler-cli/src/ngtsc/annotations/test/BUILD.bazel @@ -4,7 +4,7 @@ load("//tools:defaults.bzl", "jasmine_node_test", "ts_library") ts_library( name = "test_lib", - testonly = 1, + testonly = True, srcs = glob([ "**/*.ts", ]), diff --git a/packages/compiler-cli/src/ngtsc/metadata/test/BUILD.bazel b/packages/compiler-cli/src/ngtsc/metadata/test/BUILD.bazel index f04a9c1380..7fd3b12092 100644 --- a/packages/compiler-cli/src/ngtsc/metadata/test/BUILD.bazel +++ b/packages/compiler-cli/src/ngtsc/metadata/test/BUILD.bazel @@ -4,7 +4,7 @@ load("//tools:defaults.bzl", "jasmine_node_test", "ts_library") ts_library( name = "test_lib", - testonly = 1, + testonly = True, srcs = glob([ "**/*.ts", ]), diff --git a/packages/compiler-cli/src/ngtsc/testing/BUILD.bazel b/packages/compiler-cli/src/ngtsc/testing/BUILD.bazel index b92f97077f..db42c39981 100644 --- a/packages/compiler-cli/src/ngtsc/testing/BUILD.bazel +++ b/packages/compiler-cli/src/ngtsc/testing/BUILD.bazel @@ -4,7 +4,7 @@ load("//tools:defaults.bzl", "ts_library") ts_library( name = "testing", - testonly = 1, + testonly = True, srcs = glob([ "**/*.ts", ]), diff --git a/packages/compiler-cli/src/ngtsc/typecheck/test/BUILD.bazel b/packages/compiler-cli/src/ngtsc/typecheck/test/BUILD.bazel index 858bbf906e..6de544a767 100644 --- a/packages/compiler-cli/src/ngtsc/typecheck/test/BUILD.bazel +++ b/packages/compiler-cli/src/ngtsc/typecheck/test/BUILD.bazel @@ -4,7 +4,7 @@ load("//tools:defaults.bzl", "jasmine_node_test", "ts_library") ts_library( name = "test_lib", - testonly = 1, + testonly = True, srcs = glob([ "**/*.ts", ]), diff --git a/packages/compiler-cli/src/ngtsc/util/test/BUILD.bazel b/packages/compiler-cli/src/ngtsc/util/test/BUILD.bazel index f5cc39356e..88ddde2ad7 100644 --- a/packages/compiler-cli/src/ngtsc/util/test/BUILD.bazel +++ b/packages/compiler-cli/src/ngtsc/util/test/BUILD.bazel @@ -4,7 +4,7 @@ load("//tools:defaults.bzl", "jasmine_node_test", "ts_library") ts_library( name = "test_lib", - testonly = 1, + testonly = True, srcs = glob([ "**/*.ts", ]), diff --git a/packages/compiler-cli/test/BUILD.bazel b/packages/compiler-cli/test/BUILD.bazel index bfdc4d59e1..47de2c415d 100644 --- a/packages/compiler-cli/test/BUILD.bazel +++ b/packages/compiler-cli/test/BUILD.bazel @@ -4,7 +4,7 @@ load("//tools:defaults.bzl", "jasmine_node_test", "ts_library") ts_library( name = "test_utils", - testonly = 1, + testonly = True, srcs = [ "mocks.ts", "test_support.ts", @@ -24,7 +24,7 @@ ts_library( # extract_18n_spec ts_library( name = "extract_i18n_lib", - testonly = 1, + testonly = True, srcs = [ "extract_i18n_spec.ts", ], @@ -42,6 +42,10 @@ jasmine_node_test( data = [ "//packages/core:npm_package", ], + tags = [ + "fixme-ivy-local", + "no-ivy-jit", + ], deps = [ ":extract_i18n_lib", "//packages/common:npm_package", @@ -54,7 +58,7 @@ jasmine_node_test( # ngc_spec ts_library( name = "ngc_lib", - testonly = 1, + testonly = True, srcs = [ "ngc_spec.ts", ], @@ -76,6 +80,10 @@ jasmine_node_test( "//packages/platform-browser:npm_package", "//packages/router:npm_package", ], + tags = [ + "fixme-ivy-local", + "no-ivy-jit", + ], deps = [ ":ngc_lib", "//packages/core", @@ -88,7 +96,7 @@ jasmine_node_test( # ngctools_api_spec ts_library( name = "ngtools_api_lib", - testonly = 1, + testonly = True, srcs = [ "ngtools_api_spec.ts", ], @@ -107,6 +115,10 @@ jasmine_node_test( "//packages/core:npm_package", "//packages/router:npm_package", ], + tags = [ + "fixme-ivy-local", + "no-ivy-jit", + ], deps = [ ":ngtools_api_lib", "//packages/core", @@ -117,7 +129,7 @@ jasmine_node_test( # perform_watch_spec ts_library( name = "perform_watch_lib", - testonly = 1, + testonly = True, srcs = [ "perform_watch_spec.ts", ], @@ -145,7 +157,7 @@ jasmine_node_test( # perform_compile_spec ts_library( name = "perform_compile_lib", - testonly = 1, + testonly = True, srcs = [ "perform_compile_spec.ts", ], diff --git a/packages/compiler-cli/test/compliance/BUILD.bazel b/packages/compiler-cli/test/compliance/BUILD.bazel index c13eef1cce..66ec58e13c 100644 --- a/packages/compiler-cli/test/compliance/BUILD.bazel +++ b/packages/compiler-cli/test/compliance/BUILD.bazel @@ -2,7 +2,7 @@ load("//tools:defaults.bzl", "jasmine_node_test", "ts_library") ts_library( name = "test_lib", - testonly = 1, + testonly = True, srcs = glob( ["**/*.ts"], ), @@ -22,7 +22,6 @@ jasmine_node_test( "//packages/compiler-cli/test/ngtsc/fake_core:npm_package", ], tags = [ - "ivy-local", "ivy-only", ], deps = [ diff --git a/packages/compiler-cli/test/diagnostics/BUILD.bazel b/packages/compiler-cli/test/diagnostics/BUILD.bazel index 0363624ef7..ae85bb6320 100644 --- a/packages/compiler-cli/test/diagnostics/BUILD.bazel +++ b/packages/compiler-cli/test/diagnostics/BUILD.bazel @@ -2,7 +2,7 @@ load("//tools:defaults.bzl", "jasmine_node_test", "ts_library") ts_library( name = "mocks", - testonly = 1, + testonly = True, srcs = [ "mocks.ts", ], @@ -19,7 +19,7 @@ ts_library( # check_types_spec ts_library( name = "check_types_lib", - testonly = 1, + testonly = True, srcs = ["check_types_spec.ts"], deps = [ ":mocks", @@ -37,6 +37,10 @@ jasmine_node_test( "//packages/common:npm_package", "//packages/core:npm_package", ], + tags = [ + "fixme-ivy-local", + "no-ivy-jit", + ], deps = [ ":check_types_lib", "//packages/core", @@ -47,7 +51,7 @@ jasmine_node_test( # expression_diagnostics_spec ts_library( name = "expression_diagnostics_lib", - testonly = 1, + testonly = True, srcs = ["expression_diagnostics_spec.ts"], deps = [ ":mocks", @@ -67,6 +71,10 @@ jasmine_node_test( "//packages/core:npm_package", "//packages/forms:npm_package", ], + tags = [ + "fixme-ivy-local", + "no-ivy-jit", + ], deps = [ ":expression_diagnostics_lib", "//packages/core", @@ -77,7 +85,7 @@ jasmine_node_test( # typescript_symbols_spec ts_library( name = "typescript_symbols_lib", - testonly = 1, + testonly = True, srcs = ["typescript_symbols_spec.ts"], deps = [ ":mocks", @@ -105,7 +113,7 @@ jasmine_node_test( # typescript_version_spec ts_library( name = "typescript_version_lib", - testonly = 1, + testonly = True, srcs = ["typescript_version_spec.ts"], deps = [ "//packages/compiler-cli", diff --git a/packages/compiler-cli/test/metadata/BUILD.bazel b/packages/compiler-cli/test/metadata/BUILD.bazel index 9800b35f8e..ea274a7571 100644 --- a/packages/compiler-cli/test/metadata/BUILD.bazel +++ b/packages/compiler-cli/test/metadata/BUILD.bazel @@ -2,7 +2,7 @@ load("//tools:defaults.bzl", "jasmine_node_test", "ts_library") ts_library( name = "test_lib", - testonly = 1, + testonly = True, srcs = glob(["**/*.ts"]), deps = [ "//packages:types", diff --git a/packages/compiler-cli/test/ngcc/BUILD.bazel b/packages/compiler-cli/test/ngcc/BUILD.bazel index ae50f8535b..c18e086dae 100644 --- a/packages/compiler-cli/test/ngcc/BUILD.bazel +++ b/packages/compiler-cli/test/ngcc/BUILD.bazel @@ -3,7 +3,7 @@ load("//tools:defaults.bzl", "jasmine_node_test", "ts_library") # Integration tests ts_library( name = "ngcc_lib", - testonly = 1, + testonly = True, srcs = glob([ "**/*_spec.ts", ]), diff --git a/packages/compiler-cli/test/ngtsc/BUILD.bazel b/packages/compiler-cli/test/ngtsc/BUILD.bazel index b6f2382b21..0019ee03e5 100644 --- a/packages/compiler-cli/test/ngtsc/BUILD.bazel +++ b/packages/compiler-cli/test/ngtsc/BUILD.bazel @@ -2,7 +2,7 @@ load("//tools:defaults.bzl", "jasmine_node_test", "ts_library") ts_library( name = "ngtsc_lib", - testonly = 1, + testonly = True, srcs = glob(["**/*.ts"]), deps = [ "//packages/compiler", diff --git a/packages/compiler-cli/test/transformers/BUILD.bazel b/packages/compiler-cli/test/transformers/BUILD.bazel index 0018db3b60..facc14741e 100644 --- a/packages/compiler-cli/test/transformers/BUILD.bazel +++ b/packages/compiler-cli/test/transformers/BUILD.bazel @@ -2,7 +2,7 @@ load("//tools:defaults.bzl", "jasmine_node_test", "ts_library") ts_library( name = "test_lib", - testonly = 1, + testonly = True, srcs = glob(["**/*.ts"]), deps = [ "//packages:types", @@ -25,6 +25,10 @@ jasmine_node_test( "//packages/core:npm_package", "//packages/router:npm_package", ], + tags = [ + "fixme-ivy-local", + "no-ivy-jit", + ], deps = [ ":test_lib", "//packages/core", diff --git a/packages/compiler/BUILD.bazel b/packages/compiler/BUILD.bazel index 08269e2b51..72e1f389f9 100644 --- a/packages/compiler/BUILD.bazel +++ b/packages/compiler/BUILD.bazel @@ -22,8 +22,6 @@ ng_package( entry_point = "packages/compiler/compiler.js", include_devmode_srcs = True, tags = [ - "ivy-jit", - "ivy-local", "release-with-framework", ], deps = [ diff --git a/packages/compiler/test/BUILD.bazel b/packages/compiler/test/BUILD.bazel index 15f2878286..396c94fd17 100644 --- a/packages/compiler/test/BUILD.bazel +++ b/packages/compiler/test/BUILD.bazel @@ -28,7 +28,7 @@ ts_library( ts_library( name = "test_lib", - testonly = 1, + testonly = True, srcs = glob( ["**/*.ts"], exclude = NODE_ONLY + UTILS, @@ -49,7 +49,7 @@ ts_library( ts_library( name = "test_node_only_lib", - testonly = 1, + testonly = True, srcs = glob( NODE_ONLY, exclude = UTILS, @@ -74,6 +74,10 @@ jasmine_node_test( "//packages/common:npm_package", "//packages/core:npm_package", ], + tags = [ + "fixme-ivy-jit", + "fixme-ivy-local", + ], deps = [ ":test_lib", ":test_node_only_lib", @@ -86,6 +90,10 @@ jasmine_node_test( ts_web_test_suite( name = "test_web", + tags = [ + "fixme-ivy-jit", + "fixme-ivy-local", + ], deps = [ ":test_lib", ], diff --git a/packages/compiler/test/expression_parser/utils/BUILD.bazel b/packages/compiler/test/expression_parser/utils/BUILD.bazel index 3030462016..dbbf4e1994 100644 --- a/packages/compiler/test/expression_parser/utils/BUILD.bazel +++ b/packages/compiler/test/expression_parser/utils/BUILD.bazel @@ -2,7 +2,7 @@ load("//tools:defaults.bzl", "ts_library") ts_library( name = "utils", - testonly = 1, + testonly = True, srcs = glob( ["*.ts"], ), diff --git a/packages/compiler/test/render3/BUILD.bazel b/packages/compiler/test/render3/BUILD.bazel index a542f6ca31..25a50c2acb 100644 --- a/packages/compiler/test/render3/BUILD.bazel +++ b/packages/compiler/test/render3/BUILD.bazel @@ -2,7 +2,7 @@ load("//tools:defaults.bzl", "jasmine_node_test", "ts_library") ts_library( name = "test_lib", - testonly = 1, + testonly = True, srcs = glob( ["**/*.ts"], ), diff --git a/packages/core/BUILD.bazel b/packages/core/BUILD.bazel index 49140bd0d4..e5aca73e63 100644 --- a/packages/core/BUILD.bazel +++ b/packages/core/BUILD.bazel @@ -28,8 +28,6 @@ ng_package( ], entry_point = "packages/core/index.js", tags = [ - "ivy-jit", - "ivy-local", "release-with-framework", ], deps = [ diff --git a/packages/core/test/BUILD.bazel b/packages/core/test/BUILD.bazel index 2be4d3b703..a9a8f93506 100644 --- a/packages/core/test/BUILD.bazel +++ b/packages/core/test/BUILD.bazel @@ -4,13 +4,11 @@ load("//tools:defaults.bzl", "jasmine_node_test", "ts_library", "ts_web_test_sui ts_library( name = "test_lib", - testonly = 1, + testonly = True, srcs = glob( ["**/*.ts"], exclude = [ "**/*_node_only_spec.ts", - "render3/**/*.ts", - "ivy_local_empty_spec.ts", ], ), deps = [ @@ -35,18 +33,9 @@ ts_library( ], ) -ts_library( - name = "ivy_local_empty_lib", - testonly = 1, - srcs = ["ivy_local_empty_spec.ts"], - deps = [ - "//packages:types", - ], -) - ts_library( name = "test_node_only_lib", - testonly = 1, + testonly = True, srcs = glob(["**/*_node_only_spec.ts"]), deps = [ ":test_lib", @@ -62,6 +51,10 @@ ts_library( jasmine_node_test( name = "test", bootstrap = ["angular/tools/testing/init_node_spec.js"], + tags = [ + "fixme-ivy-jit", + "fixme-ivy-local", + ], deps = [ ":test_lib", ":test_node_only_lib", @@ -74,21 +67,12 @@ jasmine_node_test( ], ) -jasmine_node_test( - name = "ivy_local_empty_test", - bootstrap = ["angular/tools/testing/init_node_no_angular_spec.js"], - tags = [ - "ivy-local", - "ivy-only", - ], - deps = [ - ":ivy_local_empty_lib", - "//tools/testing:node_no_angular", - ], -) - ts_web_test_suite( name = "test_web", + tags = [ + "fixme-ivy-jit", + "fixme-ivy-local", + ], deps = [ ":test_lib", ], diff --git a/packages/core/test/bundling/animation_world/BUILD.bazel b/packages/core/test/bundling/animation_world/BUILD.bazel index 8a2bb98da1..0a02bfc4e0 100644 --- a/packages/core/test/bundling/animation_world/BUILD.bazel +++ b/packages/core/test/bundling/animation_world/BUILD.bazel @@ -37,7 +37,6 @@ js_expected_symbol_test( src = ":bundle.min_debug.js", golden = ":bundle.golden_symbols.json", tags = [ - "ivy-local", "ivy-only", ], ) diff --git a/packages/core/test/bundling/hello_world/BUILD.bazel b/packages/core/test/bundling/hello_world/BUILD.bazel index e577e4ba01..1b39e90032 100644 --- a/packages/core/test/bundling/hello_world/BUILD.bazel +++ b/packages/core/test/bundling/hello_world/BUILD.bazel @@ -31,7 +31,7 @@ ng_rollup_bundle( ts_library( name = "test_lib", - testonly = 1, + testonly = True, srcs = glob(["*_spec.ts"]), deps = [ "//packages:types", @@ -49,8 +49,6 @@ jasmine_node_test( ":bundle.min_debug.js", ], tags = [ - "ivy-jit", - "ivy-local", "ivy-only", ], deps = [":test_lib"], @@ -61,7 +59,6 @@ js_expected_symbol_test( src = ":bundle.min_debug.js", golden = ":bundle.golden_symbols.json", tags = [ - "ivy-local", "ivy-only", ], ) diff --git a/packages/core/test/bundling/hello_world_r2/BUILD.bazel b/packages/core/test/bundling/hello_world_r2/BUILD.bazel index 25d087e7c5..af5d8c17c3 100644 --- a/packages/core/test/bundling/hello_world_r2/BUILD.bazel +++ b/packages/core/test/bundling/hello_world_r2/BUILD.bazel @@ -31,7 +31,7 @@ ng_rollup_bundle( ts_library( name = "test_lib", - testonly = 1, + testonly = True, srcs = glob(["*_spec.ts"]), deps = [ "//packages:types", diff --git a/packages/core/test/bundling/injection/BUILD.bazel b/packages/core/test/bundling/injection/BUILD.bazel index 0609034d56..fb14b74e35 100644 --- a/packages/core/test/bundling/injection/BUILD.bazel +++ b/packages/core/test/bundling/injection/BUILD.bazel @@ -31,7 +31,7 @@ ng_rollup_bundle( ts_library( name = "test_lib", - testonly = 1, + testonly = True, srcs = glob(["*_spec.ts"]), deps = [ ":injection", diff --git a/packages/core/test/bundling/todo/BUILD.bazel b/packages/core/test/bundling/todo/BUILD.bazel index dc81608b26..677b98ff4a 100644 --- a/packages/core/test/bundling/todo/BUILD.bazel +++ b/packages/core/test/bundling/todo/BUILD.bazel @@ -37,7 +37,7 @@ ng_rollup_bundle( ts_library( name = "test_lib", - testonly = 1, + testonly = True, srcs = glob(["*_spec.ts"]), deps = [ "//packages:types", @@ -56,8 +56,6 @@ jasmine_node_test( ":bundle.min_debug.js", ], tags = [ - "ivy-jit", - "ivy-local", "ivy-only", ], deps = [":test_lib"], @@ -68,7 +66,6 @@ js_expected_symbol_test( src = ":bundle.min_debug.js", golden = ":bundle.golden_symbols.json", tags = [ - "ivy-local", "ivy-only", ], ) diff --git a/packages/core/test/bundling/todo_r2/BUILD.bazel b/packages/core/test/bundling/todo_r2/BUILD.bazel index 031a71f250..da54122564 100644 --- a/packages/core/test/bundling/todo_r2/BUILD.bazel +++ b/packages/core/test/bundling/todo_r2/BUILD.bazel @@ -41,7 +41,7 @@ ng_rollup_bundle( ts_library( name = "test_lib", - testonly = 1, + testonly = True, srcs = glob(["*_spec.ts"]), deps = [ "//packages:types", @@ -62,8 +62,6 @@ jasmine_node_test( ":bundle.min_debug.js", ], tags = [ - "ivy-jit", - "ivy-local", "ivy-only", ], deps = [":test_lib"], @@ -74,7 +72,6 @@ js_expected_symbol_test( src = ":bundle.min_debug.js", golden = ":bundle.golden_symbols.json", tags = [ - "ivy-local", "ivy-only", ], ) diff --git a/packages/core/test/ivy_local_empty_spec.ts b/packages/core/test/ivy_local_empty_spec.ts deleted file mode 100644 index e74dd0455a..0000000000 --- a/packages/core/test/ivy_local_empty_spec.ts +++ /dev/null @@ -1,19 +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 - */ - -/* - * This file exists to have at least one test target that can pass with --define=compile=local. - * - * TODO(alxhub): Clean up once actual Angular tests start passing with Ivy/AOT. - */ - -describe('empty test', () => { - it('should pass without doing anything', () => { - // If this fails, you probably need a new computer. - }); -}); diff --git a/packages/core/test/render3/BUILD.bazel b/packages/core/test/render3/BUILD.bazel index f8e40806a2..1c5b85a89e 100644 --- a/packages/core/test/render3/BUILD.bazel +++ b/packages/core/test/render3/BUILD.bazel @@ -4,7 +4,7 @@ load("//tools:defaults.bzl", "jasmine_node_test", "ts_library", "ts_web_test_sui ts_library( name = "render3_lib", - testonly = 1, + testonly = True, srcs = glob( ["**/*.ts"], exclude = [ @@ -32,7 +32,7 @@ ts_library( ts_library( name = "domino", - testonly = 1, + testonly = True, srcs = [ "domino.d.ts", "load_domino.ts", @@ -46,7 +46,7 @@ ts_library( ts_library( name = "render3_node_lib", - testonly = 1, + testonly = True, srcs = [], deps = [ ":domino", @@ -59,6 +59,10 @@ jasmine_node_test( bootstrap = [ "angular/packages/core/test/render3/load_domino", ], + tags = [ + "fixme-ivy-jit", + "fixme-ivy-local", + ], deps = [ ":render3_node_lib", "@ngdeps//zone.js", @@ -67,6 +71,10 @@ jasmine_node_test( ts_web_test_suite( name = "render3_web", + tags = [ + "fixme-ivy-jit", + "fixme-ivy-local", + ], deps = [ ":render3_lib", ], diff --git a/packages/core/test/render3/ivy/BUILD.bazel b/packages/core/test/render3/ivy/BUILD.bazel index 804b7dfabb..6250c60bc8 100644 --- a/packages/core/test/render3/ivy/BUILD.bazel +++ b/packages/core/test/render3/ivy/BUILD.bazel @@ -4,7 +4,7 @@ load("//tools:defaults.bzl", "jasmine_node_test", "ts_library", "ts_web_test_sui ts_library( name = "ivy_lib", - testonly = 1, + testonly = True, srcs = glob(["**/*.ts"]), deps = [ "//packages:types", diff --git a/packages/elements/BUILD.bazel b/packages/elements/BUILD.bazel index 8821aaafcc..6f33808bd9 100644 --- a/packages/elements/BUILD.bazel +++ b/packages/elements/BUILD.bazel @@ -29,7 +29,6 @@ ng_package( "//packages/elements/schematics:npm_package", ], tags = [ - "ivy-jit", "release-with-framework", ], deps = [ diff --git a/packages/elements/schematics/ng-add/BUILD.bazel b/packages/elements/schematics/ng-add/BUILD.bazel index 4416325d01..8c34393397 100644 --- a/packages/elements/schematics/ng-add/BUILD.bazel +++ b/packages/elements/schematics/ng-add/BUILD.bazel @@ -20,7 +20,7 @@ ts_library( ts_library( name = "test_lib", - testonly = 1, + testonly = True, srcs = glob( [ "index_spec.ts", diff --git a/packages/elements/test/BUILD.bazel b/packages/elements/test/BUILD.bazel index 1cb7d30a2c..384a1f5186 100644 --- a/packages/elements/test/BUILD.bazel +++ b/packages/elements/test/BUILD.bazel @@ -2,7 +2,7 @@ load("//tools:defaults.bzl", "jasmine_node_test", "ts_library", "ts_web_test_sui ts_library( name = "test_lib", - testonly = 1, + testonly = True, srcs = glob(["**/*.ts"]), deps = [ "//packages:types", @@ -20,6 +20,7 @@ ts_library( filegroup( name = "elements_test_bootstrap_scripts", + testonly = True, # do not sort srcs = [ "@ngdeps//node_modules/@webcomponents/custom-elements:src/native-shim.js", @@ -34,6 +35,10 @@ ts_web_test_suite( bootstrap = [ ":elements_test_bootstrap_scripts", ], + tags = [ + "fixme-ivy-jit", + "fixme-ivy-local", + ], # do not sort deps = [ ":test_lib", diff --git a/packages/forms/BUILD.bazel b/packages/forms/BUILD.bazel index 668f0b47eb..2dca4b2d70 100644 --- a/packages/forms/BUILD.bazel +++ b/packages/forms/BUILD.bazel @@ -23,8 +23,6 @@ ng_package( srcs = ["package.json"], entry_point = "packages/forms/index.js", tags = [ - "ivy-jit", - "ivy-local", "release-with-framework", ], deps = [ diff --git a/packages/forms/test/BUILD.bazel b/packages/forms/test/BUILD.bazel index 781b2d4762..54309a2d9b 100644 --- a/packages/forms/test/BUILD.bazel +++ b/packages/forms/test/BUILD.bazel @@ -2,7 +2,7 @@ load("//tools:defaults.bzl", "jasmine_node_test", "ts_library", "ts_web_test_sui ts_library( name = "test_lib", - testonly = 1, + testonly = True, srcs = glob(["**/*.ts"]), deps = [ "//packages/core", @@ -18,6 +18,10 @@ ts_library( jasmine_node_test( name = "test", bootstrap = ["angular/tools/testing/init_node_spec.js"], + tags = [ + "fixme-ivy-jit", + "fixme-ivy-local", + ], deps = [ ":test_lib", "//tools/testing:node", @@ -26,6 +30,10 @@ jasmine_node_test( ts_web_test_suite( name = "test_web", + tags = [ + "fixme-ivy-jit", + "fixme-ivy-local", + ], deps = [ ":test_lib", ], diff --git a/packages/http/BUILD.bazel b/packages/http/BUILD.bazel index 66b8230f1d..a5f3adbd78 100644 --- a/packages/http/BUILD.bazel +++ b/packages/http/BUILD.bazel @@ -26,7 +26,6 @@ ng_package( ], entry_point = "packages/http/index.js", tags = [ - "ivy-jit", "release-with-framework", ], deps = [ diff --git a/packages/http/test/BUILD.bazel b/packages/http/test/BUILD.bazel index efee4f4a72..914536ffce 100644 --- a/packages/http/test/BUILD.bazel +++ b/packages/http/test/BUILD.bazel @@ -2,7 +2,7 @@ load("//tools:defaults.bzl", "jasmine_node_test", "ts_library", "ts_web_test_sui ts_library( name = "test_lib", - testonly = 1, + testonly = True, srcs = glob(["**/*.ts"]), deps = [ "//packages/core", @@ -18,6 +18,7 @@ ts_library( jasmine_node_test( name = "test", bootstrap = ["angular/tools/testing/init_node_spec.js"], + tags = ["fixme-ivy-local"], deps = [ ":test_lib", "//tools/testing:node", @@ -26,6 +27,7 @@ jasmine_node_test( ts_web_test_suite( name = "test_web", + tags = ["fixme-ivy-local"], deps = [ ":test_lib", "@ngdeps//karma", diff --git a/packages/language-service/test/BUILD.bazel b/packages/language-service/test/BUILD.bazel index cee817570a..9f68f8df2c 100644 --- a/packages/language-service/test/BUILD.bazel +++ b/packages/language-service/test/BUILD.bazel @@ -2,7 +2,7 @@ load("//tools:defaults.bzl", "jasmine_node_test", "ts_library") ts_library( name = "test_lib", - testonly = 1, + testonly = True, srcs = glob(["**/*.ts"]), deps = [ "//packages:types", @@ -22,7 +22,10 @@ jasmine_node_test( "//packages/core:npm_package", "//packages/forms:npm_package", ], - # disable since tests are running but not yet passing + tags = [ + "fixme-ivy-jit", + "fixme-ivy-local", + ], deps = [ ":test_lib", "//tools/testing:node", diff --git a/packages/platform-browser-dynamic/test/BUILD.bazel b/packages/platform-browser-dynamic/test/BUILD.bazel index 487a48fc44..c755d418e5 100644 --- a/packages/platform-browser-dynamic/test/BUILD.bazel +++ b/packages/platform-browser-dynamic/test/BUILD.bazel @@ -2,7 +2,7 @@ load("//tools:defaults.bzl", "jasmine_node_test", "ts_library", "ts_web_test_sui ts_library( name = "test_lib", - testonly = 1, + testonly = True, srcs = glob(["**/*.ts"]), deps = [ "//packages:types", @@ -18,6 +18,7 @@ ts_library( jasmine_node_test( name = "test", bootstrap = ["angular/tools/testing/init_node_spec.js"], + tags = ["fixme-ivy-jit"], deps = [ ":test_lib", "//tools/testing:node", @@ -30,6 +31,10 @@ ts_web_test_suite( "//packages/platform-browser/test:static_assets/test.html", "//packages/platform-browser/test:browser/static_assets/200.html", ], + tags = [ + "fixme-ivy-jit", + "fixme-ivy-local", + ], deps = [ ":test_lib", ], diff --git a/packages/platform-browser/BUILD.bazel b/packages/platform-browser/BUILD.bazel index b4c911846f..2bcb9e5738 100644 --- a/packages/platform-browser/BUILD.bazel +++ b/packages/platform-browser/BUILD.bazel @@ -29,8 +29,6 @@ ng_package( ], entry_point = "packages/platform-browser/index.js", tags = [ - "ivy-jit", - "ivy-local", "release-with-framework", ], deps = [ diff --git a/packages/platform-browser/animations/test/BUILD.bazel b/packages/platform-browser/animations/test/BUILD.bazel new file mode 100644 index 0000000000..6ed6859842 --- /dev/null +++ b/packages/platform-browser/animations/test/BUILD.bazel @@ -0,0 +1,46 @@ +load("//tools:defaults.bzl", "jasmine_node_test", "ts_library", "ts_web_test_suite") + +ts_library( + name = "test_lib", + testonly = True, + srcs = glob(["**/*.ts"]), + deps = [ + "//packages:types", + "//packages/animations", + "//packages/animations/browser", + "//packages/animations/browser/testing", + "//packages/common", + "//packages/compiler", + "//packages/core", + "//packages/core/testing", + "//packages/platform-browser", + "//packages/platform-browser-dynamic", + "//packages/platform-browser/animations", + "//packages/platform-browser/testing", + "@rxjs", + ], +) + +jasmine_node_test( + name = "test", + bootstrap = ["angular/tools/testing/init_node_spec.js"], + tags = [ + "fixme-ivy-jit", + "fixme-ivy-local", + ], + deps = [ + ":test_lib", + "//tools/testing:node", + ], +) + +ts_web_test_suite( + name = "test_web", + tags = [ + "fixme-ivy-jit", + "fixme-ivy-local", + ], + deps = [ + ":test_lib", + ], +) diff --git a/packages/platform-browser/test/animation/animation_renderer_spec.ts b/packages/platform-browser/animations/test/animation_renderer_spec.ts similarity index 99% rename from packages/platform-browser/test/animation/animation_renderer_spec.ts rename to packages/platform-browser/animations/test/animation_renderer_spec.ts index 8373cb1e93..0b46f11f6a 100644 --- a/packages/platform-browser/test/animation/animation_renderer_spec.ts +++ b/packages/platform-browser/animations/test/animation_renderer_spec.ts @@ -11,8 +11,9 @@ import {Component, Injectable, NgZone, RendererFactory2, RendererType2, ViewChil import {TestBed} from '@angular/core/testing'; import {BrowserAnimationsModule, ɵAnimationRendererFactory as AnimationRendererFactory} from '@angular/platform-browser/animations'; import {DomRendererFactory2} from '@angular/platform-browser/src/dom/dom_renderer'; -import {InjectableAnimationEngine} from '../../animations/src/providers'; + import {el} from '../../testing/src/browser_util'; +import {InjectableAnimationEngine} from '../src/providers'; (function() { if (isNode) return; @@ -282,7 +283,7 @@ import {el} from '../../testing/src/browser_util'; @Component({ selector: 'my-cmp', template: ` -
+
`, animations: [trigger('myAnimation', [])] }) diff --git a/packages/platform-browser/test/animation/browser_animation_builder_spec.ts b/packages/platform-browser/animations/test/browser_animation_builder_spec.ts similarity index 97% rename from packages/platform-browser/test/animation/browser_animation_builder_spec.ts rename to packages/platform-browser/animations/test/browser_animation_builder_spec.ts index 66202e035e..49c2b53222 100644 --- a/packages/platform-browser/test/animation/browser_animation_builder_spec.ts +++ b/packages/platform-browser/animations/test/browser_animation_builder_spec.ts @@ -12,8 +12,8 @@ import {Component, ViewChild} from '@angular/core'; import {TestBed, fakeAsync, flushMicrotasks} from '@angular/core/testing'; import {NoopAnimationsModule} from '@angular/platform-browser/animations'; -import {BrowserAnimationBuilder} from '../../animations/src/animation_builder'; import {el} from '../../testing/src/browser_util'; +import {BrowserAnimationBuilder} from '../src/animation_builder'; { describe('BrowserAnimationBuilder', () => { diff --git a/packages/platform-browser/test/BUILD.bazel b/packages/platform-browser/test/BUILD.bazel index bd170e900e..babbc5d0c7 100644 --- a/packages/platform-browser/test/BUILD.bazel +++ b/packages/platform-browser/test/BUILD.bazel @@ -7,7 +7,7 @@ exports_files([ ts_library( name = "test_lib", - testonly = 1, + testonly = True, srcs = glob(["**/*.ts"]), deps = [ "//packages:types", @@ -29,7 +29,10 @@ ts_library( jasmine_node_test( name = "test", bootstrap = ["angular/tools/testing/init_node_spec.js"], - # dissable since tests are running but not yet passing + tags = [ + "fixme-ivy-jit", + "fixme-ivy-local", + ], deps = [ ":test_lib", "//tools/testing:node", @@ -41,6 +44,10 @@ ts_web_test_suite( static_files = [ ":static_assets/test.html", ], + tags = [ + "fixme-ivy-jit", + "fixme-ivy-local", + ], deps = [ ":test_lib", ], diff --git a/packages/platform-server/test/BUILD.bazel b/packages/platform-server/test/BUILD.bazel index c5e582fd03..05638b5ade 100644 --- a/packages/platform-server/test/BUILD.bazel +++ b/packages/platform-server/test/BUILD.bazel @@ -2,7 +2,7 @@ load("//tools:defaults.bzl", "jasmine_node_test", "ts_library") ts_library( name = "test_lib", - testonly = 1, + testonly = True, srcs = glob(["**/*.ts"]), deps = [ "//packages:types", @@ -25,6 +25,10 @@ ts_library( jasmine_node_test( name = "test", bootstrap = ["angular/tools/testing/init_node_spec.js"], + tags = [ + "fixme-ivy-jit", + "fixme-ivy-local", + ], deps = [ ":test_lib", "//tools/testing:node", diff --git a/packages/platform-webworker/BUILD.bazel b/packages/platform-webworker/BUILD.bazel index c21890fc21..42ad5ca029 100644 --- a/packages/platform-webworker/BUILD.bazel +++ b/packages/platform-webworker/BUILD.bazel @@ -25,7 +25,6 @@ ng_package( srcs = ["package.json"], entry_point = "packages/platform-webworker/index.js", tags = [ - "ivy-jit", "release-with-framework", ], deps = [ diff --git a/packages/platform-webworker/test/BUILD.bazel b/packages/platform-webworker/test/BUILD.bazel index f71440b965..9b02be47e2 100644 --- a/packages/platform-webworker/test/BUILD.bazel +++ b/packages/platform-webworker/test/BUILD.bazel @@ -2,7 +2,7 @@ load("//tools:defaults.bzl", "jasmine_node_test", "ts_library", "ts_web_test_sui ts_library( name = "test_lib", - testonly = 1, + testonly = True, srcs = glob(["**/*.ts"]), deps = [ "//packages:types", @@ -20,6 +20,7 @@ ts_library( jasmine_node_test( name = "test", bootstrap = ["angular/tools/testing/init_node_spec.js"], + tags = ["fixme-ivy-local"], deps = [ ":test_lib", "//tools/testing:node", @@ -28,6 +29,10 @@ jasmine_node_test( ts_web_test_suite( name = "test_web", + tags = [ + "fixme-ivy-jit", + "fixme-ivy-local", + ], deps = [ ":test_lib", ], diff --git a/packages/router/BUILD.bazel b/packages/router/BUILD.bazel index 17ecee93c9..9580935f81 100644 --- a/packages/router/BUILD.bazel +++ b/packages/router/BUILD.bazel @@ -29,8 +29,6 @@ ng_package( ], entry_point = "packages/router/index.js", tags = [ - "ivy-jit", - "ivy-local", "release-with-framework", ], deps = [ diff --git a/packages/router/test/BUILD.bazel b/packages/router/test/BUILD.bazel index aca1627265..570e85c11f 100644 --- a/packages/router/test/BUILD.bazel +++ b/packages/router/test/BUILD.bazel @@ -2,7 +2,7 @@ load("//tools:defaults.bzl", "jasmine_node_test", "ts_library", "ts_web_test_sui ts_library( name = "test_lib", - testonly = 1, + testonly = True, srcs = glob(["**/*.ts"]), deps = [ "//packages/common", @@ -23,6 +23,10 @@ ts_library( jasmine_node_test( name = "test", bootstrap = ["angular/tools/testing/init_node_spec.js"], + tags = [ + "fixme-ivy-jit", + "fixme-ivy-local", + ], deps = [ ":test_lib", "//tools/testing:node", @@ -31,6 +35,10 @@ jasmine_node_test( ts_web_test_suite( name = "test_web", + tags = [ + "fixme-ivy-jit", + "fixme-ivy-local", + ], deps = [ ":test_lib", ], diff --git a/packages/router/test/aot_ngsummary_test/BUILD.bazel b/packages/router/test/aot_ngsummary_test/BUILD.bazel index 8f214fcecb..569aec5b8b 100644 --- a/packages/router/test/aot_ngsummary_test/BUILD.bazel +++ b/packages/router/test/aot_ngsummary_test/BUILD.bazel @@ -2,7 +2,9 @@ load("//tools:defaults.bzl", "jasmine_node_test", "ng_module", "ts_library", "ts ng_module( name = "aot_routing_module", + testonly = True, srcs = ["aot_router_module.ts"], + tags = ["no-ivy-jit"], deps = [ "//packages/core", "//packages/router", @@ -12,8 +14,12 @@ ng_module( ts_library( name = "aot_test_lib", - testonly = 1, + testonly = True, srcs = ["aot_router_bootstrap.spec.ts"], + tags = [ + "fixme-ivy-local", + "no-ivy-jit", + ], deps = [ ":aot_routing_module", "//packages/core", @@ -26,6 +32,10 @@ ts_library( jasmine_node_test( name = "test", bootstrap = ["angular/tools/testing/init_node_spec.js"], + tags = [ + "fixme-ivy-local", + "no-ivy-jit", + ], deps = [ ":aot_test_lib", "//tools/testing:node", diff --git a/packages/router/upgrade/test/BUILD.bazel b/packages/router/upgrade/test/BUILD.bazel index 9486783a34..6f37a5d9da 100644 --- a/packages/router/upgrade/test/BUILD.bazel +++ b/packages/router/upgrade/test/BUILD.bazel @@ -2,7 +2,7 @@ load("//tools:defaults.bzl", "ts_library", "ts_web_test_suite") ts_library( name = "test_lib", - testonly = 1, + testonly = True, srcs = glob(["**/*.ts"]), deps = [ "//packages/common", @@ -15,6 +15,10 @@ ts_library( ts_web_test_suite( name = "test_web", + tags = [ + "fixme-ivy-jit", + "fixme-ivy-local", + ], deps = [ ":test_lib", ], diff --git a/packages/service-worker/cli/BUILD.bazel b/packages/service-worker/cli/BUILD.bazel index ec952165f4..97d0adb3d0 100644 --- a/packages/service-worker/cli/BUILD.bazel +++ b/packages/service-worker/cli/BUILD.bazel @@ -5,9 +5,7 @@ load("//tools:defaults.bzl", "ng_rollup_bundle", "ts_library") ts_library( name = "cli", srcs = glob( - [ - "*.ts", - ], + ["**/*.ts"], ), tsconfig = ":tsconfig.json", deps = [ diff --git a/packages/service-worker/test/BUILD.bazel b/packages/service-worker/test/BUILD.bazel index 92ac98953e..01fb6b89e7 100644 --- a/packages/service-worker/test/BUILD.bazel +++ b/packages/service-worker/test/BUILD.bazel @@ -2,7 +2,7 @@ load("//tools:defaults.bzl", "jasmine_node_test", "ts_library", "ts_web_test_sui ts_library( name = "test_lib", - testonly = 1, + testonly = True, srcs = glob(["**/*.ts"]), deps = [ "//packages:types", @@ -20,6 +20,7 @@ ts_library( jasmine_node_test( name = "test", bootstrap = ["angular/tools/testing/init_node_spec.js"], + tags = ["fixme-ivy-local"], deps = [ ":test_lib", "//tools/testing:node", @@ -28,6 +29,7 @@ jasmine_node_test( ts_web_test_suite( name = "test_web", + tags = ["fixme-ivy-local"], deps = [ ":test_lib", ], diff --git a/packages/service-worker/testing/BUILD.bazel b/packages/service-worker/testing/BUILD.bazel index 0e72cfe4c7..e35c353647 100644 --- a/packages/service-worker/testing/BUILD.bazel +++ b/packages/service-worker/testing/BUILD.bazel @@ -4,7 +4,7 @@ load("//tools:defaults.bzl", "ng_module") ng_module( name = "testing", - testonly = 1, + testonly = True, srcs = glob(["**/*.ts"]), module_name = "@angular/service-worker/testing", deps = [ diff --git a/packages/service-worker/worker/test/BUILD.bazel b/packages/service-worker/worker/test/BUILD.bazel index 15b911657e..5cbb07b681 100644 --- a/packages/service-worker/worker/test/BUILD.bazel +++ b/packages/service-worker/worker/test/BUILD.bazel @@ -2,7 +2,7 @@ load("//tools:defaults.bzl", "jasmine_node_test", "ts_library") ts_library( name = "test_lib", - testonly = 1, + testonly = True, srcs = glob( ["**/*.ts"], ), @@ -16,7 +16,6 @@ ts_library( jasmine_node_test( name = "test", - srcs = [], deps = [ ":test_lib", ], diff --git a/packages/service-worker/worker/testing/BUILD.bazel b/packages/service-worker/worker/testing/BUILD.bazel index 3dfaa44310..af19335e0b 100644 --- a/packages/service-worker/worker/testing/BUILD.bazel +++ b/packages/service-worker/worker/testing/BUILD.bazel @@ -4,7 +4,7 @@ load("//tools:defaults.bzl", "ts_library") ts_library( name = "testing", - testonly = 1, + testonly = True, srcs = glob(["**/*.ts"]), deps = [ "//packages:types", diff --git a/packages/upgrade/BUILD.bazel b/packages/upgrade/BUILD.bazel index 31f59a81f3..8d9fa3c2ed 100644 --- a/packages/upgrade/BUILD.bazel +++ b/packages/upgrade/BUILD.bazel @@ -28,8 +28,6 @@ ng_package( ], entry_point = "packages/upgrade/index.js", tags = [ - "ivy-jit", - "ivy-local", "release-with-framework", ], deps = [ diff --git a/packages/upgrade/test/BUILD.bazel b/packages/upgrade/test/BUILD.bazel index 31825435e0..3389c13e85 100644 --- a/packages/upgrade/test/BUILD.bazel +++ b/packages/upgrade/test/BUILD.bazel @@ -2,7 +2,7 @@ load("//tools:defaults.bzl", "jasmine_node_test", "ts_library", "ts_web_test_sui ts_library( name = "test_lib", - testonly = 1, + testonly = True, srcs = glob(["**/*.ts"]), deps = [ "//packages:types", @@ -22,6 +22,10 @@ ts_web_test_suite( static_files = [ "//:angularjs_scripts", ], + tags = [ + "fixme-ivy-jit", + "fixme-ivy-local", + ], deps = [ ":test_lib", ], diff --git a/scripts/build-packages-dist.sh b/scripts/build-packages-dist.sh index 90aa89fa61..0bc3f978ad 100755 --- a/scripts/build-packages-dist.sh +++ b/scripts/build-packages-dist.sh @@ -61,6 +61,7 @@ buildTargetPackages "$LEGACY_TARGETS" "dist/packages-dist" "legacy" "Production" || "${CIRCLE_PROJECT_REPONAME-}" != "angular" ]] && exit 0 +# TODO: do we actually need to query for jit and local targets? shouldn't this be all the packages that we publish to npm? IVY_JIT_TARGETS=`bazel query --output=label 'attr("tags", "\[.*ivy-jit.*\]", //packages/...) intersect kind(".*_package", //packages/...)'` IVY_LOCAL_TARGETS=`bazel query --output=label 'attr("tags", "\[.*ivy-local.*\]", //packages/...) intersect kind(".*_package", //packages/...)'` diff --git a/tools/defaults.bzl b/tools/defaults.bzl index 7bea822e9f..75e3ae78e0 100644 --- a/tools/defaults.bzl +++ b/tools/defaults.bzl @@ -44,7 +44,7 @@ PKG_GROUP_REPLACEMENTS = { ]""" % ",\n ".join(["\"%s\"" % s for s in ANGULAR_SCOPED_PACKAGES]), } -def ts_library(tsconfig = None, testonly = False, deps = [], **kwargs): +def ts_library(tsconfig = None, testonly = False, deps = [], tags = [], **kwargs): """Default values for ts_library""" deps = deps + ["@ngdeps//tslib"] if testonly: @@ -56,15 +56,17 @@ def ts_library(tsconfig = None, testonly = False, deps = [], **kwargs): tsconfig = _DEFAULT_TSCONFIG_TEST else: tsconfig = _DEFAULT_TSCONFIG_BUILD + _ts_library( tsconfig = tsconfig, testonly = testonly, deps = deps, node_modules = _DEFAULT_TS_TYPINGS, + tags = ivy_tags(tags), **kwargs ) -def ng_module(name, tsconfig = None, entry_point = None, testonly = False, deps = [], **kwargs): +def ng_module(name, tsconfig = None, entry_point = None, testonly = False, deps = [], tags = [], **kwargs): """Default values for ng_module""" deps = deps + ["@ngdeps//tslib"] if testonly: @@ -88,6 +90,7 @@ def ng_module(name, tsconfig = None, entry_point = None, testonly = False, deps compiler = _INTERNAL_NG_MODULE_COMPILER, ng_xi18n = _INTERNAL_NG_MODULE_XI18N, node_modules = _DEFAULT_TS_TYPINGS, + tags = ivy_tags(tags), **kwargs ) @@ -149,7 +152,7 @@ def npm_package(name, replacements = {}, **kwargs): **kwargs ) -def ts_web_test_suite(bootstrap = [], deps = [], **kwargs): +def ts_web_test_suite(bootstrap = [], deps = [], tags = [], **kwargs): """Default values for ts_web_test_suite""" if not bootstrap: bootstrap = ["//:web_test_bootstrap_scripts"] @@ -172,6 +175,7 @@ def ts_web_test_suite(bootstrap = [], deps = [], **kwargs): # "@io_bazel_rules_webtesting//browsers:firefox-local", # TODO(alexeagle): add remote browsers on SauceLabs ], + tags = ivy_tags(tags), **kwargs ) @@ -183,7 +187,7 @@ def nodejs_binary(**kwargs): **kwargs ) -def jasmine_node_test(deps = [], **kwargs): +def jasmine_node_test(deps = [], tags = [], **kwargs): """Default values for jasmine_node_test""" deps = deps + [ # Very common dependencies for tests @@ -198,6 +202,7 @@ def jasmine_node_test(deps = [], **kwargs): ] _jasmine_node_test( deps = deps, + tags = ivy_tags(tags), # Pass-thru --define=compile=foo as an environment variable configuration_env_vars = ["compile"], **kwargs @@ -212,3 +217,16 @@ def ng_rollup_bundle(deps = [], **kwargs): deps = deps, **kwargs ) + +def ivy_tags(tags): + """Sets inclusive ivy-jit and ivy-local tags""" + + # Set the tags by default unless no-ivy-jit, no-ivy-local, fixme-ivy-jit, or fixme-ivy-local were specified. + # We should remove this and use only explicitly defined tags once https://github.com/bazelbuild/rules_nodejs/pull/388 is fixed. + if not tags: + tags = ["ivy-jit", "ivy-local"] + elif "no-ivy-jit" not in tags and "fixme-ivy-jit" not in tags: + tags = tags + ["ivy-jit"] + elif "no-ivy-local" not in tags and "fixme-ivy-local" not in tags: + tags = tags + ["ivy-local"] + return tags