From 55c6667d093f36a266a18b18f3345260ebd323b8 Mon Sep 17 00:00:00 2001 From: gggeek Date: Mon, 15 Apr 2024 11:49:12 +0000 Subject: [PATCH] improve vm.sh for non-intreactive use --- tests/ci/vm.sh | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) 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) -- 2.47.0