diff --git a/test/Performance/README.md b/test/Performance/README.md index 7be4ca55..84d20855 100644 --- a/test/Performance/README.md +++ b/test/Performance/README.md @@ -15,6 +15,8 @@ Run `Windows PowerShell` as administrator. sudo env "PATH=$PATH" bash setup_env_unix.sh Ubuntu16 ### RedHat 7 sudo env "PATH=$PATH" bash setup_env_unix.sh RedHat7 +### SUSE 12 + sudo env "PATH=$PATH" bash setup_env_unix.sh SUSE12 ### MacOS 10.12 Sierra `brew` cannot be run with `sudo` on Sierra. Either enable passwordless `sudo` on the machine or enter the password when prompted. @@ -30,10 +32,10 @@ PHPBench is used to run the benchmarks. Visit http://phpbench.readthedocs.io/en/ ### Windows py.exe run-perf_tests.py -platform ### Linux and Mac -On Linux and Mac, the script must be executed with `sudo python3` because to enable pooling it needs to modify odbcinst.ini system file. As an improvement, the location of the odbcinst.ini file can be changed so that, sudo is not requiered. +On Linux and Mac, the script must be executed with `sudo python3` because to enable pooling it needs to modify odbcinst.ini system file. As an improvement, the location of the odbcinst.ini file can be changed so that sudo is not required. python3 run-perf_tests.py -platform | tee run-perf_output.txt -`-platform` - The platform that the tests are ran on. Must be one of the following: Windows10, WindowsServer2016, WindowsServer2012, Ubuntu16, RedHat7, Sierra. +`-platform` - The platform that the tests are ran on. Must be one of the following: Windows10, WindowsServer2016, WindowsServer2012, Ubuntu16, RedHat7, SUSE12, Sierra. `-php-driver` (optional) - The driver that the tests are ran on. Must be one of the following: sqlsrv, pdo_sqlsrv, or both. Default is both. `-testname` (optional) - The test to run. Must be the file name (not including path) of one test or 'all'. Default is 'all'. If one test is specified, must also specify the -php-driver option to sqlsrv or pdo_sqlsrv. \ No newline at end of file diff --git a/test/Performance/run-perf_tests.py b/test/Performance/run-perf_tests.py index 077afa26..943e09a5 100644 --- a/test/Performance/run-perf_tests.py +++ b/test/Performance/run-perf_tests.py @@ -58,6 +58,7 @@ def validate_platform( platform_name ): , "WindowsServer2012" , "Ubuntu16" , "RedHat7" + , "SUSE12" , "Sierra"] if platform_name not in platforms: print ( "Platform must be one of the following:" ) diff --git a/test/Performance/setup_env_unix.sh b/test/Performance/setup_env_unix.sh index 3f9a58c8..fccf7ba7 100644 --- a/test/Performance/setup_env_unix.sh +++ b/test/Performance/setup_env_unix.sh @@ -61,8 +61,8 @@ elif [ $PLATFORM = "RedHat7" ]; then printf "Enabling EPEL repo..." # pipe non-error to log file (wget and yum install reports error when there's nothing to do) - wget https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm >> env_setup.log 2>&1 - yes | sudo yum install epel-release-latest-7.noarch.rpm >> env_setup.log 2>&1 || true + wget https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm >> env_setup.log + yes | sudo yum install epel-release-latest-7.noarch.rpm >> env_setup.log || true printf "done\n" printf "Installing python34-setuptools..." @@ -86,24 +86,24 @@ elif [ $PLATFORM = "RedHat7" ]; then elif [ $PLATFORM = "SUSE12" ]; then printf "Update..." - sudo zypper refresh >> env_setup.log 2>&1 + sudo zypper refresh >> env_setup.log printf "done\n" printf "Installing autoconf, gcc, g++, git, zip, libxml, openssl, python3, pip3..." - sudo zypper -n install autoconf gcc gcc-c++ libxml2-devel git zip libopenssl-devel python3-devel python3-pip python3-setuptools >> env_setup.log 2>&1 + sudo zypper -n install autoconf gcc gcc-c++ libxml2-devel git zip libopenssl-devel python3-devel python3-pip python3-setuptools >> env_setup.log printf "done\n" printf "Installing MSODBCSQL..." - zypper -n ar https://packages.microsoft.com/config/sles/12/prod.repo 2>&1 - zypper --gpg-auto-import-keys refresh 2>&1 - ACCEPT_EULA=Y zypper -n install msodbcsql >> env_setup.log 2>&1 - ACCEPT_EULA=Y zypper -n install mssql-tools >> env_setup.log 2>&1 - zypper -n install unixODBC-devel >> env_setup.log 2>&1 + zypper -n ar https://packages.microsoft.com/config/sles/12/prod.repo + zypper --gpg-auto-import-keys refresh + ACCEPT_EULA=Y zypper -n install msodbcsql >> env_setup.log + ACCEPT_EULA=Y zypper -n install mssql-tools >> env_setup.log + zypper -n install unixODBC-devel >> env_setup.log printf "done\n" printf "Installing pyodbc" - pip3 install --upgrade pip >> env_setup.log 2>&1 - pip3 install pyodbc >> env_setup.log 2>&1 + pip3 install --upgrade pip >> env_setup.log + pip3 install pyodbc >> env_setup.log printf "done\n" elif [ $PLATFORM = "Sierra" ]; then @@ -142,7 +142,7 @@ fi printf "Downloading PHP-$PHP_VERSION source tarball..." # pipe non-error to log file -wget http://ca1.php.net/get/php-$PHP_VERSION.tar.gz/from/this/mirror -O php-$PHP_VERSION.tar.gz >> env_setup.log 2>&1 +wget http://ca1.php.net/get/php-$PHP_VERSION.tar.gz/from/this/mirror -O php-$PHP_VERSION.tar.gz >> env_setup.log printf "done\n" printf "Extracting PHP source tarball..." @@ -154,7 +154,7 @@ phpDir=php-$PHP_VERSION cd $phpDir printf "Configuring PHP..." -./buildconf --force >> ../env_setup.log 2>&1 +./buildconf --force >> ../env_setup.log CONFIG_OPTIONS="--enable-cli --enable-cgi --with-zlib --enable-mbstring --prefix=/usr/local" [ "${PHP_THREAD}" == "ts" ] && CONFIG_OPTIONS=${CONFIG_OPTIONS}" --enable-maintainer-zts" if [ $PLATFORM = "Sierra" ]; then @@ -163,7 +163,7 @@ else CONFIG_OPTIONS=$CONFIG_OPTIONS" --with-openssl" fi #pipe non-error to log file -(./configure $CONFIG_OPTIONS >> ../env_setup.log 2>&1) +(./configure $CONFIG_OPTIONS >> ../env_setup.log) printf "done\n" printf "Compiling and installing PHP..." @@ -197,7 +197,7 @@ printf "done\n" printf "Installing Composer..." cd .. # pipe non-error to log file -wget https://getcomposer.org/installer -O composer-setup.php >> env_setup.log 2>&1 +wget https://getcomposer.org/installer -O composer-setup.php >> env_setup.log /usr/local/bin/php composer-setup.php >> env_setup.log printf "done\n"