11#! /usr/bin/env bash
2-
32set -eE -o functrace
43
54failure () {
@@ -9,6 +8,9 @@ failure() {
98}
109trap ' failure ${LINENO} "$BASH_COMMAND"' ERR
1110
11+ echo " This testing suite is deprecated : use instead bash_unit in tests-suite directory"
12+ sleep 5
13+
1214# Use either docker's 'build' command or 'buildx '
1315export BUILDTOOL=" buildx build --load --platform=${PLATFORM:- $(uname -p)} "
1416
@@ -19,9 +21,6 @@ export BRANCH_VARIANT="${VARIANT//./-}"
1921export DOCKER_BUILDKIT=1 # Force use of BuildKit
2022export BUILDKIT_STEP_LOG_MAX_SIZE=10485760 # output log limit fixed to 10MiB
2123
22- # Let's build the "slim" image.
23- docker $BUILDTOOL -t " thecodingmachine/php:${PHP_VERSION} -${BRANCH} -slim-${BRANCH_VARIANT} " --build-arg PHP_VERSION=" ${PHP_VERSION} " --build-arg GLOBAL_VERSION=" ${BRANCH} " --build-arg BLACKFIRE_VERSION=" ${BLACKFIRE_VERSION} " -f " Dockerfile.slim.${VARIANT} " .
24-
2524# Let's check that the extensions can be built using the "ONBUILD" statement
2625docker $BUILDTOOL -t test/slim_onbuild --build-arg PHP_VERSION=" ${PHP_VERSION} " --build-arg BRANCH=" $BRANCH " --build-arg BRANCH_VARIANT=" $BRANCH_VARIANT " tests/slim_onbuild
2726# This should run ok (the sudo disable environment variables but call to composer proxy does not trigger PHP ini file regeneration)
@@ -200,6 +199,8 @@ docker run --rm -e PHP_EXTENSION_XDEBUG=1 "thecodingmachine/php:${PHP_VERSION}-$
200199# Let's check that "xdebug.mode" is properly overridden
201200docker run --rm -e PHP_EXTENSION_XDEBUG=1 -e PHP_INI_XDEBUG__MODE=debug,coverage " thecodingmachine/php:${PHP_VERSION} -${BRANCH} -${BRANCH_VARIANT} " php -i | grep xdebug.mode | grep " debug,coverage"
202201
202+ # TODO
203+
203204if [[ " ${PHP_VERSION} " != " 8.1" ]]; then
204205 # Tests that blackfire + xdebug will output an error
205206 RESULT=" $( docker run --rm -e PHP_EXTENSION_XDEBUG=1 -e PHP_EXTENSION_BLACKFIRE=1 " thecodingmachine/php:${PHP_VERSION} -${BRANCH} -${BRANCH_VARIANT} " php -v 2>&1 | grep ' WARNING: Both Blackfire and Xdebug are enabled. This is not recommended as the PHP engine may not behave as expected. You should strongly consider disabling Xdebug or Blackfire.' ) "
@@ -214,12 +215,4 @@ docker $BUILDTOOL -t test/composer_with_gd --build-arg PHP_VERSION="${PHP_VERSIO
214215docker run --rm test/composer_with_gd sudo composer update
215216docker rmi test/composer_with_gd
216217
217- # ################################
218- # Let's build the "node" images
219- # ################################
220- docker $BUILDTOOL -t " thecodingmachine/php:${PHP_VERSION} -${BRANCH} -${BRANCH_VARIANT} -node10" --build-arg PHP_VERSION=" ${PHP_VERSION} " --build-arg GLOBAL_VERSION=" ${BRANCH} " -f " Dockerfile.${VARIANT} .node10" .
221- docker $BUILDTOOL -t " thecodingmachine/php:${PHP_VERSION} -${BRANCH} -${BRANCH_VARIANT} -node12" --build-arg PHP_VERSION=" ${PHP_VERSION} " --build-arg GLOBAL_VERSION=" ${BRANCH} " -f " Dockerfile.${VARIANT} .node12" .
222- docker $BUILDTOOL -t " thecodingmachine/php:${PHP_VERSION} -${BRANCH} -${BRANCH_VARIANT} -node14" --build-arg PHP_VERSION=" ${PHP_VERSION} " --build-arg GLOBAL_VERSION=" ${BRANCH} " -f " Dockerfile.${VARIANT} .node14" .
223- docker $BUILDTOOL -t " thecodingmachine/php:${PHP_VERSION} -${BRANCH} -${BRANCH_VARIANT} -node16" --build-arg PHP_VERSION=" ${PHP_VERSION} " --build-arg GLOBAL_VERSION=" ${BRANCH} " -f " Dockerfile.${VARIANT} .node16" .
224-
225218echo " Tests passed with success"
0 commit comments