mirror of
https://github.com/cytopia/devilbox.git
synced 2024-12-19 04:47:52 +00:00
Adjust CI tests for PHP 8.(0|1) xdebug settings
This commit is contained in:
parent
5d476b9c32
commit
760d1606c5
@ -13,7 +13,7 @@ DVLBOX_PATH="$( cd "${SCRIPT_PATH}/../.." && pwd -P )"
|
|||||||
. "${SCRIPT_PATH}/../scripts/.lib.sh"
|
. "${SCRIPT_PATH}/../scripts/.lib.sh"
|
||||||
|
|
||||||
RETRIES=10
|
RETRIES=10
|
||||||
DISABLED_VERSIONS=("8.0" "8.1")
|
DISABLED_VERSIONS=("")
|
||||||
|
|
||||||
|
|
||||||
echo
|
echo
|
||||||
@ -60,6 +60,15 @@ fi
|
|||||||
### Xdebug default disabled
|
### Xdebug default disabled
|
||||||
###
|
###
|
||||||
printf "[TEST] Xdebug default disabled"
|
printf "[TEST] Xdebug default disabled"
|
||||||
|
if [ "${PHP_VERSION}" = "8.0" ] || [ "${PHP_VERSION}" = "8.1" ]; then
|
||||||
|
if ! run "curl -sS --fail 'http://localhost:${HOST_PORT_HTTPD}/info_php.php' | tac | tac | grep 'xdebug.mode' | grep -E 'develop.+develop' >/dev/null" "${RETRIES}" "" "0"; then
|
||||||
|
printf "\\r[FAIL] Xdebug default disabled\\n"
|
||||||
|
run "curl -sS 'http://localhost:${HOST_PORT_HTTPD}/info_php.php' | grep 'xdebug.mode' || true"
|
||||||
|
exit 1
|
||||||
|
else
|
||||||
|
printf "\\r[OK] Xdebug default disabled\\n"
|
||||||
|
fi
|
||||||
|
else
|
||||||
if ! run "curl -sS --fail 'http://localhost:${HOST_PORT_HTTPD}/info_php.php' | tac | tac | grep 'xdebug.remote_enable' | grep -E 'Off.+Off' >/dev/null" "${RETRIES}" "" "0"; then
|
if ! run "curl -sS --fail 'http://localhost:${HOST_PORT_HTTPD}/info_php.php' | tac | tac | grep 'xdebug.remote_enable' | grep -E 'Off.+Off' >/dev/null" "${RETRIES}" "" "0"; then
|
||||||
printf "\\r[FAIL] Xdebug default disabled\\n"
|
printf "\\r[FAIL] Xdebug default disabled\\n"
|
||||||
run "curl -sS 'http://localhost:${HOST_PORT_HTTPD}/info_php.php' | grep 'xdebug.remote_enable' || true"
|
run "curl -sS 'http://localhost:${HOST_PORT_HTTPD}/info_php.php' | grep 'xdebug.remote_enable' || true"
|
||||||
@ -67,12 +76,21 @@ if ! run "curl -sS --fail 'http://localhost:${HOST_PORT_HTTPD}/info_php.php' |
|
|||||||
else
|
else
|
||||||
printf "\\r[OK] Xdebug default disabled\\n"
|
printf "\\r[OK] Xdebug default disabled\\n"
|
||||||
fi
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
###
|
###
|
||||||
### Xdebug autostart disabled
|
### Xdebug autostart disabled
|
||||||
###
|
###
|
||||||
printf "[TEST] Xdebug autostart disabled"
|
printf "[TEST] Xdebug autostart disabled"
|
||||||
|
if [ "${PHP_VERSION}" = "8.0" ] || [ "${PHP_VERSION}" = "8.1" ]; then
|
||||||
|
if ! run "curl -sS --fail 'http://localhost:${HOST_PORT_HTTPD}/info_php.php' | tac | tac | grep 'xdebug.start_with_request' | grep -E 'default.+default' >/dev/null" "${RETRIES}" "" "0"; then
|
||||||
|
printf "\\r[FAIL] Xdebug autostart disabled\\n"
|
||||||
|
run "curl 'http://localhost:${HOST_PORT_HTTPD}/info_php.php' | grep 'xdebug.start_with_request' || true"
|
||||||
|
exit 1
|
||||||
|
else
|
||||||
|
printf "\\r[OK] Xdebug autostart disabled\\n"
|
||||||
|
fi
|
||||||
|
else
|
||||||
if ! run "curl -sS --fail 'http://localhost:${HOST_PORT_HTTPD}/info_php.php' | tac | tac | grep 'xdebug.remote_autostart' | grep -E 'Off.+Off' >/dev/null" "${RETRIES}" "" "0"; then
|
if ! run "curl -sS --fail 'http://localhost:${HOST_PORT_HTTPD}/info_php.php' | tac | tac | grep 'xdebug.remote_autostart' | grep -E 'Off.+Off' >/dev/null" "${RETRIES}" "" "0"; then
|
||||||
printf "\\r[FAIL] Xdebug autostart disabled\\n"
|
printf "\\r[FAIL] Xdebug autostart disabled\\n"
|
||||||
run "curl 'http://localhost:${HOST_PORT_HTTPD}/info_php.php' | grep 'xdebug.remote_autostart' || true"
|
run "curl 'http://localhost:${HOST_PORT_HTTPD}/info_php.php' | grep 'xdebug.remote_autostart' || true"
|
||||||
@ -80,3 +98,4 @@ if ! run "curl -sS --fail 'http://localhost:${HOST_PORT_HTTPD}/info_php.php' |
|
|||||||
else
|
else
|
||||||
printf "\\r[OK] Xdebug autostart disabled\\n"
|
printf "\\r[OK] Xdebug autostart disabled\\n"
|
||||||
fi
|
fi
|
||||||
|
fi
|
||||||
|
Loading…
Reference in New Issue
Block a user