* start_servers, start_servers_local, stop_servers, init_db,
authorBarry Jaspan <bjaspan@mit.edu>
Fri, 27 Sep 1996 21:09:00 +0000 (21:09 +0000)
committerBarry Jaspan <bjaspan@mit.edu>
Fri, 27 Sep 1996 21:09:00 +0000 (21:09 +0000)
  env-setup.sh: first pass at making TEST_SERVER remote server
  testing work

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

src/kadmin/testing/scripts/ChangeLog
src/kadmin/testing/scripts/env-setup.sh
src/kadmin/testing/scripts/env-setup.shin
src/kadmin/testing/scripts/init_db
src/kadmin/testing/scripts/start_servers
src/kadmin/testing/scripts/start_servers_local
src/kadmin/testing/scripts/stop_servers

index 7896242a1f4c1e85412a308eef87909d0df464bb..96ff8972c62ece005a5f7739e4a9ffe470110aae 100644 (file)
@@ -1,5 +1,9 @@
 Fri Sep 27 14:12:59 1996  Barry Jaspan  <bjaspan@mit.edu>
 
+       * start_servers, start_servers_local, stop_servers, init_db,
+       env-setup.sh: first pass at making TEST_SERVER remote server
+       testing work
+
        * env-setup.sh: set K5ROOT to $TESTDIR/krb5-test-root by default,
        but use an absolute path
 
index 0713cddd47e63fc9a9204974ff2d53e818ef161a..4ae11471eeea6c9c689fa3d8b0b58204e1e92b1e 100644 (file)
@@ -21,6 +21,12 @@ if [ "$K5ROOT" = "" ]; then
        K5ROOT="`cd $TESTDIR; pwd`/krb5-test-root"
        export K5ROOT
 fi
+
+REALM=SECURE-TEST.OV.COM; export REALM
+
+# XXX This should be detected by configure!
+EXPECT=/mit/gnu/bin/expect; export EXPECT
+
 COMPARE_DUMP=$TESTDIR/scripts/compare_dump.pl; export COMPARE_DUMP
 FIX_CONF_FILES=$TESTDIR/scripts/fixup-conf-files.pl
 export FIX_CONF_FILES
@@ -37,16 +43,6 @@ CLNTTCL=$TESTDIR/util/ovsec_kadm_clnt_tcl; export CLNTTCL
 SRVTCL=$TESTDIR/util/ovsec_kadm_srv_tcl; export SRVTCL
 QUALNAME=$TOP/inst-scripts/qualname.pl; export QUALNAME
 
-START_SERVERS=$TESTDIR/scripts/start_servers $TEST_SERVER
-export START_SERVERS
-START_SERVERS_LOCAL=$TESTDIR/scripts/start_servers_local
-export START_SERVERS_LOCAL
-
-STOP_SERVERS=$TESTDIR/scripts/stop_servers $TEST_SERVER
-export STOP_SERVERS
-STOP_SERVERS_LOCAL=$TESTDIR/scripts/stop_servers_local
-export STOP_SERVERS_LOCAL
-
 KRB5_CONFIG=$K5ROOT/krb5.conf; export KRB5_CONFIG
 KRB5_KDC_PROFILE=$K5ROOT/kdc.conf; export KRB5_KDC_PROFILE
 KRB5_KTNAME=$K5ROOT/ovsec_adm.srvtab; export KRB5_KTNAME
@@ -56,8 +52,6 @@ if [ "$TEST_SERVER" != "" ]; then
 fi
 if [ "$TEST_PATH" != "" ]; then
        MAKE_KEYTAB="$MAKE_KEYTAB -top $TEST_PATH"
-       START_SERVERS="$START_SERVERS $TEST_PATH"
-       STOP_SERVERS="$STOP_SERVERS $TEST_PATH"
 fi
 
 if [ "x$PS_ALL" = "x" ]; then
index 0713cddd47e63fc9a9204974ff2d53e818ef161a..4ae11471eeea6c9c689fa3d8b0b58204e1e92b1e 100644 (file)
@@ -21,6 +21,12 @@ if [ "$K5ROOT" = "" ]; then
        K5ROOT="`cd $TESTDIR; pwd`/krb5-test-root"
        export K5ROOT
 fi
+
+REALM=SECURE-TEST.OV.COM; export REALM
+
+# XXX This should be detected by configure!
+EXPECT=/mit/gnu/bin/expect; export EXPECT
+
 COMPARE_DUMP=$TESTDIR/scripts/compare_dump.pl; export COMPARE_DUMP
 FIX_CONF_FILES=$TESTDIR/scripts/fixup-conf-files.pl
 export FIX_CONF_FILES
@@ -37,16 +43,6 @@ CLNTTCL=$TESTDIR/util/ovsec_kadm_clnt_tcl; export CLNTTCL
 SRVTCL=$TESTDIR/util/ovsec_kadm_srv_tcl; export SRVTCL
 QUALNAME=$TOP/inst-scripts/qualname.pl; export QUALNAME
 
-START_SERVERS=$TESTDIR/scripts/start_servers $TEST_SERVER
-export START_SERVERS
-START_SERVERS_LOCAL=$TESTDIR/scripts/start_servers_local
-export START_SERVERS_LOCAL
-
-STOP_SERVERS=$TESTDIR/scripts/stop_servers $TEST_SERVER
-export STOP_SERVERS
-STOP_SERVERS_LOCAL=$TESTDIR/scripts/stop_servers_local
-export STOP_SERVERS_LOCAL
-
 KRB5_CONFIG=$K5ROOT/krb5.conf; export KRB5_CONFIG
 KRB5_KDC_PROFILE=$K5ROOT/kdc.conf; export KRB5_KDC_PROFILE
 KRB5_KTNAME=$K5ROOT/ovsec_adm.srvtab; export KRB5_KTNAME
@@ -56,8 +52,6 @@ if [ "$TEST_SERVER" != "" ]; then
 fi
 if [ "$TEST_PATH" != "" ]; then
        MAKE_KEYTAB="$MAKE_KEYTAB -top $TEST_PATH"
-       START_SERVERS="$START_SERVERS $TEST_PATH"
-       STOP_SERVERS="$STOP_SERVERS $TEST_PATH"
 fi
 
 if [ "x$PS_ALL" = "x" ]; then
index 4b710b319cd8ee4538ec7b5663f6e2c5b180df1b..4b4d9548502e65da44488ef7d3ddc787910e8c4a 100644 (file)
@@ -51,6 +51,7 @@ fi
 # done
 
 sed -e "s/__REALM__/$REALM/g" -e "s#__K5ROOT__#$K5ROOT#g" \
+       -e "s/__KDCHOST__/localhost/g" \
        < $TESTDIR/proto/krb5.conf.proto > $K5ROOT/krb5.conf
 sed -e "s/__REALM__/$REALM/g" -e "s#__K5ROOT__#$K5ROOT#g" \
        < $TESTDIR/proto/kdc.conf.proto > $K5ROOT/kdc.conf
index 2e395faf858ac45eb7abb36f5159c0c1bc679aaf..dc958d62c6c826235ecda7f29a2207282b5219ca 100644 (file)
@@ -14,7 +14,7 @@ DUMMY=${SAVE_FILES=$TESTDIR/scripts/save_files.sh}
 DUMMY=${FIX_CONF_FILES=$TESTDIR/scripts/fixup-conf-files.pl}
 DUMMY=${START_SERVERS_LOCAL=$TESTDIR/scripts/start_servers_local}
 # This'll be wrong sometimes
-DUMMY=${RSH_CMD=/usr/ucb/rsh}
+DUMMY=${RSH_CMD=rsh}
 
 # If it's set, set it to true
 VERBOSE=${VERBOSE_TEST:+true}
@@ -39,18 +39,21 @@ if [ $# -gt 0 ]; then
 fi
 
 if [ $local = 0 ]; then
-       $SAVE_FILES || exit 1
-       $FIX_CONF_FILES -server $hostname || exit 1
+
+       # Fix up the local krb5.conf to point to the remote 
+       sed -e "s/__REALM__/$REALM/g" -e "s#__K5ROOT__#$K5ROOT#g" \
+               -e "s/__KDCHOST__/$hostname/g" \
+               < $TESTDIR/proto/krb5.conf.proto > $K5ROOT/krb5.conf
 
 # Using /usr/ucb/rsh and getting rid of "-k $REALM" until we get
 # around to fixing the fact that Kerberos rsh doesn't strip out "-k
 # REALM" when falling back.
 
        START_SERVERS_LOCAL=`echo $START_SERVERS_LOCAL|sed "s%$TOP%$rempath%"`
-       CMD="$RSH_CMD $hostname -l root -n \
-         \"cd $rempath; \\\`testing/scripts/find-make.sh\\\` execute VERBOSE_TEST=$VERBOSE_TEST \
-           TOP=$rempath \
-           CMD='$START_SERVERS_LOCAL $rempath'\""
+       CMD="$RSH_CMD $hostname -n \
+         \"sh -c 'VERBOSE_TEST=$VERBOSE_TEST TOP=$rempath \
+           $rempath/testing/scripts/env-setup.sh \
+               $START_SERVERS_LOCAL $rempath'\""
 
        if $VERBOSE; then
                echo "+++"
index cf4c79c07d440fe2c70bf80bb09c1178a94b40c4..249d3ffd0bd3bd91799b8e814df0180f26e98dfb 100644 (file)
@@ -154,7 +154,7 @@ while true; do
                else
                        LOG_USER='log_user 0'
                fi
-               if expect <<EOF
+               if $EXPECT <<EOF
                $LOG_USER
                spawn telnet localhost 1751
                expect {
index fc5372dd4e47c0ee04d99325a583922d1492d2aa..563087e3186d297edd14a450ecd4c96df02f7979 100644 (file)
@@ -13,7 +13,7 @@ DUMMY=${TESTDIR=$TOP/testing}
 DUMMY=${FIX_CONF_FILES=$TESTDIR/scripts/fixup-conf-files.pl}
 DUMMY=${STOP_SERVERS_LOCAL=$TESTDIR/scripts/stop_servers_local}
 # This'll be wrong sometimes
-DUMMY=${RSH_CMD=/usr/ucb/rsh}
+DUMMY=${RSH_CMD=rsh}
 DUMMY=${RESTORE_FILES=$TESTDIR/scripts/restore_files.sh}
 
 # If it's set, set it to true
@@ -43,29 +43,12 @@ if [ $local = 0 ]; then
                echo "+++ Stopping servers on remote host $hostname..."
        fi
 
-#      $FIX_CONF_FILES -server $hostname
-#
-#      KRB5CCNAME=FILE:/tmp/krb5cc_stop_servers; export KRB5CCNAME
-#
-#      expect <<EOF
-#spawn kinit admin
-#expect {
-#      -re "Password for admin@SECURE-TEST.OV.COM" {
-#              send "admin\n"
-#      }
-#}
-#expect { eof { } }
-#EOF
-
-# Using /usr/ucb/rsh and getting rid of "-k REALM" until we get around
-# to fixing the fact that Kerberos rsh doesn't strip out "-k REALM"
-# when falling back.
-
        STOP_SERVERS_LOCAL=`echo $STOP_SERVERS_LOCAL | sed "s%$TOP%$rempath%"`
-       CMD="$RSH_CMD $hostname -l root -n\
-             \"cd $rempath; \\\`testing/scripts/find-make.sh\\\` execute VERBOSE_TEST=$VERBOSE_TEST \
-               TOP=$rempath \
-               CMD='$STOP_SERVERS_LOCAL $rempath'\""
+       CMD="$RSH_CMD $hostname -n \
+             \"sh -c 'VERBOSE_TEST=$VERBOSE_TEST TOP=$rempath \
+               $rempath/testing/scripts/env-setup.sh \
+                  $STOP_SERVERS_LOCAL $rempath'\""
+
        if $VERBOSE; then
                echo "+++"
                echo "+++ Begin execution of stop_servers_local on $hostname"
@@ -78,7 +61,6 @@ if [ $local = 0 ]; then
                echo "+++ End execution of stop_servers_local on $hostname"
                echo "+++"
        fi
-       $RESTORE_FILES
 else
        $STOP_SERVERS_LOCAL
 fi