From: gggeek Date: Mon, 15 Apr 2024 11:49:12 +0000 (+0000) Subject: improve vm.sh for non-intreactive use X-Git-Tag: 4.10.3~7 X-Git-Url: http://git.onelab.eu/?a=commitdiff_plain;h=55c6667d093f36a266a18b18f3345260ebd323b8;p=plcapi.git improve vm.sh for non-intreactive use --- diff --git a/tests/ci/vm.sh b/tests/ci/vm.sh index 0fa0e6f0..e0cf30f4 100755 --- a/tests/ci/vm.sh +++ b/tests/ci/vm.sh @@ -136,15 +136,17 @@ case "${ACTION}" in ;; runcoverage) + test -t 1 && USE_TTY="-t" # @todo clean up /tmp/phpxmlrpc and .phpunit.result.cache if [ ! -d build ]; then mkdir build; fi docker exec -t "${CONTAINER_NAME}" "${CONTAINER_WORKSPACE_DIR}/tests/ci/setup/setup_code_coverage.sh" enable - docker exec -it "${CONTAINER_NAME}" su "${CONTAINER_USER}" -c "./vendor/bin/phpunit --coverage-html build/coverage -v tests" + docker exec -i $USE_TTY "${CONTAINER_NAME}" su "${CONTAINER_USER}" -c "./vendor/bin/phpunit --coverage-html build/coverage -v tests" docker exec -t "${CONTAINER_NAME}" "${CONTAINER_WORKSPACE_DIR}/tests/ci/setup/setup_code_coverage.sh" disable ;; runtests) - docker exec -it "${CONTAINER_NAME}" su "${CONTAINER_USER}" -c "./vendor/bin/phpunit -v tests" + test -t 1 && USE_TTY="-t" + docker exec -i $USE_TTY "${CONTAINER_NAME}" su "${CONTAINER_USER}" -c "./vendor/bin/phpunit -v tests" ;; start)