diff options
| author | Simon Wisselink <wisskid@users.noreply.github.com> | 2022-09-22 14:31:49 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2022-09-22 14:31:49 +0200 |
| commit | ea95e8b04750b3e52d0dfc6e201a19e5e385f298 (patch) | |
| tree | 593d4ffb0f900a1ac3964a2ca2fc60799d88096a /run-tests-for-all-php-versions.sh | |
| parent | 474138fd7ee0519b68a7fb773fb5867bd856e242 (diff) | |
| download | smarty-ea95e8b04750b3e52d0dfc6e201a19e5e385f298.tar.gz smarty-ea95e8b04750b3e52d0dfc6e201a19e5e385f298.tar.bz2 smarty-ea95e8b04750b3e52d0dfc6e201a19e5e385f298.zip | |
Re-organize all testrunners to use the same script(s). (#812)
Diffstat (limited to 'run-tests-for-all-php-versions.sh')
| -rwxr-xr-x | run-tests-for-all-php-versions.sh | 44 |
1 files changed, 44 insertions, 0 deletions
diff --git a/run-tests-for-all-php-versions.sh b/run-tests-for-all-php-versions.sh new file mode 100755 index 00000000..6ecd9afb --- /dev/null +++ b/run-tests-for-all-php-versions.sh @@ -0,0 +1,44 @@ +#!/bin/bash +Help() +{ + # Display Help + echo "Runs PHPUnit tests for all PHP versions supported by this version of Smarty." + echo + echo "Syntax: $0 [-e|h]" + echo "options:" + echo "e Exclude a group of unit tests, e.g. -e 'slow'" + echo "h Print this Help." + echo +} + +Exclude="" + +# Get the options +while getopts ":he:" option; do + case $option in + e) # Exclude + echo $OPTARG + Exclude=$OPTARG;; + h) # display Help + Help + exit;; + \?) # Invalid option + echo "Error: Invalid option" + exit;; + esac +done + +if [ -z $Exclude ]; +then + Entrypoint="./run-tests.sh" +else + Entrypoint="./run-tests.sh $Exclude" +fi + +# Runs tests for all supported PHP versions +docker-compose run --entrypoint "$Entrypoint" php71 && \ +docker-compose run --entrypoint "$Entrypoint" php72 && \ +docker-compose run --entrypoint "$Entrypoint" php73 && \ +docker-compose run --entrypoint "$Entrypoint" php74 && \ +docker-compose run --entrypoint "$Entrypoint" php80 && \ +docker-compose run --entrypoint "$Entrypoint" php81 |
