Running automated or unit tests?

Geert Janssens janssens-geert at telenet.be
Tue Mar 9 07:18:16 EST 2010


On Tuesday 9 March 2010, John Ralls wrote:
> On Mar 8, 2010, at 5:25 PM, Jeff Kletsky wrote:
> > On 3/8/2010 4:59 PM, Jeff Kletsky wrote:
> >> Maybe I'm blind, but I'm not seeing how to run unit/automated testing
> >> (or how to add more unit tests to the quite).
> >>
> >> Would someone point me in the right direction so I can be more confident
> >> I'm not breaking things?
> >>
> >> -j
> >
> > make check??
> >
> > The following Q&D patch (and similar to test-resolve-url.c) will fix the
> > compile breakage, but looks like the WIP related to r18842 needs to
> > complete before they pass.
> >
> > diff --git a/src/core-utils/test/test-resolve-file-path.c
> > b/src/core-utils/test/test-resolve-file-path.c index 8d89a3b..b6503a4
> > 100644
> > --- a/src/core-utils/test/test-resolve-file-path.c
> > +++ b/src/core-utils/test/test-resolve-file-path.c
> > @@ -104,7 +104,7 @@ main(int argc, char **argv)
> >             wantout = g_strdup(strs[i].output);
> >         }
> >
> > -        daout = xaccResolveFilePath(dain);
> > +        daout = gnc_resolve_file_path(dain);
> >         do_test_args(safe_strcmp(daout, wantout) == 0,
> >                      "xaccResolveFilePath",
> >                      __FILE__, __LINE__,
> 
> Yes, `make check ` is the standard autotools way to run a test suite.
> 
> Looks like that's the appropriate change for xaccResolveFilePath.
>  Test-resolve-url.c should be deleted, since there's no direct replacement
>  for xaccResolveURL (it didn't do anything useful anyway), but Geert should
>  write new tests to verify the behavior of his new functions.
> 
> Regards,
> John Ralls
> 
I did clean up the failing tests already, using Jeff's patch. New tests will 
follow.

Geert


More information about the gnucash-devel mailing list