-
-
Notifications
You must be signed in to change notification settings - Fork 925
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[Truffle] JT: refactor a bit the logic in the test command.
- 9.4.12.0
- 9.4.11.0
- 9.4.10.0
- 9.4.9.0
- 9.4.8.0
- 9.4.7.0
- 9.4.6.0
- 9.4.5.0
- 9.4.4.0
- 9.4.3.0
- 9.4.2.0
- 9.4.1.0
- 9.4.0.0
- 9.3.15.0
- 9.3.14.0
- 9.3.13.0
- 9.3.12.0
- 9.3.11.0
- 9.3.10.0
- 9.3.9.0
- 9.3.8.0
- 9.3.7.0
- 9.3.6.0
- 9.3.5.0
- 9.3.4.0
- 9.3.3.0
- 9.3.2.0
- 9.3.1.0
- 9.3.0.0
- 9.2.21.0
- 9.2.20.1
- 9.2.20.0
- 9.2.19.0
- 9.2.18.0
- 9.2.17.0
- 9.2.16.0
- 9.2.15.0
- 9.2.14.0
- 9.2.13.0
- 9.2.12.0
- 9.2.11.1
- 9.2.11.0
- 9.2.10.0
- 9.2.9.0
- 9.2.8.0
- 9.2.7.0
- 9.2.6.0
- 9.2.5.0
- 9.2.4.1
- 9.2.4.0
- 9.2.3.0
- 9.2.2.0
- 9.2.1.0
- 9.2.0.0
- 9.1.17.0
- 9.1.16.0
- 9.1.15.0
- 9.1.14.0
- 9.1.13.0
- 9.1.12.0
- 9.1.11.0
- 9.1.10.0
- 9.1.9.0
- 9.1.8.0
- 9.1.7.0
- 9.1.6.0
- 9.1.5.0
- 9.1.4.0
- 9.1.3.0
- 9.1.2.0
- 9.1.1.0
- 9.1.0.0
- 9.0.5.0
- 9.0.4.0
- 9.0.3.0
- 9.0.1.0
- 9.0.0.0
- 9.0.0.0.rc2
- 9.0.0.0.rc1
Showing
1 changed file
with
8 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
70f7bf6
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.
In one of the jt test refactorings, I think we can no longer run an MRI test like this:
jt test digest/test_digest.rb
. I think I forgot to include an example of this in the help section before.70f7bf6
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.
Yes, I am aware of the problem. @chrisseaton and I use mostly tab completion to run tests/specs so we did not run into the problem.
Of course,
jt test mri digest/test_digest.rb
would just work.I was thinking maybe to have
jt test
for MRI test suite andjt spec
for RubySpec, but then how do we name the next suite we use?We could try guessing from the path, but with a partial path like this it gets confusing.
And RubySpec also has the feature to look paths you give to it with an implicit prefix, although we do not currently use it. Also, we would need to parse options somehow to get the path in
jt test --jdebug .../some_spec.rb
Supporting single files should be easy (
test_...
vs..._spec.rb
) but how to deal with directories for instance? (jt test mri digest
vsjt test specs library/digest
?)@chrisseaton @nirvdrum I am not sure how smart we want to be with this, do we want to go down the road of trying to guess the appropriate runner given a path, or do we prefer to keep things simple but have to know the different
jt
commands?I am definitely not a big fan of subcommands (jt test mri|specs) in this case.
70f7bf6
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 prefer guessing the right kind of test to run. I don't really understand why people would want to write a partial file path like
digest/test_digest.rb
- that's not how any other programming tool I know works. If we require full paths I also can't imagine any ambiguity.70f7bf6
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.
So, should we support
jt test digest/test_digest.rb
?And not just
jt test test/mri/digest/test_digest.rb
?70f7bf6
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.
Yeah I think so. I don't understand why anyone would expect the short version to work - is that how the MRI test running usually does things?
70f7bf6
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.
As far as I can tell, the partial paths are just how MRI tests work. I usually copy the path I want from the mri_truffle.index.
I don't have a preference about which format we support. We could even use both if you'd prefer with something like:
It would be nice to have tab completion sometimes.
70f7bf6
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.
The MRI tests run just fine with the full path, right?
In that case I propose to start using the full path and then report if there is any problem with that.