[stdlib] Add convenience pixi testing and format config#5119
[stdlib] Add convenience pixi testing and format config#5119martinvuyk wants to merge 1 commit intomodular:mainfrom
Conversation
305f74a to
e595555
Compare
mojo/stdlib/scripts/run-tests.sh
Outdated
|
|
||
| exec "$REPO_ROOT"/bazelw test //mojo/stdlib/test/... | ||
|
|
||
| FILTER="stdlib/test" |
There was a problem hiding this comment.
Question Do we want to maintain this script even at all now that we have e591f3e? People just can use bazelw directly and specify their subdirectory of interest.
There was a problem hiding this comment.
Yea this is mainly meant as a courtesy option for transitioning to the bazel build. Personally I'd rather people just use bazel directly.
There was a problem hiding this comment.
I prefer using the pixi task. Faster to type as well.
There was a problem hiding this comment.
+1 as pixi task. A lot less users have used bazel and don't want to necessarily learn yet another thing. Just bc something is used internally doesn't have to leak into the user-space so it's great to have it hidden as much as possible.
There was a problem hiding this comment.
no pref on this script or not since it's tiny, but @ehsanmok note that most things in the repo are bazel only, this script only affects the stdlib
There was a problem hiding this comment.
I think there's probably a bit too many potential workflows for that to be very understandable
There was a problem hiding this comment.
+1, the second someone says "I want to run a subset of the stdlib tests" we have to come back and update this workflow to pipe things through. I think a quick start guide to Bazel, and maybe some convenience aliases like we have internally (like bb and br) would help. All this is doing currently is just adding another layer of indirection.
There was a problem hiding this comment.
I understand there're nuances. My point is to lower the barrier to entry pixi tasks are perfect. Sure, more advanced stuff leaks bazel requirements.
There was a problem hiding this comment.
"I want to run a subset of the stdlib tests"
That is the motivation for this. Now somebody can run a subdirectory. If we want to get down to the layer of running single files again, then yeah it could be too much of a hassle for you guys (although I would very much like having it).
There was a problem hiding this comment.
Each test file should have its own test target you can use bazel query to find and run directly FYI.
keith
left a comment
There was a problem hiding this comment.
i think we should land and keep this script afloat while it's easy like this
And if I find a way to plug this into the script i.e. if the arg is a file execute that command, would you guys be okay with integrating it in the future to this script? |
|
!sync |
e595555 to
6f5879a
Compare
Signed-off-by: martinvuyk <martin.vuyklop@gmail.com>
6f5879a to
4eb6cb2
Compare
Thanks @JoeLoser, just added the ability to test specific files as well :D |
|
✅🟣 This contribution has been merged 🟣✅ Your pull request has been merged to the internal upstream Mojo sources. It will be reflected here in the Mojo repository on the main branch during the next Mojo nightly release, typically within the next 24-48 hours. We use Copybara to merge external contributions, click here to learn more. |
Can you open a new PR for that functionality? The subdir-only part landed already internally. Thanks! |
|
Landed in dd8ac26! Thank you for your contribution 🎉 |
Add convenience pixi testing and format config