Skip to content

Commit 388578f

Browse files
karaAndrewKushnir
authored andcommitted
Revert "ci: remove material-unit-tests failure blocklist (angular#32138)" (angular#32226)
This reverts commit 0660903 so we can add some tests to the blocklist. PR Close angular#32226
1 parent dd6070a commit 388578f

File tree

4 files changed

+56
-0
lines changed

4 files changed

+56
-0
lines changed

.github/CODEOWNERS

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -911,6 +911,14 @@ testing/** @angular/fw-test
911911

912912

913913

914+
# ================================================
915+
# Material CI
916+
# ================================================
917+
918+
/tools/material-ci/** @angular/fw-core @angular/framework-global-approvers
919+
920+
921+
914922
# ================================================
915923
# Public API
916924
# ================================================

scripts/ci/run_angular_material_unit_tests.sh

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,10 @@ cd ${MATERIAL_REPO_TMP_DIR}
2121
# Note that it's not necessary to perform a yarn install, as Bazel performs its own yarn install.
2222
node ${angular_dir}/scripts/ci/update-deps-to-dist-packages.js ${MATERIAL_REPO_TMP_DIR}/package.json ${angular_dir}/dist/packages-dist-ivy-aot/
2323

24+
# Append the test blocklist into angular/material2's karma-test-shim.js.
25+
# This filters out known-failing tests because the goal is to prevent regressions.
26+
cat ${angular_dir}/tools/material-ci/angular_material_test_blocklist.js >> ./test/karma-test-shim.js
27+
2428
# Create a symlink for the Bazel binary installed through NPM, as running through Yarn introduces OOM errors.
2529
./scripts/circleci/setup_bazel_binary.sh
2630

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
/**
2+
* @license
3+
* Copyright Google Inc. All Rights Reserved.
4+
*
5+
* Use of this source code is governed by an MIT-style license that can be
6+
* found in the LICENSE file at https://angular.io/license
7+
*/
8+
9+
/**
10+
* Blocklist of unit tests from angular/material2 with ivy that are skipped when running on
11+
* angular/angular. As bugs are resolved, items should be removed from this blocklist.
12+
*
13+
* The `notes` section should be used to keep track of specific issues associated with the failures.
14+
*/
15+
16+
// clang-format off
17+
// tslint:disable
18+
19+
window.testBlocklist = {};
20+
// clang-format on

tools/material-ci/instructions.md

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
### Unit tests for Angular CDK/Material
2+
The unit tests from angular/material2 run on CircleCI under the `material-unit-tests` job.
3+
Known failing tests are skipped based on the blocklist in
4+
`tools/material-ci/angular_material_test_blocklist.js`. Whenever the root cause of a known failure
5+
is identified, the `notes` field for the corresponding tests should be updated. Whenever a failure
6+
is resolved, the corresponding tests should be removed from the blocklist.
7+
8+
### Debugging
9+
To debug a failure, you need to work against the angular/material2 repo:
10+
1. Clone `angular/material2`
11+
2. Checkout the `ivy-2019` branch
12+
3. Run `yarn`
13+
4. Run `scripts/ivy/install-angular.sh path/to/local/angular/repo`
14+
5. Run `gulp test`
15+
16+
### Regenerating the blocklist
17+
If a problem has been fixed, you can regenerate the blocklist by:
18+
1. Clone `angular/material2`
19+
2. Checkout the `ivy-2019` branch
20+
3. Run `yarn`
21+
4. Run `scripts/ivy/install-angular.sh path/to/local/angular/repo`
22+
5. Run `gulp test`. Let it finish. It will take a few minutes.
23+
6. Run `scripts/ivy/generate-blocklist.js path/to/local/angular/repo`
24+
7. Copy the new blocklist from `dist/angular_material_test_blocklist.js`

0 commit comments

Comments
 (0)