* Makefile.in (kdb_check): Rewritten to use current admin system tools
authorEzra Peisach <epeisach@mit.edu>
Wed, 8 Oct 1997 15:29:32 +0000 (15:29 +0000)
committerEzra Peisach <epeisach@mit.edu>
Wed, 8 Oct 1997 15:29:32 +0000 (15:29 +0000)
Tests re-enabled....

git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@10216 dc483132-0cff-0310-8789-dd5450dbe970

src/tests/ChangeLog
src/tests/Makefile.in

index 64724789b725dd19028422cc198e26a948b98a48..a2928cfbdb17bc393ccd9f5bfb637e3c0cec66b1 100644 (file)
@@ -1,3 +1,7 @@
+Wed Oct  8 10:52:36 1997  Ezra Peisach  <epeisach@mit.edu>
+
+       * Makefile.in (kdb_check): Rewritten to use current admin system tools.
+
 Wed Jul 30 18:28:06 1997  Tom Yu  <tlyu@mit.edu>
 
        * configure.in: Add "create" directory back.
index 6fc7ec501a689df33835aa898ecb11d86d80afc7..e1f388116c72da3a47c0df3fbbf7c1f6694456ac 100644 (file)
@@ -1,5 +1,8 @@
 CFLAGS = $(CCOPTS)
-RUN_SETUP = @KRB5_RUN_ENV@
+RUN_SETUP = @KRB5_RUN_ENV@ KRB5_KDC_PROFILE=kdc.conf
+KRB5_RUN_ENV= @KRB5_RUN_ENV@
+PROG_LIBPATH=-L$(TOPLIBD)
+PROG_RPATH=$(KRB5_LIBDIR)
 
 TEST_DB = ./testdb
 TEST_REALM = FOO.TEST.REALM
@@ -11,30 +14,49 @@ TEST_PREFIX = "foo bar"
 KADMIN_OPTS= -d $(TEST_DB) -r $(TEST_REALM) -P $(TEST_MKEY)
 KTEST_OPTS= $(KADMIN_OPTS) -p $(TEST_PREFIX) -n $(TEST_NUM) -D $(TEST_DEPTH)
 
-old-check-unix:: kdb_check
+check-unix:: kdb_check
 
-kdb_check:
+kdc.conf: Makefile
+       rm -rf kdc.conf
+       @echo "[realms]" > kdc.conf
+       @echo "$(TEST_REALM) = {" >> kdc.conf
+       @echo "  key_stash_file = `pwd`/stash_file" >> kdc.conf
+       @echo "}" >> kdc.conf
+
+
+kdb_check: kdc.conf
        $(RM) $(TEST_DB)*
-       $(RUN_SETUP) ../admin/create/kdb5_create $(KADMIN_OPTS)
+       $(RUN_SETUP) ../kadmin/dbutil/kdb5_util $(KADMIN_OPTS) create
        $(RUN_SETUP) ../tests/create/kdb5_mkdums $(KTEST_OPTS) 
        $(RUN_SETUP) ../tests/verify/kdb5_verify $(KTEST_OPTS) 
-       $(RUN_SETUP) ../admin/edit/kdb5_edit $(KADMIN_OPTS) -R "dump_db $(TEST_DB).dump"
-       $(RUN_SETUP) ../admin/edit/kdb5_edit $(KADMIN_OPTS) -R "dump_db -old $(TEST_DB).odump"
-       $(RUN_SETUP) ../admin/destroy/kdb5_destroy -d $(TEST_DB) -f
-       $(RUN_SETUP) ../admin/edit/kdb5_edit -r $(TEST_REALM) -R "load_db $(TEST_DB).dump $(TEST_DB)"
+       $(RUN_SETUP) ../kadmin/dbutil/kdb5_util $(KADMIN_OPTS) dump $(TEST_DB).dump
+       $(RUN_SETUP) ../kadmin/dbutil/kdb5_util $(KADMIN_OPTS) dump -ov $(TEST_DB).ovdump
+       $(RUN_SETUP) ../kadmin/dbutil/kdb5_util $(KADMIN_OPTS) dump -old $(TEST_DB).odump
+       $(RUN_SETUP) ../kadmin/dbutil/kdb5_util $(KADMIN_OPTS) destroy -f
+       $(RUN_SETUP) ../kadmin/dbutil/kdb5_util $(KADMIN_OPTS) load $(TEST_DB).dump 
+       $(RUN_SETUP) ../kadmin/dbutil/kdb5_util $(KADMIN_OPTS) load -update -ov $(TEST_DB).ovdump 
        $(RUN_SETUP) ../tests/verify/kdb5_verify $(KTEST_OPTS) 
-       $(RUN_SETUP) ../admin/edit/kdb5_edit $(KADMIN_OPTS) -R "dump_db $(TEST_DB).dump2"
+       $(RUN_SETUP) ../kadmin/dbutil/kdb5_util $(KADMIN_OPTS) dump $(TEST_DB).dump2
+       $(RUN_SETUP) ../kadmin/dbutil/kdb5_util $(KADMIN_OPTS) dump -ov $(TEST_DB).ovdump2
        sort $(TEST_DB).dump > $(TEST_DB).sort
        sort $(TEST_DB).dump2 > $(TEST_DB).sort2
+       sort $(TEST_DB).ovdump > $(TEST_DB).ovsort
+       sort $(TEST_DB).ovdump2 > $(TEST_DB).ovsort2
        cmp $(TEST_DB).sort $(TEST_DB).sort2
-       $(RUN_SETUP) ../admin/destroy/kdb5_destroy -d $(TEST_DB) -f
-       $(RUN_SETUP) ../admin/edit/kdb5_edit -r $(TEST_REALM) -R "load_db -old $(TEST_DB).odump $(TEST_DB)"
+       cmp $(TEST_DB).ovsort $(TEST_DB).ovsort2
+       $(RUN_SETUP) ../kadmin/dbutil/kdb5_util $(KADMIN_OPTS) destroy -f
+       # Quirk with load -old, need to create first - and stash!
+       $(RUN_SETUP) ../kadmin/dbutil/kdb5_util $(KADMIN_OPTS) create -s
+       $(RUN_SETUP) ../kadmin/dbutil/kdb5_util $(KADMIN_OPTS) load -old $(TEST_DB).odump 
        $(RUN_SETUP) ../tests/verify/kdb5_verify $(KTEST_OPTS) 
-       $(RUN_SETUP) ../admin/edit/kdb5_edit $(KADMIN_OPTS) -R "dump_db -old $(TEST_DB).odump2"
+       $(RUN_SETUP) ../kadmin/dbutil/kdb5_util $(KADMIN_OPTS) dump -old $(TEST_DB).odump2
        sort $(TEST_DB).odump > $(TEST_DB).osort
        sort $(TEST_DB).odump2 > $(TEST_DB).osort2
        cmp $(TEST_DB).osort $(TEST_DB).osort2
-       $(RUN_SETUP) ../admin/destroy/kdb5_destroy -d $(TEST_DB) -f
+       $(RUN_SETUP) ../kadmin/dbutil/kdb5_util $(KADMIN_OPTS) destroy -f
        $(RM) $(TEST_DB)*
 
+clean::
+       $(RM) kdc.conf
+