/.phpunit.result.cache
/composer.lock
/phpunit.xml
+/tests/ci/var/*
echo "[$(date)] Bootstrapping the Test container..."
+if [ -f "${TESTS_ROOT_DIR}/tests/ci/var/bootstrap_ok" ]; then
+ rm "${TESTS_ROOT_DIR}/tests/ci/var/bootstrap_ok"
+fi
+
clean_up() {
# Perform program exit housekeeping
echo "[$(date)] Bootstrap finished"
+# Create the file which can be used by the vm.sh script to check for end of bootstrap
+if [ ! -d "${TESTS_ROOT_DIR}/tests/ci/var" ]; then
+ mkdir -p "${TESTS_ROOT_DIR}/tests/ci/var"
+ chown -R "${USERNAME}" "${TESTS_ROOT_DIR}/tests/ci/var"
+fi
+# @todo save to bootstrap_ok an actual error code if any of the commands above failed
+touch "${TESTS_ROOT_DIR}/tests/ci/var/bootstrap_ok" && chown "${USERNAME}" "${TESTS_ROOT_DIR}/tests/ci/var/bootstrap_ok"
+
tail -f /dev/null &
child=$!
wait "$child"
"
}
+wait_for_bootstrap() {
+ I=0
+ while [ $I -le 60 ]; do
+ if [ -f "${ROOT_DIR}/tests/ci/var/bootstrap_ok" ]; then
+ echo ''
+ break;
+ fi
+ printf '.'
+ sleep 1
+ I=$((I+1))
+ done
+ if [ $I -eq 60 ]; then
+ echo "ERROR: Container did not finish bootstrapping within 60 seconds..." >&2
+ return 1
+ fi
+ return 0
+}
+
build() {
stop
docker build --build-arg PHP_VERSION --build-arg UBUNTU_VERSION -t "${IMAGE_NAME}" .
--env DEBUG=0 \
-v "${ROOT_DIR}":"${CONTAINER_WORKSPACE_DIR}" \
"${IMAGE_NAME}"
+
+ if [ $? -eq 0 ]; then
+ wait_for_bootstrap
+ fi
}
start() {
if docker inspect "${CONTAINER_NAME}" >/dev/null 2>/dev/null; then
docker start "${CONTAINER_NAME}"
+ if [ $? -eq 0 ]; then
+ wait_for_bootstrap
+ fi
else
build
fi
* @copyright (C) 2007-2023 G. Giunta
* @license code licensed under the BSD License: see file license.txt
*
- * @todo rename both the class and the file. PhpXmlRpc_TestArgParser ?
+ * @todo rename both the class and the file. PhpXmlRpc_TestConfigParser ?
**/
class argParser
{
);
// check for command line params (passed as env vars) vs. web page input params (passed as GET/POST)
- // Note that the only usecase for web-page mode is when this is used by benchmark.php
+ // Note that the only use-case for web-page mode is when this is used by benchmark.php
if (!isset($_SERVER['REQUEST_METHOD'])) {
foreach($_SERVER as $key => $val) {
if (array_key_exists($key, $args)) {