HEX
Server: LiteSpeed
System: Linux server44.twelveinks.com 5.14.0-570.12.1.el9_6.x86_64 #1 SMP PREEMPT_DYNAMIC Tue May 13 06:11:55 EDT 2025 x86_64
User: moda (1338)
PHP: 8.1.33
Disabled: NONE
Upload Files
File: /python/moda/public_html/tech/old/vendor/smarty/smarty/run-tests-for-all-php-versions.sh
#!/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" php54 && \
docker-compose run --entrypoint "$Entrypoint" php55 && \
docker-compose run --entrypoint "$Entrypoint" php56 && \
docker-compose run --entrypoint "$Entrypoint" php70 && \
docker-compose run --entrypoint "$Entrypoint" php71 && \
docker-compose run --entrypoint "$Entrypoint" php72 && \
docker-compose run --entrypoint "$Entrypoint" php73 && \
docker-compose run --entrypoint "$Entrypoint" php74