diff options
Diffstat (limited to 'test/start_scorsh.sh')
-rwxr-xr-x | test/start_scorsh.sh | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/test/start_scorsh.sh b/test/start_scorsh.sh new file mode 100755 index 0000000..40a9754 --- /dev/null +++ b/test/start_scorsh.sh @@ -0,0 +1,27 @@ +#!/bin/sh + +. ./scorsh_functions + +## start the scorsh daemon +cd ${SCORSH_APP} +./scorshd -c scorsh_example.cfg & +echo "$!" > scorsh.pid +is_running=$(ps $(cat scorsh.pid) | grep -c scorshd ) +cd - >/dev/null +check_fatal "[ \"${is_running}\" = \"1\" ]" $0 "start_scorshd" + +##check_fatal "[ 1 -eq 0 ]" $0 "exit_on_purpose" + +## check if workers were started +cd ${SCORSH_APP} +ret=$(grep -c "Workers started correctly" scorsh.log) +cd - > /dev/null +check_fatal "[ \"$ret\" = \"1\" ]" $0 "workers_started" + +## check if spooler was started +cd ${SCORSH_APP} +ret=$(grep -c "Spooler started correctly" scorsh.log) +cd - > /dev/null +check_fatal "[ \"$ret\" = \"1\" ]" $0 "spooler_started" + +return_results |