1
1
#! /usr/bin/env bash
2
-
3
2
set -eE -o functrace
4
3
5
4
failure () {
@@ -9,6 +8,9 @@ failure() {
9
8
}
10
9
trap ' failure ${LINENO} "$BASH_COMMAND"' ERR
11
10
11
+ echo " This testing suite is deprecated : use instead bash_unit in tests-suite directory"
12
+ sleep 5
13
+
12
14
# Use either docker's 'build' command or 'buildx '
13
15
export BUILDTOOL=" buildx build --load --platform=${PLATFORM:- $(uname -p)} "
14
16
@@ -19,9 +21,6 @@ export BRANCH_VARIANT="${VARIANT//./-}"
19
21
export DOCKER_BUILDKIT=1 # Force use of BuildKit
20
22
export BUILDKIT_STEP_LOG_MAX_SIZE=10485760 # output log limit fixed to 10MiB
21
23
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
-
25
24
# Let's check that the extensions can be built using the "ONBUILD" statement
26
25
docker $BUILDTOOL -t test/slim_onbuild --build-arg PHP_VERSION=" ${PHP_VERSION} " --build-arg BRANCH=" $BRANCH " --build-arg BRANCH_VARIANT=" $BRANCH_VARIANT " tests/slim_onbuild
27
26
# 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}-$
200
199
# Let's check that "xdebug.mode" is properly overridden
201
200
docker 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"
202
201
202
+ # TODO
203
+
203
204
if [[ " ${PHP_VERSION} " != " 8.1" ]]; then
204
205
# Tests that blackfire + xdebug will output an error
205
206
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
214
215
docker run --rm test/composer_with_gd sudo composer update
215
216
docker rmi test/composer_with_gd
216
217
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
-
225
218
echo " Tests passed with success"
0 commit comments