[Date Prev][Date Next]
RE: test script argument handling
At 10:59 AM 10/19/2003, Howard Chu wrote:
>> -----Original Message-----
>> From: owner-openldap-devel@OpenLDAP.org
>> [mailto:owner-openldap-devel@OpenLDAP.org]On Behalf Of Kurt D. Zeilenga
>> I'm thinking that we likely should remove most of the
>> argument handling from tests/Makefile. I'm thinking
>> maybe we should have configure generate a run script
>> (from run.in) which the make file calls to run tests.
>> The script could also be called directly.
>> ./run all (run all w/ bdb)
>> ./run -db=hdb all (run all w/ hdb)
>> ./run test001
>> ./run acls
>Maybe we should turn defines.sh into defines.in and catch it there.
The problem here is that the test script would have difficulties
in finding the defines.sh as it would be located in the object
directory instead of the source directory when VPATH is used.
>gripe with the old setup was that args were being added to the command line
>that were pretty much invariants, making it more difficult to use the args
>that actually were runtime selectable. (E.g., BUILD_BDB's value doesn't
>change, but whether or not to wait for someone to attach a debugger is a
>choice you make on a run-by-run basis.)
Well, the "bdb" is not always used as an invariant. Sometimes it
used to select the DB variant when slapd was built with multiple.
>When tracking down a test failure I want to be able to run the test by hand
>with a minimal amount of typing. I'm not sure that putting a run script in
>front of each test will improve things, but configuring defines.sh might
The problem we have now is that invariants such as PROXYCACHE
and WITHTLS need to be specified by the user when the script
is ran by hand.
>> Also, maybe the script could handle (better) the creation
>> and removal of DB directories.
>Creation, at least, seems to me to be exactly what Makefiles are for.
No, Makefiles are for specifying and managing dependencies. I view
DB directories as test state which is to be kept until a) next test
or b) make clean (which, I think, could call "./run clean".
>Are you talking about emptying the directories out so a new test can be run?
Yes. I'd like to have one script (e.g., ./run clean) which cleaned
things up for the next test.
> -- Howard Chu
> Chief Architect, Symas Corp. Director, Highland Sun
> http://www.symas.com http://highlandsun.com/hyc
> Symas: Premier OpenSource Development and Support