digitalmars.D - code coverage under Linux
- Amaury (8/8) Nov 19 2008 Hello,
- Olli Aalto (6/15) Nov 19 2008 try:
- Amaury (4/22) Nov 20 2008 Hi,
- Walter Bright (2/4) Nov 20 2008 No, you shouldn't need anything other than dmd.
- Amaury (2/7) Nov 21 2008 So it won't work!? :'(
- Sean Kelly (3/11) Nov 21 2008 What version of DMD are you using? What were your build options?
- Amaury (10/24) Nov 21 2008 My DMD version is : Digital Mars D Compiler v1.030
- Gide Nwawudu (35/41) Nov 22 2008 Works for me, it produces the following file sieve.d.lst, in both DMD
- Walter Bright (4/12) Nov 21 2008 I have no idea why it isn't working for you. Doing coverage runs is part...
- Walter Bright (3/4) Nov 23 2008 Looks like the problem is in libdruntime.a. It'll be fixed in the next
- Amaury (4/9) Nov 24 2008 It would be great and useful.
- Sean Kelly (4/8) Nov 24 2008 I believe I've fixed this in the druntime svn trunk (still have to merge...
Hello, I'm looking for testing the code coverage fonctionnality with dmd under Ubuntu but it seems no to work. The command : $ dmd sieve -cov $ sieve Doesn't create a sieve.lst file... why ? Thanks Amaury
Nov 19 2008
Amaury wrote:Hello, I'm looking for testing the code coverage fonctionnality with dmd under Ubuntu but it seems no to work. The command : $ dmd sieve -cov $ sieve Doesn't create a sieve.lst file... why ?try: dmd -cov sieve.d ./sieve Works for me. O.
Nov 19 2008
Hi, I have already tried this and it doesn't work, I also tried with a sudo command... Do I need something else than just dmd ? Amaury Olli Aalto Wrote:Amaury wrote:Hello, I'm looking for testing the code coverage fonctionnality with dmd under Ubuntu but it seems no to work. The command : $ dmd sieve -cov $ sieve Doesn't create a sieve.lst file... why ?try: dmd -cov sieve.d ./sieve Works for me. O.
Nov 20 2008
Amaury wrote:Hi, I have already tried this and it doesn't work, I also tried with a sudo command... Do I need something else than just dmd ? AmauryNo, you shouldn't need anything other than dmd.
Nov 20 2008
Walter Bright Wrote:Amaury wrote:So it won't work!? :'(Hi, I have already tried this and it doesn't work, I also tried with a sudo command... Do I need something else than just dmd ? AmauryNo, you shouldn't need anything other than dmd.
Nov 21 2008
Amaury wrote:Walter Bright Wrote:What version of DMD are you using? What were your build options? SeanAmaury wrote:So it won't work!? :'(Hi, I have already tried this and it doesn't work, I also tried with a sudo command... Do I need something else than just dmd ? AmauryNo, you shouldn't need anything other than dmd.
Nov 21 2008
My DMD version is : Digital Mars D Compiler v1.030 What do you mean by my build option? the options to build my .d? I'm just trying the simple example of sieve : dmd -cov sieve.d ./sieve no .lst is created. Thx Amaury ps : note that I'm french and working to translate the "D 1.0 overview" in the aim to make it attractive for french programmers, I'm fond of unit tests en coverage... I'll post about this later, when done. Sean Kelly Wrote:Amaury wrote:Walter Bright Wrote:What version of DMD are you using? What were your build options? SeanAmaury wrote:So it won't work!? :'(Hi, I have already tried this and it doesn't work, I also tried with a sudo command... Do I need something else than just dmd ? AmauryNo, you shouldn't need anything other than dmd.
Nov 21 2008
On Fri, 21 Nov 2008 12:38:58 -0500, Amaury <ammo32uzi hotmail.com> wrote:My DMD version is : Digital Mars D Compiler v1.030 What do you mean by my build option? the options to build my .d? I'm just trying the simple example of sieve : dmd -cov sieve.d ./sieve no .lst is created.Works for me, it produces the following file sieve.d.lst, in both DMD 1.033 and 2.020. C:> dmd -cov sieve.d C:> sieve |import std.stdio; | |bool[8191] flags; | |int main() 5|{ int i, count, prime, k, iter; | 1| writefln("10 iterations"); 22| for (iter = 1; iter <= 10; iter++) 10| { count = 0; 10| flags[] = 1; 163840| for (i = 0; i < flags.length; i++) 81910| { if (flags[i]) 18990| { prime = i + i + 3; 18990| k = i + prime; 168980| while (k < flags.length) | { 149990| flags[k] = 0; 149990| k += prime; | } 18990| count += 1; | } | } | } 1| writefln("%d primes", count); 1| return 0; |} sieve.d is 100% covered Gide
Nov 22 2008
Amaury wrote:Walter Bright Wrote:I have no idea why it isn't working for you. Doing coverage runs is part of the dmd test suite, so it was run and worked correctly for Windows and Ubuntu.Amaury wrote:So it won't work!? :'(Hi, I have already tried this and it doesn't work, I also tried with a sudo command... Do I need something else than just dmd ? AmauryNo, you shouldn't need anything other than dmd.
Nov 21 2008
Amaury wrote:Doesn't create a sieve.lst file... why ?Looks like the problem is in libdruntime.a. It'll be fixed in the next update.
Nov 23 2008
Walter Bright Wrote:Amaury wrote:It would be great and useful. Thanks AmauryDoesn't create a sieve.lst file... why ?Looks like the problem is in libdruntime.a. It'll be fixed in the next update.
Nov 24 2008
== Quote from Walter Bright (newshound1 digitalmars.com)'s articleAmaury wrote:I believe I've fixed this in the druntime svn trunk (still have to merge the changes to the D 1.0 branch). SeanDoesn't create a sieve.lst file... why ?Looks like the problem is in libdruntime.a. It'll be fixed in the next update.
Nov 24 2008