dolfin team mailing list archive
-
dolfin team
-
Mailing list archive
-
Message #26001
Re: Adding tests
On Mon, Oct 8, 2012 at 9:58 PM, Anders Logg <logg@xxxxxxxxx> wrote:
> On Mon, Oct 08, 2012 at 01:37:58PM -0500, Andy Ray Terrel wrote:
>> On Mon, Oct 8, 2012 at 1:13 PM, Garth N. Wells <gnw20@xxxxxxxxx> wrote:
>> > On Mon, Oct 8, 2012 at 6:42 PM, Andy Ray Terrel <andy.terrel@xxxxxxxxx> wrote:
>> >> Hello,
>> >>
>> >> I've been trying to figure out how to get a test added to the
>> >> unittests in DOLFIN that cmake will pick up. Does anyone have any
>> >> pointers what I have to do after making the unittest source file?
>> >> Reconfiguring doesn't seem to "just pick it up" as adding source to
>> >> the dolfin source dir does.
>> >>
>> >
>> > Add the test to
>> >
>> > test/unit/test.py
>> >
>> > Garth
>> >
>>
>> Thanks. FWIW, the file copy worked (probably some cache problem the
>> first time), but I needed to add the add_executable command to the
>>
>> test/unit/mesh/cpp/CMakeLists.txt
>>
>> But this file says it's generated by:
>>
>> cmake/scripts/generate-cmakefiles
>>
>> I don't see that script reading test/unit/test.py so how do I add the
>> executable stuff?
>
> That file is for controlling which tests should be included when the
> tests are run.
>
> But I understand you are talking about C++ unit tests here. Did you
> run the script? (cmake/scripts/generate-cmakefiles)
>
> --
> Anders
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.
-- Andy
Follow ups
References