Conversation
da2f740 to
515f1c2
Compare
bonigarcia
left a comment
There was a problem hiding this comment.
I am not sure about this PR. What is the benefit of running the Rust test with Bazel instead of cargo?
In any case, the current PR is not exactly the same as cargo test. If I am not wrong, the tests executed are those included in the tests folders:
for file in glob(["tests/*.rs"])
Nevertheless, those are only the integration tests. There are also unit tests within the src folder (which is the typical way to do it with Rust). See, for example, firefox.rs.
The main benefits are the same as for any other code in the repository - use a single tool that automatically installs the Rust toolchain, compiles the binary, and hermetically runs the tests without requiring a developer to do all of that manually. Furthermore, once we start using remote cache and remote build, it will be possible to build Linux versions from macOS machines for example.
Thanks for pointing that out, I was not aware - will add this too. |
|
I wonder why tests are failing if they are passing on |
|
@diemol I think the unit tests are failing because of the sandbox and can be fixed by adding a |
|
Strange... Why is the proxy test failing on Windows on this PR but passing on |
|
@diemol It's actually failing on trunk too if you run it separately |
|
@p0deje It seems this issue has been fixed after merging #11865 by @dev-ardi (thanks about that!). Now the output in Windows is as follows: |
Brings Rust bits on par with the rest, allowing to run tests using Bazel:
It seems like proxy tests cannot be easily run in parallel to others so I ended up just using the
exclusivetag to force all the tests sequentially.