diff options
Diffstat (limited to 'tests/control.at')
-rw-r--r-- | tests/control.at | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/tests/control.at b/tests/control.at index 8814b30..3d0c218 100644 --- a/tests/control.at +++ b/tests/control.at | |||
@@ -20,19 +20,20 @@ AT_CHECK([ | |||
20 | PIES_XFAIL_CHECK | 20 | PIES_XFAIL_CHECK |
21 | PIES_CONTROL_INIT | 21 | PIES_CONTROL_INIT |
22 | 22 | ||
23 | pies --config-file control.conf | 23 | pies --config-file control.conf |
24 | 24 | ||
25 | sleep 1 | 25 | sleep 1 |
26 | if test -f $pidfile; then | 26 | PIESCTL="piesctl --no-netrc --url '$PIES_CTLSOCK'" |
27 | pid0=`head -1 $pidfile` | 27 | if test -f $PIES_PIDFILE; then |
28 | pid1=`piesctl --url "$ctlsock" id PID|sed 's/^PID: //'` | 28 | pid0=`head -1 $PIES_PIDFILE` |
29 | pid1=`$PIESCTL id PID|sed 's/^PID: //'` | ||
29 | if test "$pid1" = "$pid0"; then | 30 | if test "$pid1" = "$pid0"; then |
30 | if piesctl --url "$ctlsock" shutdown; then | 31 | if $PIESCTL shutdown; then |
31 | sleep 1 | 32 | sleep 1 |
32 | if test -f $pidfile; then | 33 | if test -f $PIES_PIDFILE; then |
33 | PIES_XFAIL_MSG([pies does not respond to control commands]) | 34 | PIES_XFAIL_MSG([pies does not respond to control commands]) |
34 | kill -9 $pid0 | 35 | kill -9 $pid0 |
35 | exit 1 | 36 | exit 1 |
36 | else | 37 | else |
37 | exit 0 | 38 | exit 0 |
38 | fi | 39 | fi |