diff options
author | Omar Polo <op@omarpolo.com> | 2023-06-09 10:46:50 +0000 |
---|---|---|
committer | Omar Polo <op@omarpolo.com> | 2023-06-09 10:46:50 +0000 |
commit | 9adeb265792f0049321c34bf9e32674b0be65942 (patch) | |
tree | 407f231e7563a29da31baf95a09de8effe34485a /regress/tests.sh | |
parent | 5d22294a59e7e9cbe6457b9e6244fff2ede09956 (diff) |
re-establish fastcgi test
Diffstat (limited to 'regress/tests.sh')
-rw-r--r-- | regress/tests.sh | 22 |
1 files changed, 18 insertions, 4 deletions
diff --git a/regress/tests.sh b/regress/tests.sh index a46e44d..eb9b54f 100644 --- a/regress/tests.sh +++ b/regress/tests.sh @@ -205,11 +205,25 @@ location "/foo/*" { root "'$PWD'/testdata" strip 1 }' } test_fastcgi() { - # XXX: prefork 1 for testing - setup_simple_test 'prefork 1' 'fastcgi spawn "'$PWD'/fcgi-test"' + ./fcgi-test fcgi.sock & + fcgi_pid=$! - fetch / - check_reply "20 text/gemini" "# Hello, world!" + setup_simple_test 'prefork 1' 'fastcgi "'$PWD'/fcgi.sock"' + + i=0 + while [ $i -lt 10 ]; do + fetch / + check_reply "20 text/gemini" "# hello from fastcgi!" + if [ $? -ne 0 ]; then + kill $fcgi_pid + return 1 + fi + + i=$(($i + 1)) + done + + kill $fcgi_pid + return 0 } test_macro_expansion() { |