Regression Testing (was Re: patch #1 ...)

Chad Walstrom <[email protected]>
Newsgroups gmane.comp.bug-tracking.gnats.general
Message-ID <[email protected]>
Mel Hatzis wrote:
> If there's general interest in incorporating the test suite I have,
> I'd be happy to try and set something up.

Sounds like a great idea.  Regression testing is always welcome.

> There's a perl component in it though...for setting up a test database
> against which the regression tests are run. I'm not sure how people
> feel about adding a perl dependency to the mix.

As long as the dependency is for development purposes only, I don't see
a problem.  Though, committing a generated database to CVS wouldn't be
an awful idea either. ;-)

> My original idea was to have the tests run via a 'make test, but this
> was not possible since GNATS needs to be (partly) installed in order
> to run...the binaries all have a hard-wired reference to the
> 'databases' file. We could fairly easily overcome this by modifying
> the binaries to allow the databases file to be supplied...either by
> environment variable or command line option (or both).

Right.  Make test could also be run after a test install directory were
created.  As was mentioned in a reply to this post, it's possible to set
up the prefix to a usable test installation directory.  My configure
call is usually something like this:

	$ mkdir +build +install ; cd +build
	$ ../configure --prefix=`pwd`/../+install \
	> --with-gnats-user=$logname
	$ make install
	$ cd ../+install/usr/libexec/...

I do agree that enhancing command-line options would help immensely.

> The perl requirement could perhaps, be resolved, by simply committing
> the generated database to the mix.

We could always start another CVS repository for the test data and test
suite if that would be "easier".  I would be fine with simply creating a
"test" directory.  Is your testing suite a unit-test style?

I had been looking at GNU Nana [1]_ for design-by-contract patterns that
might be helpful.  The CPP macros work best with gcc and gdb, so it's
not 100% portable to other compilers/debuggers.  Might be worth looking
at, in any case.

.. [1] http://directory.fsf.org/nana.html

-- 
Chad Walstrom <[email protected]>           http://www.wookimus.net/
           assert(expired(knowledge)); /* core dump */

_______________________________________________
Help-gnats mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/help-gnats
signature.asc (application/pgp-signature, 189 B)
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.5 (GNU/Linux)

iD8DBQFCHhHQDMcLGCBsWv0RAsjqAJ9jqQmKnwtvmQ/okyYLNQPBJjduFQCfdB/A
eLTPnzfw+d6yaXb3sH5007c=
=tv92
-----END PGP SIGNATURE-----
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.