1#!/bin/sh 2 3LDB_URL="tdb://schema.ldb" 4export LDB_URL 5 6rm -f schema.ldb 7 8echo "LDB_URL: $LDB_URL" 9 10echo "Adding schema" 11$VALGRIND bin/ldbadd $LDBDIR/tests/schema-tests/schema.ldif || exit 1 12 13echo "Adding few test elements (no failure expected here)" 14$VALGRIND bin/ldbadd $LDBDIR/tests/schema-tests/schema-add-test.ldif || exit 1 15 16echo "Modifying elements (2 failures expected here)" 17 18$VALGRIND bin/ldbmodify $LDBDIR/tests/schema-tests/schema-mod-test-1.ldif || exit 1 19$VALGRIND bin/ldbmodify $LDBDIR/tests/schema-tests/schema-mod-test-2.ldif || exit 1 20$VALGRIND bin/ldbmodify $LDBDIR/tests/schema-tests/schema-mod-test-3.ldif || exit 1 21$VALGRIND bin/ldbmodify $LDBDIR/tests/schema-tests/schema-mod-test-4.ldif 22if [ "$?" == "0" ]; then 23 echo "test failed!" 24 exit 1 25fi 26$VALGRIND bin/ldbmodify $LDBDIR/tests/schema-tests/schema-mod-test-5.ldif 27if [ "$?" == "0" ]; then 28 echo "test failed!" 29 exit 1 30fi 31 32echo "Showing modified record" 33$VALGRIND bin/ldbsearch '(cn=Test)' || exit 1 34 35