Skip to content

Commit

Permalink
improve vm.sh for non-intreactive use
Browse files Browse the repository at this point in the history
  • Loading branch information
gggeek committed Apr 15, 2024
1 parent 084a327 commit 2c79dc2
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions tests/ci/vm.sh
Original file line number Diff line number Diff line change
Expand Up @@ -130,15 +130,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)
Expand Down

0 comments on commit 2c79dc2

Please sign in to comment.