[GRASS-dev] unit tests?

Markus Neteler neteler at osgeo.org
Sat Jun 15 01:43:30 PDT 2013

On Wed, Oct 17, 2012 at 5:06 PM, Moritz Lennert
<mlennert at club.worldonline.be> wrote:
> On 17/10/12 16:58, Eric Momsen wrote:
>> Hi all,
>> I'd like to do some further enhancements of i.segment (GSOC 2012
>> project, will hopefully send an official announcement soon!), and have
>> a chance to use it for a class homework project... if I include some
>> unit tests of the results.  I've previously used junit/Netbeans.  For
>> GRASS development, I've been using Geany, and just kept a text file
>> with commands to run after making changes.
>> Does anyone run unit tests on individual modules, or have any advice
>> on an easy way to set something up?  I read a little bit about cunit,
>> but it was already taking longer than junit/Netbeans.  I just need to
>> decide if it will be easy enough to add some unit testing, or if I'd
>> be better doing something else for class and using the time learned to
>> do c unit testing on more development on i.segment :)
> It's been an on and off effort in GRASS, but check here for more info:
> http://grass.osgeo.org/wiki/Test_Suite

While a testsuite is there for a series of commands (I am happy
to contribute more, e.g. by using the examples from the manual
pages), I fail to activate them:

[neteler at oboe v.unpack]$ pwd

[neteler at oboe v.unpack]$ ls -la test_suite/
total 4
-rwxr-xr-x. 1 neteler gis 2180 Nov 10  2012 test.v.unpack.sh*

[neteler at oboe v.unpack]$ make tests
make: *** No rule to make target `tests'.  Stop.
[neteler at oboe v.unpack]$ make test
make: *** No rule to make target `test'.  Stop.

Am I right that a "test" target is still lacking and the hints on above
Wiki page are rather ideas?

It would be important to have a "make test" target in the Makefile
system, perhaps by moving the private one of
to the main Makefile system of GRASS 7?


More information about the grass-dev mailing list