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
This commit is contained in:

committed by
Alex Rickabaugh

parent
361eaf1888
commit
4237c34c78
@ -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
|
||||
|
Reference in New Issue
Block a user