-
Notifications
You must be signed in to change notification settings - Fork 81
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Implement hs-bin@repl test as go bazel test #1645
Conversation
tests/integration_tests.bzl
Outdated
native.config_setting( | ||
name = "nixpkgs", | ||
values = {"define": "nixpkgs=true"}, | ||
) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think you could reuse this config_setting
based on the support_nix
platform constraint. Then you also don't need to introduce the --define=nixpkgs
above.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks! Fixed
According to last ci task on Windows there is no bazel binary in PATH occurred inside bazel test, so it probably makes sense to implement an external dependency of |
…external dependencies * make integration_testing depends on external bazel binary * bring bazel functions from rules_go and rework them to use provided bazel binary
d1d5c20
to
3661a87
Compare
configurations except windows, use same bazelrc with different configurations for tests
All CI tests are finally passed but I have a strong feeling that using tmp filesystem for bazel cache inside integration tests is not a good idea. Cache size will constantly grow and tmpfs on average machine is pretty limited. I've already experienced freezing of my laptop sometimes when I'm running these tests. So I will try to find another place writable by bazel tests and invariant between tests |
For basic rules_haskell's integration Bazel test creates about 800MB of cache. It nearly exceeds size of $TMPDIR folder created by Nix on my machine for example but fits /tmp without any problem. So I see two ways to store cache of internal bazel:
I'm leaning towards the first option, @aherrmann do you have an opinion? |
Yes, the first option seems preferable. I'd prefer to avoid the need for |
@aherrmann It's finally ready for being reviewed :) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🎉 Good work, thank you!
A couple comments/questions.
* since nested selects is not allowed add target for bindist bazel selected by os and target for bazel selecting nixpkgs or bindist target * make bazel binary filegroup parameter of integration_test macro
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is great, thank you!
I've tested it locally and tests work as expected with and without Nix.
According to #951 this PR makes a first step to implement integration tests as
go_bazel_test
fromrules_go