[qmtest] what is a test database ?
Mark Mitchell
mark at codesourcery.com
Mon Jun 16 17:29:14 UTC 2003
On Fri, 2003-06-13 at 06:23, Stefan Seefeld wrote:
> Little followup on my own mail...
>
> Stefan Seefeld wrote:
>
> > In what context would I make the tests themselfs persistent ?
> > Don't they always reflect the current state of the code (i.e.
> > in the repository) ?
> > What is the meaning of 'test database' then ?
>
> it may be a good idea to make the compilation of the actual test
> be part of the test, especially in the context of C++ and template
> instantiations which one might want to test.
>
> So, the persistence is expressed already within the build system,
> which contains rules to compile the tests. In that case it might
> be a good idea to have a Database implementation that collaborates
> with the build system, i.e. a test in a database contains data to
>
> a) build it
> b) run it
> c) interpret results
>
> Does this make sense ?
Yes, that's how our GCC tests work.
You can encode the logic to build the tests in the test database, or in
some external source, as you prefer.
A test database maps test IDs to test classes and arguments. A test
class encapsulates a method for running a test and determining whether
it passed or failed; the arguments are what make one instance of the
test class different from another.
--
Mark Mitchell
CodeSourcery, LLC
mark at codesourcery.com
More information about the qmtest
mailing list