[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

make check

From: Ben Collins-Sussman <sussman_at_collab.net>
Date: 2001-06-01 18:35:07 CEST

gstein: I have to confess that I don't fully understand how tests are
run by 'make check'. It seems that there are two ways to register
them with 'make check' in build.conf:

 1. add a script to the [test-scripts] section
 2. add a build target with "install = test" as an attribute.

Is this correct?

Moving on...

Each test program ends up being added to a Makefile variable called
$(TEST_PROGRAMS). The 'make check' rule seems to loop over each test
in this list and call it with one argument: the $abs_srcdir.

Now, I understand that the 'svn-test*.sh' scripts have been modified
to require such an argument. And I also notice that our C test
programs simply ignore a bogus argument (i.e. any argument that is not
a subtest-number):

$ ./hashdump-test 3
PASS: hashdump-test 3: write hash out, read back in, compare

$ ./hashdump-test moo
notice: ignoring argument 1
PASS: hashdump-test 1: write a hash to a file
PASS: hashdump-test 2: read a file into a hash
PASS: hashdump-test 3: write hash out, read back in, compare

But now I've run into a problem: I'm trying to get a python script to
run, and it's not happy receiving a random string as an argument --
it's expecting a test-number too. Do I now need to change our python
test-system to catch an exception in the case of

    testnum = int(sys.argv[1])

...and just run all the tests when this exception happens? Is that
the best strategy, to make it deliberately ignore non-integer args?

Or maybe a more elegant strategy is not to have our 'make check' rule
pass $abs_srcdir to every darn test. Only 2 scripts require it, and
*all* the other test programs have to be coded to ignore what they all
consider a bogus arg. That seems clunky to me. Maybe we can an
optional build.conf attribute that allows one to specify a particular
sets of args to a test? I mean, it seems like we're coding for the
exception now, not the rule.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Sat Oct 21 14:36:31 2006

This is an archived mail posted to the Subversion Dev mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.