A few minor fixes

This commit is contained in:
ulvii 2017-07-06 18:43:31 -07:00
parent bfaf87bfb5
commit 6466606cbc
3 changed files with 9 additions and 7 deletions

View file

@ -6,8 +6,7 @@ Run `cmd` as administrator.
powershell
Set-ExecutionPolicy Unrestricted
.\setup_env_windows.ps1 <PHP_VERSION - 7.x.x> <PHP_THREAD - ts or nts> <Absolute path to driver source folder> <ARCH - x86 or x64>
If `PHP_VERSION` is wrong, the script will default it to the latest PHP 7.1 version
.\setup_env_windows.ps1 <PHP_VERSION - 7.x.x> <PHP_THREAD - ts or nts> <Absolute path to driver source folder> <ARCH - x86 or x64>
### Ubuntu 16
sudo env “PATH=$PATH” bash setup_env_unix.sh Ubuntu16 <PHP_VERSION - 7.x.x> <PHP_THREAD - ts or nts> <Absolute path to driver source folder>
@ -21,9 +20,9 @@ If `PHP_VERSION` is wrong, the script will default it to the latest PHP 7.1 vers
### 1. Modify lib/connect.php with the test database credetials
### 2. Execute run-perf_tests.py.
The script must be executed with `sudo` 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.
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.
run-perf_tests.py -platform <PLATFORM> -iterations <ITERATIONS> -iterations-large <ITERATIONS_LARGE> -result-server <RESULT_SERVER> -result-db <RESULT_DB> -result-uid <RESULT_UID> -result-pwd <RESULT_PWD>
py.exe run-perf_tests.py -platform <PLATFORM> -iterations <ITERATIONS> -iterations-large <ITERATIONS_LARGE> -result-server <RESULT_SERVER> -result-db <RESULT_DB> -result-uid <RESULT_UID> -result-pwd <RESULT_PWD>
`-platform` - The platform that the tests are ran on. Must be one of the following: Windows10, WidnowsServer2016 WindowsServer2012 Ubuntu16 RedHat7 Sierra
`-iterations` - The number of iterations for regular tests.

View file

@ -55,7 +55,7 @@ def validate_platform( platform_name ):
"""
platforms = [
"Windows10"
, "WidnowsServer2016"
, "WindowsServer2016"
, "WindowsServer2012"
, "Ubuntu16"
, "RedHat7"
@ -526,7 +526,7 @@ def get_msodbcsql_version( test_db ):
Returns:
MSODBCSQL version
"""
command = "php -r \"echo sqlsrv_client_info( sqlsrv_connect( '{0}', array( 'UID'=>'{1}', 'PWD'=>'{2}')))['DriverVer'];\""
command = "php -r \"echo sqlsrv_client_info( sqlsrv_connect( '{0}', array( 'UID'=>'{1}', 'PWD'=>'{2}')))['DriverVer'];\""
p = subprocess.Popen( command.format( test_db.server_name, test_db.username, test_db.password ), stdout=subprocess.PIPE, shell = True )
out, err = p.communicate()
return out.decode('ascii')

View file

@ -35,6 +35,7 @@ Write-Host "Installing chocolatey..."
iex ((New-Object System.Net.WebClient).DownloadString('https://chocolatey.org/install.ps1'))
Write-Host "Installing Git..."
choco install -y git
Set-Alias git 'C:\Program Files\Git\cmd\git.exe'
Write-Host "Installing Python3..."
choco install -y python3
RefreshEnv
@ -106,4 +107,6 @@ $env:Path += ";C:\php\"
RefreshEnv
wget https://getcomposer.org/installer -O composer-setup.php
php composer-setup.php
php composer.phar install
php composer.phar install
Remove-Item temp -Recurse -Force -ErrorAction Ignore
Write-Host "Setup completed!"