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
Enhanced unittest support #1131
Conversation
Does anyone know what's necessary to make the pull tester use that druntime pull request? |
@jpf91 I think you need to add somewhere in description something like: |
@nazriel thanks, let's see if this works... I also added a warning if the required runtime support isn't available, so enhanced unit test information won't be available without proper runtime support (and when the old methods gets removed, no unit test information at all), but everything else should work fine. |
@jpf91, it seems to fetch druntime pull now. But unittest fails on Windows. |
No, it still doesn't fetch druntime. See http://d.puremagic.com/test-results/pull.ghtml?runid=297747&logid=5 |
This allows to add additional data to unittests and it allows the runtime to run unittests seperately. Currently supported information: ushort version; //UnitTest info version, currently = 1 string filename; uint line; void function() testFunc; Prepared: string name; //Needs support in the lexer/parser. The name is passed to the runtime, but currently it's always an empty string. The old per module unittest function is still supported, but deprecated.
Note that this pull request fixes issue 4747. |
The old pull tester had something like this, but the current one doesn't (as far as I know) |
Awww, bummer. Any reason why it was removed? @jpf91 sorry for giving false information then. |
@nazriel When the old linux 32 only pull tester (which I wrote) was adapted into the current tester by Brad, that feature didn't make the transition, and nobody has gotten around to re-implementing it. It's low priority as not many pull require simultaneous merges. |
Closed till we have a proper DIP. |
This allows to add additional data to unittests and it allows the runtime to run unittests seperately.
Currently supported information:
Prepared:
The name is passed to the runtime, but currently it's always an empty string.
The old per module unittest function is still supported, but deprecated.
The second commit recognizes if a unittest is marked as
@disable
and passes this information to the runtime.This druntime pull request should be pulled first:
dlang/druntime#308
Here's a small example of what can be done with these changes:
Custom test runner: http://dpaste.dzfl.pl/046ed6fb
Sample unittests: http://dpaste.dzfl.pl/517b1088
Output: http://dpaste.dzfl.pl/2780939b
NOTE:
The autotester does not pull in the druntime changes, so it only tests the old unit test method (The new method is disabled if druntime support is not found).
Therefore the druntime request should be pulled first. We should the wait for new autotester results with these druntime changes included. If those results look fine we can merge this pull request.