Re: Trying to use Dustmite

2016-10-19 Thread Nordlöw via Digitalmars-d-learn

On Wednesday, 19 October 2016 at 08:50:47 UTC, Nordlöw wrote:
I want to reduce with respect to AssertError thrown in the 
function `err`. BUt when I call


dustmite src 'dmd tester && ./tester | grep -qF "Assertion 
failure"'


Found it. Shall be:

dustmite src 'dmd tester && ./tester 2>&1 | grep -qF 
"Assertion failure"'




Re: Trying to use Dustmite

2016-10-19 Thread Nordlöw via Digitalmars-d-learn

On Wednesday, 19 October 2016 at 08:50:47 UTC, Nordlöw wrote:
object.Exception@dustmite.d(270): Initial test fails (try using 
--no-redirect for details)


When I add the flag --no-redirect to DMD I instead get


Loading src/tester.d
None => core.exception.AssertError@tester.d(3): Assertion failure

??:? _d_assert [0x4276bb]
??:? void tester.__assert(int) [0x4275ec]
??:? void tester.err(int) [0x427562]
??:? _Dmain [0x427599]
??:? 
_D2rt6dmain211_d_run_mainUiPPaPUAAaZiZ6runAllMFZ9__lambda1MFZv 
[0x427b32]
??:? void rt.dmain2._d_run_main(int, char**, extern (C) int 
function(char[][])*).tryExec(scope void delegate()) [0x427a7c]
??:? void rt.dmain2._d_run_main(int, char**, extern (C) int 
function(char[][])*).runAll() [0x427aee]
??:? void rt.dmain2._d_run_main(int, char**, extern (C) int 
function(char[][])*).tryExec(scope void delegate()) [0x427a7c]

??:? _d_run_main [0x4279ed]
??:? main [0x427625]
??:? __libc_start_main [0xa71282f]
No
object.Exception@dustmite.d(270): Initial test fails

??:? _Dmain [0x5c6be8]
??:? 
_D2rt6dmain211_d_run_mainUiPPaPUAAaZiZ6runAllMFZ9__lambda1MFZv 
[0x62544e]
??:? void rt.dmain2._d_run_main(int, char**, extern (C) int 
function(char[][])*).tryExec(scope void delegate()) [0x625398]
??:? void rt.dmain2._d_run_main(int, char**, extern (C) int 
function(char[][])*).runAll() [0x62540a]
??:? void rt.dmain2._d_run_main(int, char**, extern (C) int 
function(char[][])*).tryExec(scope void delegate()) [0x625398]

??:? _d_run_main [0x625309]
??:? main [0x61732d]
??:? __libc_start_main [0xbe15382f]


Which doesn't seem to be what I want, right?


Trying to use Dustmite

2016-10-19 Thread Nordlöw via Digitalmars-d-learn

I'm trying to figure out how to use DustMite.

I have a file `tester.d` in a clean sub-directory `src` containing


void err(int x)
{
assert(x > 0);
}

auto inc(int x)
{
return x + 1;
}

void main(string[] args)
{
auto y = inc(42);
err(10);
err(-10);
}


I want to reduce with respect to AssertError thrown in the 
function `err`. BUt when I call


dustmite src 'dmd tester && ./tester | grep -qF "Assertion 
failure"'


I doesn't progress but instead I get

Loading src/tester.d
None => No
object.Exception@dustmite.d(270): Initial test fails (try using 
--no-redirect for details)


??:? _Dmain [0x5c6be8]
??:? 
_D2rt6dmain211_d_run_mainUiPPaPUAAaZiZ6runAllMFZ9__lambda1MFZv 
[0x62544e]
??:? void rt.dmain2._d_run_main(int, char**, extern (C) int 
function(char[][])*).tryExec(scope void delegate()) [0x625398]
??:? void rt.dmain2._d_run_main(int, char**, extern (C) int 
function(char[][])*).runAll() [0x62540a]
??:? void rt.dmain2._d_run_main(int, char**, extern (C) int 
function(char[][])*).tryExec(scope void delegate()) [0x625398]

??:? _d_run_main [0x625309]
??:? main [0x61732d]
??:? __libc_start_main [0xb429f82f]

What am doing wrong?


Re: Trying to use Dustmite on windows

2016-03-22 Thread Jerry via Digitalmars-d-learn
On Tuesday, 22 March 2016 at 09:19:27 UTC, Vladimir Panteleev 
wrote:

On Tuesday, 22 March 2016 at 09:11:52 UTC, Jerry wrote:

So I want to pass my DUB project to Dustmite and use findstr


For reducing dub projects, try the "dub dustmite" command, e.g.
 "--compiler-regex=Assertion failure".


Thanks that works nice. But now my Initial run fails.
Using
dub dustmite ../testReduction --compiler-regex="Assertion failure"

However when I navigate to the testReduction directory and runs 
dub I get error message:

Assertion failure: '0' on line 1942 in file 'glue.c'


Re: Trying to use Dustmite on windows

2016-03-22 Thread Vladimir Panteleev via Digitalmars-d-learn

On Tuesday, 22 March 2016 at 09:11:52 UTC, Jerry wrote:

So I want to pass my DUB project to Dustmite and use findstr


For reducing dub projects, try the "dub dustmite" command, e.g.  
"--compiler-regex=Assertion failure".




Trying to use Dustmite on windows

2016-03-22 Thread Jerry via Digitalmars-d-learn

I am really not used to bash scripts.
I am trying to use Dustmite on my project since I have started 
getting an
"Assertion failure: '0' in glue.c on line 1492" and really can 
not find any issue about it in the issue tracker.


So I want to pass my DUB project to Dustmite and use findstr bash 
command to figure out result. So what I come up with was this:


dustmite source "dub run | findstr /b /C:\"Assertion failure\""


But findstr is failing with error message:

"Can not open failure"

/Jerry