← Back to team overview

dolfin team mailing list archive

Re: Adding tests

 

On Tue, Oct 9, 2012 at 9:06 PM, Anders Logg <logg@xxxxxxxxx> wrote:
> On Tue, Oct 09, 2012 at 01:28:05PM -0500, Andy Ray Terrel wrote:
>
>> > Yes, running the script works.  I should have read it more carefully.
>> > I had just put all my quad tests into the Mesh test.  Is that
>> > preferred over splitting out tests?  To be honest, a stricter person
>> > would require tests on each class but that becomes cumbersome in such
>> > a large project.
>
> Yes, we should have tests for each class. It's just laziness (or
> rather lack of time). We started out with just one test.py for each
> module and have since started to create one for each class (see
> directory test/unit/mesh/python/).
>
>> Another question, when a cpp test is changed, the build command
>> doesn't copy it over to the build directory (like it does for the
>> source files).  The tests seem only to be copied when the configure is
>> run.  Is this normal or am I doing something wrong?
>
> It should copy it over. Johannes?

The files are only copied over when cmake is run, like it should. When
making changes to a test, make it to the one in the source directory,
not the one in the build directory. Then run make from the build
directory and the test should be rebuilt.. Here is an example:

  ./cmake.local
  source build/dolfin.conf
  cd build/test/unit/la/cpp
  make
  # make some changes in <dolfin-src>/test/unit/la/cpp/Vector.cpp
  make

The last step should rebuild the test.

Does that help?

Johannes


Follow ups

References