From c3d4e1416d9cfeaf69ea51c32cd2419b789fb284 Mon Sep 17 00:00:00 2001 From: Brady McDonough Date: Sun, 11 Feb 2024 00:45:09 -0700 Subject: [PATCH] Added verbose testing target. --- devel.sh | 29 +++++++++++++++++++---------- 1 file changed, 19 insertions(+), 10 deletions(-) diff --git a/devel.sh b/devel.sh index d180897..db03ec4 100755 --- a/devel.sh +++ b/devel.sh @@ -25,13 +25,24 @@ function update { return $rv } +function update_if_no_vendors { + if [[ ! -d "vendor/" ]]; then + update + if [[ $? -ne 0 ]]; then + exit $? + fi + fi +} + if [[ $# -ne 1 ]]; then echo "This script requires a verb." echo "VERBS:" - echo " update - Update dependencies with composer" - echo " test - If no vendor/ folder Update, then run phpunit tests." - echo " clean - Remove all buildfiles and editor artifacts." - echo " tidy - Remove all editor artifacts." + echo " update - Update dependencies with composer" + echo " test - If no vendor/ folder Update, then run phpunit tests." + echo " testloud - If no vendor/ folder Update, then run phpunit tests with all" + echo " optional output" + echo " clean - Remove all buildfiles and editor artifacts." + echo " tidy - Remove all editor artifacts." echo "" echo "For style points, you might consider targeting these with git-hooks" fi @@ -41,14 +52,12 @@ if [[ $cmd == "update" ]]; then update exit $? elif [[ $cmd == "test" ]]; then - if [[ ! -d "vendor/" ]]; then - update - if [[ $? -ne 0 ]]; then - exit $? - fi - fi + update_if_no_vendors ./vendor/bin/phpunit --testdox --stderr tests exit $? +elif [[ $cmd == "testloud" ]]; then + update_if_no_vendors + ./vendor/bin/phpunit --testdox --stderr --display-deprecations --display-errors --display-notices --display-warnings tests elif [[ $cmd == "tidy" ]]; then tidy elif [[ $cmd == "clean" ]]; then