Mercurial > hg > audiodb
comparison tests/test-utils.sh @ 550:d5ada9532a40
Implement error exits in the SOAP client when the return code is not SOAP_OK.
Corresponding fixes in the test suite, while we're at it.
author | mas01cr |
---|---|
date | Thu, 12 Feb 2009 10:44:54 +0000 |
parents | e21cc48ddf4d |
children |
comparison
equal
deleted
inserted
replaced
549:0694bb74c5e9 | 550:d5ada9532a40 |
---|---|
73 check_server() { | 73 check_server() { |
74 grep "${AUDIODB}" /proc/$1/cmdline > /dev/null | 74 grep "${AUDIODB}" /proc/$1/cmdline > /dev/null |
75 } | 75 } |
76 | 76 |
77 expect_client_failure() { | 77 expect_client_failure() { |
78 # FIXME: work out whether and how the client should report server | 78 trap - ERR |
79 # errors. At present, the client exits with a zero exit code. | |
80 "$@" | 79 "$@" |
80 exit_code=$? | |
81 trap "exit 1" ERR | |
82 if [ $exit_code -eq 0 ]; then | |
83 exit 1 | |
84 elif [ $exit_code -ge 126 ]; then | |
85 exit 1 | |
86 fi | |
81 } | 87 } |