diff options
Diffstat (limited to 'tests/startup.at')
-rw-r--r-- | tests/startup.at | 61 |
1 files changed, 20 insertions, 41 deletions
diff --git a/tests/startup.at b/tests/startup.at index 440c249..22ad25b 100644 --- a/tests/startup.at +++ b/tests/startup.at @@ -21,3 +21,2 @@ PIES_XFAIL_CHECK PIES_CONTROL_INIT -comp_pid_file=$PWD/comp.pid @@ -26,3 +25,3 @@ component b1 { mode startup; - command "$auxdir/touchfile $PWD 1 b1"; + command "$auxdir/touchfile b1 1"; } @@ -31,3 +30,3 @@ component b2 { mode startup; - command "$auxdir/touchfile $PWD 2 b2"; + command "$auxdir/touchfile b2 2"; } @@ -36,3 +35,10 @@ component test { mode respawn; - command "$auxdir/respawn -append -pid $comp_pid_file"; + command "$auxdir/startcheck b1 b2"; + chdir $PWD; + stdout file "log.out"; + stderr file "log.err"; + return-code * { + action disable; + exec "piesctl --url unix:///$PWD/pies.ctl shutdown"; + } } @@ -40,42 +46,15 @@ _EOT -pies --config-file control.conf --config-file pies.conf - -n=0 -res= -b1= -b2= -while : -do - echo "n=$n" >> tracefile - if test -z "$b1" && test -f b1; then - res="${res}b1" - b1=1 - echo "got b1" >> tracefile - fi - if test -z "$b2" && test -f b2; then - res="${res}b2" - b2=1 - echo "got b2" >> tracefile - fi - if test -f $comp_pid_file; then - echo "got pidfile" >> tracefile - res="${res}pid" - break - fi - sleep 1 - n=$(($n + 1)) - if test $n -gt 10; then - echo >&2 "timed out" - break - fi -done +set -e +to 5 \ + pies --foreground --stderr \ + --config-file control.conf --config-file pies.conf 2>errlog -PIES_STOP -case $res in -b1b2pid|b2b1pid) echo b1b2pid;; -*) echo $res -esac +cat log.out +cat log.err >&2 ], [0], -[b1b2pid +[# b1 +b1 +# b2 +b2 ]) |