diff options
| author | Nalin Dahyabhai <nalin.dahyabhai@pobox.com> | 2009-05-06 15:11:26 -0400 |
|---|---|---|
| committer | Nalin Dahyabhai <nalin.dahyabhai@pobox.com> | 2009-05-06 15:11:26 -0400 |
| commit | 1821bd22b287c7ce6da2614e6f601c3597eb988a (patch) | |
| tree | e63e0eea8167ef40f4e247ef5e5419d3aa59f1d3 | |
| parent | d3a7ea635f7f03ea20669aaa788e01c724149e6b (diff) | |
- if there's a script to edit the default dse.ldif in the test
directory, run it before starting the server
| -rwxr-xr-x | tests/run-tests.sh | 6 | ||||
| -rw-r--r-- | tests/slapd.sh.in | 6 |
2 files changed, 11 insertions, 1 deletions
diff --git a/tests/run-tests.sh b/tests/run-tests.sh index 0199a19..903530a 100755 --- a/tests/run-tests.sh +++ b/tests/run-tests.sh @@ -9,7 +9,11 @@ showdiff() } for subdir in "$@" ; do pushd $subdir > /dev/null - startslapd $TESTDIR/$subdir/dse.ldif $TESTDIR/$subdir/userRoot.ldif + precmd= + if test -x edit-dse-config.sh ; then + precmd="$TESTDIR/$subdir/edit-dse-config.sh $BTESTDIR/config/dse.ldif" + fi + startslapd $TESTDIR/$subdir/dse.ldif $TESTDIR/$subdir/userRoot.ldif "$precmd" if test -x $TESTDIR/$subdir/before.sh ; then $TESTDIR/$subdir/before.sh > before.out 2>&1 if test -r $TESTDIR/$subdir/before.txt ; then diff --git a/tests/slapd.sh.in b/tests/slapd.sh.in index d3d8e7e..9d11ece 100644 --- a/tests/slapd.sh.in +++ b/tests/slapd.sh.in @@ -64,6 +64,12 @@ startslapd() { if test -n "$1" && test -s "$1" ; then cat "$1" >> $BTESTDIR/config/dse.ldif fi + if test -x $TESTDIR/$subdir/edit-dse-config.sh ; then + if ! $TESTDIR/$subdir/edit-dse-config.sh $BTESTDIR/config/dse.ldif ; then + echo ERROR: failed edit dse.ldif before starting server. + exit 1 + fi + fi @NIS_PLUGIN_CONTINUE_WITHOUT_PORTMAP_ENV@=1 \ @TRACE_CMD@ \ $SLAPD -D $BTESTDIR/config -i $STATEDIR/pid -w $STATEDIR/pid |
