From 388578fec946237e24521509bd887efc243a86d9 Mon Sep 17 00:00:00 2001 From: Kara Erickson Date: Tue, 20 Aug 2019 16:15:20 -0700 Subject: [PATCH] Revert "ci: remove material-unit-tests failure blocklist (#32138)" (#32226) This reverts commit 0660903784a32261f2ba5e057088166441779b75 so we can add some tests to the blocklist. PR Close #32226 --- .github/CODEOWNERS | 8 +++++++ scripts/ci/run_angular_material_unit_tests.sh | 4 ++++ .../angular_material_test_blocklist.js | 20 ++++++++++++++++ tools/material-ci/instructions.md | 24 +++++++++++++++++++ 4 files changed, 56 insertions(+) create mode 100644 tools/material-ci/angular_material_test_blocklist.js create mode 100644 tools/material-ci/instructions.md diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS index 54f5afb835..8c4de2a1d3 100644 --- a/.github/CODEOWNERS +++ b/.github/CODEOWNERS @@ -911,6 +911,14 @@ testing/** @angular/fw-test +# ================================================ +# Material CI +# ================================================ + +/tools/material-ci/** @angular/fw-core @angular/framework-global-approvers + + + # ================================================ # Public API # ================================================ diff --git a/scripts/ci/run_angular_material_unit_tests.sh b/scripts/ci/run_angular_material_unit_tests.sh index 2fb1eb1eee..b044daf953 100755 --- a/scripts/ci/run_angular_material_unit_tests.sh +++ b/scripts/ci/run_angular_material_unit_tests.sh @@ -21,6 +21,10 @@ cd ${MATERIAL_REPO_TMP_DIR} # Note that it's not necessary to perform a yarn install, as Bazel performs its own yarn install. node ${angular_dir}/scripts/ci/update-deps-to-dist-packages.js ${MATERIAL_REPO_TMP_DIR}/package.json ${angular_dir}/dist/packages-dist-ivy-aot/ +# Append the test blocklist into angular/material2's karma-test-shim.js. +# This filters out known-failing tests because the goal is to prevent regressions. +cat ${angular_dir}/tools/material-ci/angular_material_test_blocklist.js >> ./test/karma-test-shim.js + # Create a symlink for the Bazel binary installed through NPM, as running through Yarn introduces OOM errors. ./scripts/circleci/setup_bazel_binary.sh diff --git a/tools/material-ci/angular_material_test_blocklist.js b/tools/material-ci/angular_material_test_blocklist.js new file mode 100644 index 0000000000..a66259a878 --- /dev/null +++ b/tools/material-ci/angular_material_test_blocklist.js @@ -0,0 +1,20 @@ +/** + * @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 + */ + +/** + * Blocklist of unit tests from angular/material2 with ivy that are skipped when running on + * angular/angular. As bugs are resolved, items should be removed from this blocklist. + * + * The `notes` section should be used to keep track of specific issues associated with the failures. + */ + +// clang-format off +// tslint:disable + +window.testBlocklist = {}; +// clang-format on \ No newline at end of file diff --git a/tools/material-ci/instructions.md b/tools/material-ci/instructions.md new file mode 100644 index 0000000000..804e1b6c63 --- /dev/null +++ b/tools/material-ci/instructions.md @@ -0,0 +1,24 @@ +### Unit tests for Angular CDK/Material +The unit tests from angular/material2 run on CircleCI under the `material-unit-tests` job. +Known failing tests are skipped based on the blocklist in +`tools/material-ci/angular_material_test_blocklist.js`. Whenever the root cause of a known failure +is identified, the `notes` field for the corresponding tests should be updated. Whenever a failure +is resolved, the corresponding tests should be removed from the blocklist. + +### Debugging +To debug a failure, you need to work against the angular/material2 repo: +1. Clone `angular/material2` +2. Checkout the `ivy-2019` branch +3. Run `yarn` +4. Run `scripts/ivy/install-angular.sh path/to/local/angular/repo` +5. Run `gulp test` + +### Regenerating the blocklist +If a problem has been fixed, you can regenerate the blocklist by: +1. Clone `angular/material2` +2. Checkout the `ivy-2019` branch +3. Run `yarn` +4. Run `scripts/ivy/install-angular.sh path/to/local/angular/repo` +5. Run `gulp test`. Let it finish. It will take a few minutes. +6. Run `scripts/ivy/generate-blocklist.js path/to/local/angular/repo` +7. Copy the new blocklist from `dist/angular_material_test_blocklist.js`