-
-
Notifications
You must be signed in to change notification settings - Fork 228
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
Add: recursive option on test command #1873
base: master
Are you sure you want to change the base?
Conversation
Thanks for your pull request and interest in making D better, @Sobaya007! We are looking forward to reviewing it, and you should be hearing from a maintainer soon.
Please see CONTRIBUTING.md for more information. If you have addressed all reviews or aren't sure how to proceed, don't hesitate to ping us with a simple comment. |
Thanks! could you please add a changelog entry for this. |
... and test ;-) |
Yes, the test is important. I am not sure wheter it works as expected because the dependencies are compiled not in unittest mode when running dub test on a dub package. Also what is the expected behavior if the test of a dependency fails, will the unittests for the other dependencies still be executed? |
How can I add test? |
Yes in |
If I am not wrong, there is a *.sh file missing which call dub test -r for the test package you added. |
According to run-unittest.sh, just adding package directory into test will be OK. |
I can't see how your tests triggers your new recursive functionality. Where do you pass the --recursive argument? |
Oh, sorry. It's my mistake. |
source/dub/commandline.d
Outdated
@@ -1009,6 +1010,9 @@ class TestCommand : PackageBuildCommand { | |||
args.getopt("f|force", &m_force, [ | |||
"Forces a recompilation even if the target is up to date" | |||
]); | |||
args.getopt("r|recursive", &m_recursive, [ | |||
"Runs test on all packages including subpackages." |
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.
Unfortunately, this command-line help seems different from fact.
This option recursive tests for dependencies, not subpackages.
(I'd rather test the subpackages recursive.)
A proposal: the test libraries could output in unittest mode a text to stdout. In your test bash script you can grep for this text. Or even better call one time dub test with -r and one time without -r and compare the output. A sample how to to grep and compare dub output in bash you can see here https://github.com/dlang/dub/pull/1811/files |
Thanks. I thought of s.th. like this in the test script:
|
Anything else? |
Only a nitpick, I am not sure whether 4 additional git ignore files are needed. Also please merge the 11 commits into 1 commit. |
Otherwise looks good for me. Thanks a lot for your effort. |
OK? |
No description provided.