-
Notifications
You must be signed in to change notification settings - Fork 10.5k
Added -help option to sourcekitd-test #8746
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
Conversation
@swift-ci please smoke test |
@swift-ci Please test |
Can we add a test to ensure this dump the -h option itself? |
🤔 sure... I can add that |
Do we have a documentation on the testing tools? I'm talking about the kind of tests found in swift/test EDITFound it! FileCheck and Testing Guide |
@nkcsgexi I made this test and it passed. Should I test something else as well? // Basic check that usage works
//
// RUN: %sourcekitd-test -help | %FileCheck %s
//
// CHECK: USAGE: sourcekitd-test [options] <inputs> |
Thank you! @swift-ci please smoke test |
Thank you too🙂
Btw... 🤔 I made a new test, for checking that entering an unknown argument
prints an error message and suggests using -help. But running the 9xxx
tests takes a long time 😆.
Is there a way to run just *one* test? Or to run just the SourceKit ones?
…On Tue, Apr 18, 2017 at 6:43 PM Xi Ge ***@***.***> wrote:
***@***.**** approved this pull request.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#8746 (review)>, or mute
the thread
<https://github.com/notifications/unsubscribe-auth/ALNBJ5KmSGq0cNxpoH7psIDS40BgkWTHks5rxS6AgaJpZM4M9JRu>
.
|
@felix91gr could you push your test and ask swift CI to test it for you? |
Sure! I'll push it 🙂
I can't trigger swift CI though... I'm a new-ish member of the community,
so I haven't been given access to it.
(I already tried in my first comment, that was when I learned)
…On Tue, Apr 18, 2017 at 7:30 PM Xi Ge ***@***.***> wrote:
@felix91gr <https://github.com/felix91gr> could you push your test and
ask swift CI to test it for you?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#8746 (comment)>, or mute
the thread
<https://github.com/notifications/unsubscribe-auth/ALNBJ_ww0b1PB65nVTsiOjPHDbKHVv5Mks5rxTmagaJpZM4M9JRu>
.
|
@swift-ci please smoke test |
Thanks! ^^ |
@felix91gr whenever you need to trigger CI, just comment on the pull request to ask some one to trigger it for you. I'm sure many are glad to help 🙂 |
It failed, this is the output: Command Output (stderr):
--
error: unknown argument: -this_option_does_not_exist
Use -h or -help for assistance
FileCheck error: '-' is empty.
FileCheck command line: /Users/buildnode/jenkins/workspace/swift-PR-osx-smoke-test/branch-master/buildbot_incremental/llvm-macosx-x86_64/./bin/FileCheck /Users/buildnode/jenkins/workspace/swift-PR-osx-smoke-test/branch-master/swift/test/SourceKit/Misc/wrong_arguments.swift
-- From that, only the first two lines are the output of
This is the original test, btw: // RUN: %sourcekitd-test -this_option_does_not_exist | %FileCheck %s
//
// CHECK: error: unknown argument:
// CHECK: Use -h or -help for assistance Should I use the complete line? (like I thought (Meta)🤔 it failed only on OS X... Now that I look at it, the entire SourceKit test suite is disabled in Linux. Ah, right. We haven't yet merged Norio Nomura's PR #8485. Well, I'll test it on my machine as well then (I'm using Linux) 👍 |
Yup, the @nkcsgexi I've submitted a correction. Can you call Swift-CI please? :) |
@swift-ci please smoke test |
🤔 both failed... that's weird. Well, I'll restart my setup and keep at it. |
@benlangmuir or @nkcsgexi, I think I fixed the tests this time... sorry to bother you, could you run a smoke test please? :) |
@swift-ci please smoke test |
@benlangmuir or @nkcsgexi... Sorry to bother you again. This time I've tested the changes using a local version of (please call CI ^^) |
@swift-ci please smoke test |
Wohoo! The Next up, I'll fix whatever is wrong with the |
I think I know what's the problem. I'll upload the change. |
The problem was that I thought the In the design of So, for (hopefully) last time... @nkcsgexi could you call CI? :) |
@swift-ci please smoke test |
Aw yeah! It passed! :D |
It passed all the tests now! It was a dumb mistake, as it always is :D |
Should we merge this? Should I add something else? 🙂 |
Could you squash all commits into one? |
Oh, good idea. Will do.
…On Fri, Apr 21, 2017 at 2:54 PM Xi Ge ***@***.***> wrote:
Could you squash all commits into one?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#8746 (comment)>, or mute
the thread
<https://github.com/notifications/unsubscribe-auth/ALNBJ70iBsgGIJ7KgxKLOnUr4BDMCeFWks5ryO08gaJpZM4M9JRu>
.
|
Done! :) |
👍 @swift-ci please smoke test and merge |
🤔 seems like nothing happened... |
Let's try again. @swift-ci please smoke test |
Ahhh... you know, probably when asked for a test + merge process, it puts the task way back into the queue because the tasks before it where called using the previous state of the repo :D (w/o the merge) If that's the case, then it should take a while sometimes, depending on how busy CI is 🤔 |
utils/build-presets.ini
Outdated
@@ -708,7 +708,7 @@ install-llbuild | |||
install-swiftpm | |||
install-xctest | |||
install-prefix=/usr | |||
swift-install-components=autolink-driver;compiler;clang-builtin-headers;stdlib;swift-remote-mirror;sdk-overlay;license | |||
swift-install-components=autolink-driver;compiler;clang-builtin-headers;stdlib;swift-remote-mirror;sdk-overlay;license;sourcekit-inproc |
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 seems irrelevant, is this change intentional ?
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.
Oh. I didn't notice. It's a leftover of one of my cherrypicks from Nomura's PR (#8485). Helped me test things in linux.
It can, and probably should, be removed... even though that PR has already been aprooved. You can do it if you want, or just wait for me (atm I'm not at the computer) :)
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.
Remove the change when you can, and afterwards we can merge your improvements.
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.
Oki doke 🙂👍🏻
3e301c2
to
51521ef
Compare
@akyrtzi done 😉 |
Added "-help" option to Options.td Added also: * Added "OPT_HELP" case in the main TestOptions.cpp switch. It uses the llvm options help functionality to provide up-to-date help * Additional "Use -help for assistance" at the end of the error message that appears when calling an unknown option Added their following tests, respectively:: * usage.swift, and * wrong_arguments.swift Extra: FIXME: in TestOptions::printHelp, suggesting a possible expansion for the printHelp option (details in file)
Updated
I think we're ready for a test and merge. @nkcsgexi or @akyrtzi could you please call CI again? :) |
@swift-ci smoke test and merge |
@swift-ci smoke test |
What a weird thing... why did it fail the smoke test & merge, but passed the smoke test alone? The only thing I can think of is that I haven't set gpg keys for my Github account. That could be it 🤔 |
No, wait... it says "wrong SHA". 🤔 |
@felix91gr congrats for your first Swift contribution! 👍 |
What the PR includes
Addresses one of the current starter bugs, adding the feature mentioned in the title.
I've added a
FIXME:
in the printHelp function to suggest a possible expansion for its functionality (allowing to hide/include certain options from the Help Text). I don't think that's necessary for this command, but could be useful if we want it to have as many options asDriver.cpp
has.Where has this been tested
I've compiled this in Linux, using a slightly modified version of the default presets. I used #8485 and #8189, and added a
cmake
option to compilesourcekitd-test
. It passed the buildbot_linux, smoketest tests on my pc 👍Resolves SR-1421.