Repository navigation
Description
🐞 bug report
Is this a regression?
Nope
Description
Angular tests are only partially enabled on Windows:
angular/.codefresh/codefresh.yml
Lines 22 to 24 in 1102b02
| # Run tests | |
| - yarn bazel test //tools/ts-api-guardian:all | |
| - yarn test-ivy-aot //packages/animations/test //packages/common/test //packages/forms/test //packages/http/test //packages/platform-browser/test //packages/platform-browser-dynamic/test //packages/router/test |
To have better Windows support, we should be able to run all tests on Windows, that is:
bazel test //... --build_tag_filters=-ivy-only --test_tag_filters=-ivy-only
yarn test-ivy-aot //...
(IIUC, yarn test-ivy-aot //... is essentially bazel test --define=compile=aot --build_tag_filters=-no-ivy-aot,-fixme-ivy-aot --test_tag_filters=-no-ivy-aot,-fixme-ivy-aot //...)
I tried to run all tests without ivy-only with Bazel 0.24.1 and got
Executed 102 out of 175 tests: 86 tests pass, 72 fail to build and 17 fail locally.
See full detail at Angular test with Bazel 0.24.1
It turned out all broken tests are because powershell.exe is not available when using --incompatible_strict_action_env. So I sent a change in Bazel to fix this problem. bazelbuild/bazel@6e75219
With Bazel@6e75219, after working around some incompatibility issues, I'm able to build and run all Angular tests on Windows. The results are:
Executed 175 out of 175 tests: 152 tests pass and 23 fail locally.
Executed 7 out of 147 tests: 140 tests pass and 7 fail locally.
Current TODO list is:
- Wait for a Bazel release that contains bazelbuild/bazel@6e75219, should be 0.26 (Do you prefer this to be cherry-pick into 0.25, so that we can have it this month?)
- Fix incompatibility issues:
- build: Fix label name #29777
bazel-0.24.1 build --nobuild //... --incompatible_bzl_disallow_load_after_statement- Wait for a fix (Fix config_setting for msvc google/brotli#748) for brotli, then update org_brotli
- Look into failing tests with Bazel@6e75219, will provide a way to reproduce.
🔬 Minimal Reproduction
# Get Bazel binary built at 6e752195f0b0c6d67822368b82c990dff168a258
wget https://storage.googleapis.com/bazel-builds/artifacts/windows/6e752195f0b0c6d67822368b82c990dff168a258/bazel -O <your preferred Bazel path (with .exe extension)>
# Cherry-pick https://github.com/angular/angular/pull/29777 if it's still not merged.
# Run tests except ivy-only
bazel test //... --build_tag_filters=-ivy-only --test_tag_filters=-ivy-only --incompatible_bzl_disallow_load_after_statement=false
# Run ivy-only tests
bazel test //... --define=compile=aot --build_tag_filters=-no-ivy-aot,-fixme-ivy-aot --test_tag_filters=-no-ivy-aot,-fixme-ivy-aot --incompatible_bzl_disallow_load_after_statement=false
Note that we still need --incompatible_bzl_disallow_load_after_statement=false until the incompatibility issue is fixed.
If you failed to build brotli, you can use the following in packages/bazel/package.bzl:
http_archive(
name = "org_brotli",
sha256 = "44ebae3308fd1a757fdc4891e1e1e61ab964afb223ba298d2ea0c29a49564f53",
strip_prefix = "brotli-7388ebb113f0e1dbf4ab0f2daddf036abf29b8e6",
url = "https://github.com/meteorcloudy/brotli/archive/7388ebb113f0e1dbf4ab0f2daddf036abf29b8e6.zip",
)
🌍 Your Environment
Angular Version:
ec5635430630fb895ddb43017f9939564824e8f8
@alexeagle @filipesilva Can you point this issue to correct people in Angular Windows team? I will also continue to help investigating.
Activity
meteorcloudy commentedon Apr 10, 2019
Tests to be fixed:
--build_tag_filters=-ivy-only --test_tag_filters=-ivy-only:
--define=compile=aot --build_tag_filters=-no-ivy-aot,-fixme-ivy-aot --test_tag_filters=-no-ivy-aot,-fixme-ivy-aot
alexeagle commentedon Apr 10, 2019
note, we can publish nightly snapshots of Bazel to npm, so we don't necessarily need to wait for fixes to be released. I started this in https://github.com/alexeagle/rules_nodejs/tree/nightly_bazel but need some help to finish probably
test: fix ts api guardian and public guard tests on windows (#30105)
test: fix ts api guardian and public guard tests on windows (#30105)
test: fix language service tests in windows (#30113)
test: fix language service tests in windows (#30113)
12 remaining items
test: fix ts api guardian and public guard tests on windows (angular#…
test: fix language service tests in windows (angular#30113)
test: fix ngc-wrapped bazel tests in windows (angular#30111)
test: fix several bazel compiler-cli tests in windows (angular#30189)
fix(bazel): pass correct arguments to http_server in Windows (angular…
test: fix several Bazel compiler tests in windows (angular#30146)
test: fix ngcc unit tests in windows (angular#30297)
test: fix ngcc integration tests in windows (angular#30297)
angular-automatic-lock-bot commentedon May 25, 2025
This issue has been automatically locked due to inactivity.
Please file a new issue if you are encountering a similar or related problem.
Read more about our automatic conversation locking policy.
This action has been performed automatically by a bot.