257 | | == examples/openldap/BuildTests.sh == |
258 | | |
259 | | I'll probably strip out the ''examples'' section altogether... it was interesting and I learned about RTEMS Makefile.leaf s, but I'm thinking a network-demo is a better testing choice, because the openLDAP tests are written in shell script, and SLAPD may not require a shell to run... |
260 | | |
261 | | To perform a very basic "smoke" test on the build I modified the BuildTest.sh and Makefile to build the programs needed to run the tests, not the tests themselves. I learned I how to link convenience libraries, and how to use BuildTests.sh, Makefile.leaf and change leaf.cfg. |
262 | | |
263 | | Interestingly, I found it necessary to symbolically link the slapd-common header and source to each test, as well as the libutil library. |
264 | | |
265 | | ### examples/openldap/BuildTests.sh ### |
266 | | #!/bin/sh |
267 | | |
268 | | set -x |
269 | | rm -f rtems-grub.cfg |
270 | | |
271 | | SRCDIR=../../openldap/tests/progs |
272 | | |
273 | | Make the common source and header files available to all the test programs |
274 | | |
275 | | ln -s $SRCDIR/slapd-common.h . |
276 | | ln -s $SRCDIR/slapd-common.c . |
277 | | |
278 | | Make the lutility convenience library available to all the test programs |
279 | | |
280 | | ln -s $SRCDIR/../../libraries/liblutil/liblutil.a . |
281 | | |
282 | | For every test, delete the old link, make a new link, make the test, delete the link and the object file. |
283 | | |
284 | | for TEST in \ |
285 | | slapd-tester \ |
286 | | slapd-search \ |
287 | | slapd-read \ |
288 | | slapd-addel \ |
289 | | slapd-modrdn \ |
290 | | slapd-modify \ |
291 | | slapd-bind \ |
292 | | slapd-mtread \ |
293 | | ldif-filter |
294 | | do |
295 | | rm -f $TEST.c |
296 | | ln -s $SRCDIR/$TEST.c . |
297 | | make TEST=$TEST SRCDIR=$SRCDIR |
298 | | rm -f $TEST.c $TEST.o |
299 | | done |
300 | | After making the test programs, remove the links to the common header, source, and lutility library. |
301 | | |
302 | | rm -f slapd-common.h |
303 | | rm -f slapd-common.c |
304 | | rm -f liblutil.a |
| 257 | = rtems-grub.cfg = |