From 9adeb265792f0049321c34bf9e32674b0be65942 Mon Sep 17 00:00:00 2001 From: Omar Polo Date: Fri, 9 Jun 2023 10:46:50 +0000 Subject: re-establish fastcgi test --- regress/tests.sh | 22 ++++++++++++++++++---- 1 file changed, 18 insertions(+), 4 deletions(-) (limited to 'regress/tests.sh') 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() { -- cgit v1.2.3