-
Notifications
You must be signed in to change notification settings - Fork 1.9k
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
elixir: Fix mix test $ZED_SYMBOL
task
#11879
Conversation
$ZED_SYMBOL doesn't really work here once that will try to do something like this: mix test MyModule.MyModuleTest instead of using the path of the file: mix test test/my_module/my_module_test.exs
We require contributors to sign our Contributor License Agreement, and we don't have @feliperenan on file. You can sign our CLA at https://zed.dev/cla. Once you've signed, post a comment here that says '@cla-bot check'. |
@cla-bot check |
We require contributors to sign our Contributor License Agreement, and we don't have @feliperenan on file. You can sign our CLA at https://zed.dev/cla. Once you've signed, post a comment here that says '@cla-bot check'. |
The cla-bot has been summoned, and re-checked this pull request! |
@cla-bot check |
The cla-bot has been summoned, and re-checked this pull request! |
"command": "mix", | ||
"args": ["test", "$ZED_SYMBOL"] | ||
"args": ["test", "$ZED_FILE"] |
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 wonder if we could have another variable, something like ZED_RELATIVE_FILE_PATH
. The reason is that when running this task within umbrella apps, that will output test runs for all projects even though they are skipped. For instance:
❯ mix test /Users/feliperenan/source/my_umbrella_app/apps/my_app/test/my_app_web/controllers/my_controller_test.exs
==> my_app
......
Finished in 1.9 seconds (1.9s async, 0.00s sync)
6 tests, 0 failures
Randomized with seed 45266
==> another_app_within_umbrella_app
Finished in 0.00 seconds (0.00s async, 0.00s sync)
0 failures
While, if we use the relative path, it would be:
❯ mix test apps/my_app/test/my_app_web/controllers/my_controller_test.exs
==> my_app
......
Finished in 1.3 seconds (1.3s async, 0.00s sync)
6 tests, 0 failures
Randomized with seed 507991
mix test $ZED_FILE
task
mix test $ZED_FILE
taskmix test $ZED_SYMBOL
task
This must have gotten broken during the recent move of elixir support into an extension. I already had my own elixir tasks so didn't notice. As you mention, it would be nice to have something like |
I've added ZED_RELATIVE_FILE in #12245 |
Thank you @osiewicz. I just tested and it works like a charm. Just updated this PR to use ZED_RELATIVE_FILE as well. |
$ZED_SYMBOL doesn't really work here once that will try to do something like this:
mix test MyModule.MyModuleTest
instead of using the path of the file:
mix test test/my_module/my_module_test.exs
Release Notes: