summaryrefslogtreecommitdiffstats
path: root/src/lib/kadm5/unit-test/config
diff options
context:
space:
mode:
authorBarry Jaspan <bjaspan@mit.edu>1996-10-17 20:21:19 +0000
committerBarry Jaspan <bjaspan@mit.edu>1996-10-17 20:21:19 +0000
commit7a0553ec1d296df83a2e6660aae44a1115f9ea2c (patch)
tree17d07bcf77e175a4363915db9536f93b383463be /src/lib/kadm5/unit-test/config
parentae4459b457f72b4d0dd3851fac5b7755f02287dc (diff)
downloadkrb5-7a0553ec1d296df83a2e6660aae44a1115f9ea2c.tar.gz
krb5-7a0553ec1d296df83a2e6660aae44a1115f9ea2c.tar.xz
krb5-7a0553ec1d296df83a2e6660aae44a1115f9ea2c.zip
* config/unix.exp, lib/lib.t: begin in process of making these
unit tests less horribly inefficient * api.[02]/crte-principal.exp, api.[02].mod-principal: update unit tests for new pw_expiration semantics [krb5-admin/87] * Makefile.in: ditch the capi and sapi hack, just the api for everything, and rename the log files after the tests complete so they are both kept around for viewing [krb5-admin/82] git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@9188 dc483132-0cff-0310-8789-dd5450dbe970
Diffstat (limited to 'src/lib/kadm5/unit-test/config')
-rw-r--r--src/lib/kadm5/unit-test/config/unix.exp28
1 files changed, 24 insertions, 4 deletions
diff --git a/src/lib/kadm5/unit-test/config/unix.exp b/src/lib/kadm5/unit-test/config/unix.exp
index ed576ce35..07a91fd31 100644
--- a/src/lib/kadm5/unit-test/config/unix.exp
+++ b/src/lib/kadm5/unit-test/config/unix.exp
@@ -14,25 +14,42 @@ if {[info exists exp_version_4]} {
set wait_status_index 3
}
+# Variables for keeping track of api process state
+set api_pid "0"
+
proc api_exit {} {
global spawn_id
+ global api_pid
# puts stdout "Starting api_exit (spawn_id $spawn_id)."
catch {close} errMsg
catch {wait} errMsg
-# puts stdout "Finishing api_exit."
+ puts stdout "Finishing api_exit for $api_pid."
+ set api_pid "0"
+}
+
+proc api_isrunning {pid} {
+ global api_pid
+
+# puts stdout "testing $pid, api_pid is $api_pid"
+ if {$pid == $api_pid} {
+ return 1;
+ } else {
+ return 0;
+ }
}
proc api_version {} {
}
proc api_start {} {
- global API
+ global API
global env
global spawn_id
global prompt
+ global api_pid
- spawn $API
+ set pid [spawn $API]
expect {
-re "$prompt$" {}
eof { error "EOF starting API" }
@@ -107,7 +124,10 @@ proc api_start {} {
eof { error "EOF setting API varibles"}
timeout { error "timeout setting API varibles"}
}
-# puts stdout "Finishing api_start (spawn_id $spawn_id)."
+
+ set api_pid $pid
+ puts stdout "Finishing api_start (spawn_id $spawn_id, pid $api_pid)."
+ return $pid
}
api_start