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
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
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
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
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
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
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
# 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
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}
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 "+++"
else
LOG_USER='log_user 0'
fi
- if expect <<EOF
+ if $EXPECT <<EOF
$LOG_USER
spawn telnet localhost 1751
expect {
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
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"
echo "+++ End execution of stop_servers_local on $hostname"
echo "+++"
fi
- $RESTORE_FILES
else
$STOP_SERVERS_LOCAL
fi