You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Sep 16, 2021. It is now read-only.
Repository navigation
This repository was archived by the owner on Sep 16, 2021. It is now read-only.
//internal:test is broken with Bazel's Windows native test wrapper #452
//internal:test, which is a jasmine_node_test from @npm_bazel_jasmine//:index.bzl
Is this a regression?
Not really, I think it's always been there.
Description
A clear and concise description of the problem...
Bazel 0.27 will enable a feature by default: to use a new test execution mechanism on Windows. Currently (in Bazel 0.26) this features is disabled. The new feature allows faster test execution, and doesn't use Bash. See bazelbuild/bazel#6622 for details.
The bad news is, rules_typescript breaks with this planned change 😢 I fixed it in the past (e50c806), but it's broken again 😿
Currently, I'm stuck: can't figure out where I have to update what.
I think I know the problem. It looks similar to that fixed by bazel-contrib/rules_nodejs@76609c7
And I believe I have to update @npm_bazel_jasmine//src/jasmine_node_test.bzl to use nodejs_test_macro instead of nodejs_test.
But I can't find where to update this file, or how it's pulled in as a dependency :(
🔬 Minimal Reproduction
With Bazel 0.26.0, check out rules_typescript c160db9, and run:
bazel test --incompatible_windows_native_test_wrapper --test_output=errors //internal:test
It fails because the test rule tries to execute a .sh file, which is not an executable file on Windows.
Pass: C:\src\tw-migrations\rules_typescript>bazel --ignore_all_rc_files --output_user_root=c:/b test --noincompatible_windows_native_test_wrapper --experimental_allow_incremental_repository_updates //internal:test
Fail: C:\src\tw-migrations\rules_typescript>bazel --ignore_all_rc_files --output_user_root=c:/b test --incompatible_windows_native_test_wrapper --experimental_allow_incremental_repository_updates //internal:test
INFO: From Testing //internal:test:
==================== Test output for //internal:test:
ERROR(tools/test/windows/tw.cc:1248) ERROR: src/main/native/windows/process.cc(184): CreateProcessW("C:\b\thor5vol\execroot\build_bazel_rules_typescript\bazel-out\x64_windows-fastbuild\bin\internal\test.sh"): %1 is not a valid Win32 application.
ERROR(tools/test/windows/tw.cc:1405) Failed to start test process (arg: C:\b\thor5vol\execroot\build_bazel_rules_typescript\bazel-out\x64_windows-fastbuild\bin\internal\test.sh)
================================================================================
Activity
laszlocsomor commentedon Jun 3, 2019
Looks like this will NOT happen :(
alexeagle commentedon Jun 12, 2019
Next time you can just ping me to unwind the silly sync sandwich between this repo and rules_nodejs
Sounds like the right thing is for us to pair a bit to remove the need for the wrapper macro on nodejs_test and nodejs_binary?
laszlocsomor commentedon Jun 24, 2019
Sure, and thanks.
I'll ping you again about this when you're not on vacation.
laszlocsomor commentedon Jul 30, 2019
Ping -- sorry for the long silence, I'm just now picking this up.
The test still fails:
Windows 10
Bazel 0.28.1
PATH=c:\git\mingw64\bin;c:\msys64\usr\bin;c:\src\bazel-releases\current;c:\windows\system32Pass:
C:\src\tw-migrations\rules_typescript>bazel --ignore_all_rc_files --output_user_root=c:/b test --noincompatible_windows_native_test_wrapper --experimental_allow_incremental_repository_updates //internal:testFail:
C:\src\tw-migrations\rules_typescript>bazel --ignore_all_rc_files --output_user_root=c:/b test --incompatible_windows_native_test_wrapper --experimental_allow_incremental_repository_updates //internal:testlaszlocsomor commentedon Jul 30, 2019
Linking to bazelbuild/bazel#6622, which is blocked by this
laszlocsomor commentedon Aug 5, 2019
ping
alexeagle commentedon Aug 5, 2019
dupe of bazel-contrib/rules_nodejs#947, let's fix them together
laszlocsomor commentedon Aug 6, 2019
Thanks!