digitalmars.D - dmd test coverage
- Martin Nowak (3/3) Nov 27 2014 Actually not too bad :).
- Andrei Alexandrescu (2/5) Nov 27 2014 Wow, coveralls.io looks pretty nice! -- Andrei
- Martin Nowak (3/9) Nov 27 2014 And there is actually D support to upload dmd coverage reports.
- Walter Bright (5/8) Nov 27 2014 The backend coverage is poor because I relied on the DMC test suite to d...
- Walter Bright (2/5) Nov 27 2014 https://issues.dlang.org/show_bug.cgi?id=13786
- H. S. Teoh via Digitalmars-d (7/14) Nov 27 2014 How do I locally test dmd for coverage? I have a fix for the missing
- Daniel Murphy (4/7) Nov 27 2014 What I do is put a print/assert in the compiler functions you're looking...
- Walter Bright (2/5) Nov 27 2014 In posix.mak for dmd, there's 'make gcov' to generate coverage data.
- H. S. Teoh via Digitalmars-d (8/14) Nov 28 2014 I get a whole bunch of errors that say 'cannot open notes file'. What
- H. S. Teoh via Digitalmars-d (9/22) Nov 28 2014 [...]
- Walter Bright (2/21) Nov 28 2014 I don't know. Haven't tried it in a while, likely it is suffering from b...
- H. S. Teoh via Digitalmars-d (15/30) Nov 28 2014 Nevermind, I found the reason. Make overwrites CFLAGS even if you
- H. S. Teoh via Digitalmars-d (9/12) Nov 28 2014 [...]
- Walter Bright (2/5) Nov 28 2014 Good!
- Walter Bright (4/7) Nov 28 2014 And quickfur (H.S. Teoh) once again proves how important having coverage...
- Daniel Murphy (3/7) Nov 28 2014 Not that fixing it wasn't useful, but that was a minor diagnostic bug th...
- Trass3r (1/1) Nov 29 2014 Plenty of "not covered" lines are actually assert(0)'s.
- Walter Bright (4/5) Nov 29 2014 Right, and some of them are also in #ifdef DEBUG / #endif pairs. This is...
- Vic (2/5) Nov 29 2014 Good step.
- Walter Bright (5/8) Dec 05 2014 More tests to improve coverage:
Actually not too bad :). https://dlang.dawg.eu/coverage/ https://coveralls.io/r/MartinNowak/dmd
Nov 27 2014
On 11/27/14 3:32 AM, Martin Nowak wrote:Actually not too bad :). https://dlang.dawg.eu/coverage/ https://coveralls.io/r/MartinNowak/dmdWow, coveralls.io looks pretty nice! -- Andrei
Nov 27 2014
On 11/28/2014 01:12 AM, Andrei Alexandrescu wrote:On 11/27/14 3:32 AM, Martin Nowak wrote:And there is actually D support to upload dmd coverage reports. http://code.dlang.org/packages/doverallsActually not too bad :). https://dlang.dawg.eu/coverage/ https://coveralls.io/r/MartinNowak/dmdWow, coveralls.io looks pretty nice! -- Andrei
Nov 27 2014
On 11/27/2014 3:32 AM, Martin Nowak wrote:Actually not too bad :). https://dlang.dawg.eu/coverage/ https://coveralls.io/r/MartinNowak/dmdThe backend coverage is poor because I relied on the DMC test suite to deal with that. 70% is better than I expected. 90% for the front end isn't good enough. I'd like to be at 98% or so. Thanks for doing this, and the online reports look very nice!
Nov 27 2014
On 11/27/2014 3:32 AM, Martin Nowak wrote:Actually not too bad :). https://dlang.dawg.eu/coverage/ https://coveralls.io/r/MartinNowak/dmdhttps://issues.dlang.org/show_bug.cgi?id=13786
Nov 27 2014
On Thu, Nov 27, 2014 at 04:28:45PM -0800, Walter Bright via Digitalmars-d wrote:On 11/27/2014 3:32 AM, Martin Nowak wrote:How do I locally test dmd for coverage? I have a fix for the missing coverage for version.c, but I can't figure out how to test whether it's actually working. T -- Prosperity breeds contempt, and poverty breeds consent. -- Suck.comActually not too bad :). https://dlang.dawg.eu/coverage/ https://coveralls.io/r/MartinNowak/dmdhttps://issues.dlang.org/show_bug.cgi?id=13786
Nov 27 2014
"H. S. Teoh via Digitalmars-d" wrote in message news:mailman.2389.1417136212.9932.digitalmars-d puremagic.com...How do I locally test dmd for coverage? I have a fix for the missing coverage for version.c, but I can't figure out how to test whether it's actually working.What I do is put a print/assert in the compiler functions you're looking for and then run it on the test case.
Nov 27 2014
On 11/27/2014 4:54 PM, H. S. Teoh via Digitalmars-d wrote:How do I locally test dmd for coverage? I have a fix for the missing coverage for version.c, but I can't figure out how to test whether it's actually working.In posix.mak for dmd, there's 'make gcov' to generate coverage data.
Nov 27 2014
On Thu, Nov 27, 2014 at 09:05:16PM -0800, Walter Bright via Digitalmars-d wrote:On 11/27/2014 4:54 PM, H. S. Teoh via Digitalmars-d wrote:I get a whole bunch of errors that say 'cannot open notes file'. What does that mean? Also, don't I have to first compile dmd with --coverage and run the test suite before it has the coverage data?? T -- Give me some fresh salted fish, please.How do I locally test dmd for coverage? I have a fix for the missing coverage for version.c, but I can't figure out how to test whether it's actually working.In posix.mak for dmd, there's 'make gcov' to generate coverage data.
Nov 28 2014
On Fri, Nov 28, 2014 at 11:32:25AM -0800, H. S. Teoh via Digitalmars-d wrote:On Thu, Nov 27, 2014 at 09:05:16PM -0800, Walter Bright via Digitalmars-d wrote:[...] Which I had tried (make -f posix.mak -j6 MODEL=64 CFLAGS=--coverage), but the compilation aborts with: inifile.c:101:3: error: #error SYSCONFDIR not defined which goes away when --coverage is not specified. What gives? T -- If creativity is stifled by rigid discipline, then it is not true creativity.On 11/27/2014 4:54 PM, H. S. Teoh via Digitalmars-d wrote:I get a whole bunch of errors that say 'cannot open notes file'. What does that mean? Also, don't I have to first compile dmd with --coverage and run the test suite before it has the coverage data??How do I locally test dmd for coverage? I have a fix for the missing coverage for version.c, but I can't figure out how to test whether it's actually working.In posix.mak for dmd, there's 'make gcov' to generate coverage data.
Nov 28 2014
On 11/28/2014 11:35 AM, H. S. Teoh via Digitalmars-d wrote:On Fri, Nov 28, 2014 at 11:32:25AM -0800, H. S. Teoh via Digitalmars-d wrote:I don't know. Haven't tried it in a while, likely it is suffering from bit rot.On Thu, Nov 27, 2014 at 09:05:16PM -0800, Walter Bright via Digitalmars-d wrote:[...] Which I had tried (make -f posix.mak -j6 MODEL=64 CFLAGS=--coverage), but the compilation aborts with: inifile.c:101:3: error: #error SYSCONFDIR not defined which goes away when --coverage is not specified. What gives?On 11/27/2014 4:54 PM, H. S. Teoh via Digitalmars-d wrote:I get a whole bunch of errors that say 'cannot open notes file'. What does that mean? Also, don't I have to first compile dmd with --coverage and run the test suite before it has the coverage data??How do I locally test dmd for coverage? I have a fix for the missing coverage for version.c, but I can't figure out how to test whether it's actually working.In posix.mak for dmd, there's 'make gcov' to generate coverage data.
Nov 28 2014
On Fri, Nov 28, 2014 at 12:42:06PM -0800, Walter Bright via Digitalmars-d wrote:On 11/28/2014 11:35 AM, H. S. Teoh via Digitalmars-d wrote:[...]On Fri, Nov 28, 2014 at 11:32:25AM -0800, H. S. Teoh via Digitalmars-d wrote:Nevermind, I found the reason. Make overwrites CFLAGS even if you intended to append to it with `make CFLAGS+=--coverage`, so the other necessary CFLAGS were missing. Gah. Eventually I saw that specifying DEBUG=1 and ENABLE_PROFILING=1 causes the makefile to do the Right Thing(tm), so that's what I did. After that, make gcov does its job. Except it only works if you're in dmd/src, since the top-level makefile has no idea what you're talking about, in spite of the fact that the two makefiles are obviously connected. I hate make so much[1]. :-( [1] http://www.conifersystems.com/whitepapers/gnu-make/ T -- People demand freedom of speech to make up for the freedom of thought which they avoid. -- Soren Aabye Kierkegaard (1813-1855)I don't know. Haven't tried it in a while, likely it is suffering from bit rot.Also, don't I have to first compile dmd with --coverage and run the test suite before it has the coverage data??[...] Which I had tried (make -f posix.mak -j6 MODEL=64 CFLAGS=--coverage), but the compilation aborts with: inifile.c:101:3: error: #error SYSCONFDIR not defined which goes away when --coverage is not specified. What gives?
Nov 28 2014
On Fri, Nov 28, 2014 at 01:55:26PM -0800, H. S. Teoh via Digitalmars-d wrote: [...]Eventually I saw that specifying DEBUG=1 and ENABLE_PROFILING=1 causes the makefile to do the Right Thing(tm), so that's what I did. After that, make gcov does its job.[...] I've added this information to the wiki so that it won't be forgotten again: http://wiki.dlang.org/Building_DMD#DMD_profiling_and_test_coverage T -- Just because you survived after you did it, doesn't mean it wasn't stupid!
Nov 28 2014
On 11/28/2014 2:59 PM, H. S. Teoh via Digitalmars-d wrote:I've added this information to the wiki so that it won't be forgotten again: http://wiki.dlang.org/Building_DMD#DMD_profiling_and_test_coverageGood!
Nov 28 2014
On 11/27/2014 3:32 AM, Martin Nowak wrote:Actually not too bad :). https://dlang.dawg.eu/coverage/ https://coveralls.io/r/MartinNowak/dmdAnd quickfur (H.S. Teoh) once again proves how important having coverage testing is! In trying to increase coverage a lurking bug was uncovered and quickly fixed: https://github.com/D-Programming-Language/dmd/pull/4171
Nov 28 2014
"Walter Bright" wrote in message news:m5b044$1bh2$1 digitalmars.com...And quickfur (H.S. Teoh) once again proves how important having coverage testing is! In trying to increase coverage a lurking bug was uncovered and quickly fixed: https://github.com/D-Programming-Language/dmd/pull/4171Not that fixing it wasn't useful, but that was a minor diagnostic bug that only happens when misusing a feature that nobody uses.
Nov 28 2014
Plenty of "not covered" lines are actually assert(0)'s.
Nov 29 2014
On 11/29/2014 4:08 AM, Trass3r wrote:Plenty of "not covered" lines are actually assert(0)'s.Right, and some of them are also in #ifdef DEBUG / #endif pairs. This is why the code will never reach 100% coverage. But there's still an awful lot we can get covered, and without much effort, either.
Nov 29 2014
On Thursday, 27 November 2014 at 11:32:59 UTC, Martin Nowak wrote:Actually not too bad :). https://dlang.dawg.eu/coverage/ https://coveralls.io/r/MartinNowak/dmdGood step.
Nov 29 2014
On 11/27/2014 3:32 AM, Martin Nowak wrote:Actually not too bad :). https://dlang.dawg.eu/coverage/ https://coveralls.io/r/MartinNowak/dmdMore tests to improve coverage: https://github.com/D-Programming-Language/dmd/pull/4191 when will this page get updated? https://dlang.dawg.eu/coverage/src/lexer.c.gcov.html
Dec 05 2014