-
-
Notifications
You must be signed in to change notification settings - Fork 648
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
raco test: set current-test-invocation-directory #4988
raco test: set current-test-invocation-directory #4988
Conversation
Running "raco test foo/bar/test.rkt" will cause Racket to change directory to "foo/bar" before invoking "test.rkt", and error messages are printed relative to (current-directory) like raco test: "foo/bar/test.rkt" -------------------- fail FAILURE name: check-equal? location: test.rkt:5:0 actual: 1 expected: 2 -------------------- 1/1 test failures For an editor to consume this, it has to post-process the output to correlate "raco test: path" with "location: partial path" (which is difficult when running tests in parallel). This is not ideal; output with location: foo/bar/test.rkt:5:0 is immediately useable by editors for jumping to the error. Expose the original directory in which "raco test" was launched so that rackunit (or other test frameworks) can appropriately adjust filepaths when reporting errors. Also add a name to the test-log-enabled? parameter while we're here.
I believe the new version addresses @usaoc's comments. Should the out contract use range-diff:
|
216c2bd
to
df01b0d
Compare
I think a path or string will always end up as a path for the current platform, unless you explicitly produce a path for a different platform, so |
Sorry if I am missing something, but on the input side would path-string?
Be acceptable?
…On Sat, May 11, 2024 at 8:43 AM Wing Hei Chan ***@***.***> wrote:
I think a path or string will always end up as a path for the current
platform, unless you explicitly produce a path for a different platform, so
path? is correct here.
—
Reply to this email directly, view it on GitHub
<#4988 (comment)>, or
unsubscribe
<https://github.com/notifications/unsubscribe-auth/AADBNMHH3WXZN5ECONSL7QDZBYOAHAVCNFSM6AAAAABHLTKXMSVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDCMBVG43DGMBQGY>
.
You are receiving this because you are subscribed to this thread.Message
ID: ***@***.***>
|
Yes; indeed, the documentation and code (should) both agree that the parameter accepts |
@mflatt it looks like I've missed a case somewhere: when I do Any pointers? |
@benknoble With |
Thanks. I started thinking along those lines; the code references are helpful. |
Running "raco test foo/bar/test.rkt" will cause Racket to change directory to "foo/bar" before invoking "test.rkt", and error messages are printed relative to (current-directory) like
For an editor to consume this, it has to post-process the output to correlate "raco test: path" with "location: partial path" (which is difficult when running tests in parallel). This is not ideal; output with
is immediately useable by editors for jumping to the error.
Expose the original directory in which "raco test" was launched so that rackunit (or other test frameworks) can appropriately adjust filepaths when reporting errors.
Checklist