Re: Building and running DMD tests

2019-12-04 Thread Per Nordlöw via Digitalmars-d-learn

On Monday, 2 December 2019 at 02:15:36 UTC, Suleyman wrote:
The command you need is "make -Ctest". Or you can run a 
specific test manually using run.d.

```
cd test/
./run.d compilable/traits.d
```


Thanks


Re: Building and running DMD tests

2019-12-01 Thread Suleyman via Digitalmars-d-learn

On Sunday, 1 December 2019 at 15:20:42 UTC, Per Nordlöw wrote:
Is it possible to compile and run unittest of dmd without 
druntime and phobos?


If so, how?

I'm trying the following under dmd root:

make -C src -f posix.mak unittest
./generated/linux/release/64/dmd-unittest

but that doesn't compile my file of interest

test/compilable/traits.d

.

How can I make sure that all the files under /test/compilable 
compiles?


The command you need is "make -Ctest". Or you can run a specific 
test manually using run.d.

```
cd test/
./run.d compilable/traits.d
```



Re: Building and running DMD tests

2019-12-01 Thread Jonathan M Davis via Digitalmars-d-learn
On Sunday, December 1, 2019 8:20:42 AM MST Per Nordlöw via Digitalmars-d-
learn wrote:
> Is it possible to compile and run unittest of dmd without
> druntime and phobos?
>
> If so, how?
>
> I'm trying the following under dmd root:
>
>  make -C src -f posix.mak unittest
>  ./generated/linux/release/64/dmd-unittest
>
> but that doesn't compile my file of interest
>
> test/compilable/traits.d
>
> .
>
> How can I make sure that all the files under /test/compilable
> compiles?

dmd's tests are designed to be run after you've built druntime and Phobos.
If you look at the tests, many of them import modules from both druntime
and/or Phobos. IIRC, there has been some discussion about whether that
should be changed, but AFAIK, there has been no agreement to do so. I'm also
not sure that it even _can_ be done with regards to druntime, because every
D program that isn't compiled with -betterC requires at least druntime. So,
at most, it would probably mean not requiring Phobos, but either way, at the
moment, the tests in general expect Phobos to have been built and be
available. I don't know how possible it is to get around that with a
specific test module that doesn't actually use Phobos, but that's not how
the tests are normally run, and you'd need druntime regardless.

In addition, I believe that the unittest target that you're trying to build
is specifically for running all of the unittest blocks in the dmd source
code, not for running the tests in the test folder. Those are built using
the makefile in the test folder or by running the test target from the
primary makefile with the target test (which also runs the unittest blocks
in the src folder), whereas you're specifically using the makefile in src.

- Jonathan M Davis






Building and running DMD tests

2019-12-01 Thread Per Nordlöw via Digitalmars-d-learn
Is it possible to compile and run unittest of dmd without 
druntime and phobos?


If so, how?

I'm trying the following under dmd root:

make -C src -f posix.mak unittest
./generated/linux/release/64/dmd-unittest

but that doesn't compile my file of interest

test/compilable/traits.d

.

How can I make sure that all the files under /test/compilable 
compiles?


Running DMD tests

2013-12-08 Thread Dmitry Olshansky

I'm trying my hand at a simple pesky bug in DMD.
About to run test suite but must be doing something wrong.
Any help would be appreciated.

I followed this:
http://wiki.dlang.org/Building_DMD#How_to_run_the_test_suite_in_dmd.2Ftest

And here is what I get (I'm on 64-bit Ubuntu):

dmitry@dmitry-VirtualBox ~/dmd2/src/dmd/test $ make MODEL=64
Creating output directory: test_results
Building d_do_test tool
OS: linux
Running runnable tests
make[1]: *** No rule to make target `test_results/runnable/A16.d.out', 
needed by `run_runnable_tests'.  Stop.

make: *** [start_runnable_tests] Error 2
dmitry@dmitry-VirtualBox ~/dmd2/src/dmd/test $



--
Dmitry Olshansky


Re: Running DMD tests

2011-07-12 Thread Trass3r
Am 13.06.2011, 23:55 Uhr, schrieb Peter Alexander  
peter.alexander...@gmail.com:



I'm trying to run the test suite for DMD, but I'm running into issues.
Do I need to set up my environment differently to run dmd in  
development? How can I get around this?


To quote IRC:

In theory it's simple: go to dmd/test and run make.
In practice you need to have druntime and phobos installed at the right  
places.
I think if you clone dmd, druntime, and phobos and put them all in the  
same directory, then you build dmd, druntime, and phobos, then you should  
be able to run the test suite.


you also need to have a dmd.conf that's not included with the suite :   

Ah, yeah, true. And since I remember I made my dmd.conf point to those  
places, maybe you don't need to have druntime and phobos there after all.
But it's still a good idea to be able to get non-release druntime (and to  
some extent phobos) when playing with non-release versions of DMD.


Re: Running DMD tests

2011-07-12 Thread David Nadlinger
The problem you are experiencing comes from no dmd.conf being included 
with the Git repository. Either you can add one to your Git clone 
directory, or use your normal system-wide installation which probably 
has all the paths set up correctly by specifying the DMD variable: »make 
DMD=/usr/local/bin/dmd«.


David


On 6/13/11 11:55 PM, Peter Alexander wrote:

I'm trying to run the test suite for DMD, but I'm running into issues.

I've cloned dmd from github, and successfully built dmd, but when I run
'make' from the dmd/test dir, I get:

$ make
Creating output directory: test_results
Building d_do_test tool
object.d: Error: module object is in file 'object.d' which cannot
be read
Specify path to file 'object.d' with -I switch
make: *** [test_results/d_do_test] Error 1

Do I need to set up my environment differently to run dmd in
development? How can I get around this?

Note: I'm running OSX 10.6.7

Thanks




Re: Running DMD tests

2011-07-12 Thread Trass3r

Am 12.07.2011, 20:57 Uhr, schrieb David Nadlinger s...@klickverbot.at:
or use your normal system-wide installation which probably has all the  
paths set up correctly by specifying the DMD variable: »make  
DMD=/usr/local/bin/dmd«.


Thanks a lot for that hint!


Running DMD tests

2011-06-13 Thread Peter Alexander

I'm trying to run the test suite for DMD, but I'm running into issues.

I've cloned dmd from github, and successfully built dmd, but when I run 
'make' from the dmd/test dir, I get:


  $ make
  Creating output directory: test_results
  Building d_do_test tool
  object.d: Error: module object is in file 'object.d' which cannot
  be read
  Specify path to file 'object.d' with -I switch
  make: *** [test_results/d_do_test] Error 1

Do I need to set up my environment differently to run dmd in 
development? How can I get around this?


Note: I'm running OSX 10.6.7

Thanks