diff --git a/integration/cli-hello-world-ivy-compat/BUILD.bazel b/integration/cli-hello-world-ivy-compat/BUILD.bazel index 087eb8e3e7f..317f3bf7925 100644 --- a/integration/cli-hello-world-ivy-compat/BUILD.bazel +++ b/integration/cli-hello-world-ivy-compat/BUILD.bazel @@ -2,6 +2,6 @@ load("//integration:index.bzl", "ng_integration_test") ng_integration_test( name = "test", - commands = "payload_size_tracking", setup_chromium = True, + track_payload_size = "cli-hello-world-ivy-compat", ) diff --git a/integration/cli-hello-world-ivy-i18n/BUILD.bazel b/integration/cli-hello-world-ivy-i18n/BUILD.bazel index 087eb8e3e7f..f7c03388c9a 100644 --- a/integration/cli-hello-world-ivy-i18n/BUILD.bazel +++ b/integration/cli-hello-world-ivy-i18n/BUILD.bazel @@ -2,6 +2,6 @@ load("//integration:index.bzl", "ng_integration_test") ng_integration_test( name = "test", - commands = "payload_size_tracking", setup_chromium = True, + track_payload_size = "cli-hello-world-ivy-i18n", ) diff --git a/integration/cli-hello-world-ivy-minimal/BUILD.bazel b/integration/cli-hello-world-ivy-minimal/BUILD.bazel index 087eb8e3e7f..069e20d7926 100644 --- a/integration/cli-hello-world-ivy-minimal/BUILD.bazel +++ b/integration/cli-hello-world-ivy-minimal/BUILD.bazel @@ -2,6 +2,6 @@ load("//integration:index.bzl", "ng_integration_test") ng_integration_test( name = "test", - commands = "payload_size_tracking", setup_chromium = True, + track_payload_size = "cli-hello-world-ivy-minimal", ) diff --git a/integration/cli-hello-world-lazy/BUILD.bazel b/integration/cli-hello-world-lazy/BUILD.bazel index 087eb8e3e7f..c33a1cce355 100644 --- a/integration/cli-hello-world-lazy/BUILD.bazel +++ b/integration/cli-hello-world-lazy/BUILD.bazel @@ -2,6 +2,6 @@ load("//integration:index.bzl", "ng_integration_test") ng_integration_test( name = "test", - commands = "payload_size_tracking", setup_chromium = True, + track_payload_size = "cli-hello-world-lazy", ) diff --git a/integration/cli-hello-world/BUILD.bazel b/integration/cli-hello-world/BUILD.bazel index 087eb8e3e7f..04ee97fe997 100644 --- a/integration/cli-hello-world/BUILD.bazel +++ b/integration/cli-hello-world/BUILD.bazel @@ -2,6 +2,6 @@ load("//integration:index.bzl", "ng_integration_test") ng_integration_test( name = "test", - commands = "payload_size_tracking", setup_chromium = True, + track_payload_size = "cli-hello-world", ) diff --git a/integration/forms/BUILD.bazel b/integration/forms/BUILD.bazel index 087eb8e3e7f..6fc3fef04f9 100644 --- a/integration/forms/BUILD.bazel +++ b/integration/forms/BUILD.bazel @@ -2,6 +2,6 @@ load("//integration:index.bzl", "ng_integration_test") ng_integration_test( name = "test", - commands = "payload_size_tracking", setup_chromium = True, + track_payload_size = "forms", ) diff --git a/integration/hello_world__closure/BUILD.bazel b/integration/hello_world__closure/BUILD.bazel index 9e147897a4c..905707ba692 100644 --- a/integration/hello_world__closure/BUILD.bazel +++ b/integration/hello_world__closure/BUILD.bazel @@ -2,10 +2,10 @@ load("//integration:index.bzl", "ng_integration_test") ng_integration_test( name = "test", - # TODO: Re-enable the payload_size_tracking command: + # TODO: Re-enable size-tracking: # We should define ngDevMode to false in Closure, but --define only works in the global scope. # With ngDevMode not being set to false, this size tracking test provides little value but a lot of # headache to continue updating the size. - # commands = "payload_size_tracking", + # track_payload_size = "hello_world_closure", setup_chromium = True, ) diff --git a/integration/index.bzl b/integration/index.bzl index 552a32d99ac..866fb6ccc03 100644 --- a/integration/index.bzl +++ b/integration/index.bzl @@ -38,6 +38,7 @@ def _ng_integration_test(name, setup_chromium = False, **kwargs): use_view_engine_packages = kwargs.pop("use_view_engine_packages", []) toolchains = kwargs.pop("toolchains", []) environment = kwargs.pop("environment", {}) + track_payload_size = kwargs.pop("track_payload_size", None) data = kwargs.pop("data", []) data += [ @@ -56,18 +57,16 @@ def _ng_integration_test(name, setup_chromium = False, **kwargs): # By default run `yarn install` followed by `yarn test` using the tools linked # into the integration tests (using the `tool_mappings` attribute). - commands = [ + commands = kwargs.pop("commands", [ "yarn install --cache-folder ./.yarn_local_cache", "yarn test", - ] + ]) - command_type = kwargs.pop("commands", "default") - - if command_type == "payload_size_tracking": + if track_payload_size: commands += [ "yarn build", # TODO: Replace the track payload-size script with a RBE and Windows-compatible script. - "$(rootpath //:scripts/ci/track-payload-size.sh) %s dist/*.js true $${RUNFILES}/angular/$(rootpath //goldens:size-tracking/integration-payloads.json)" % name, + "$(rootpath //:scripts/ci/track-payload-size.sh) %s 'dist/*.js' true $${RUNFILES}/angular/$(rootpath //goldens:size-tracking/integration-payloads.json)" % track_payload_size, ] data += [ "//goldens:size-tracking/integration-payloads.json",