source: src/router/php7/appveyor/test_task.bat @ 31874

Last change on this file since 31874 was 31874, checked in by brainslayer, 4 months ago

update php

File size: 2.9 KB
Line 
1@echo off
2
3set NO_INTERACTION=1
4set REPORT_EXIT_STATUS=1
5set SKIP_IO_CAPTURE_TESTS=1
6
7if /i "%APPVEYOR_REPO_BRANCH:~0,4%" equ "php-" (
8        set BRANCH=%APPVEYOR_REPO_BRANCH:~4,3%
9        set STABILITY=stable
10) else (
11        set BRANCH=master
12        set STABILITY=staging
13)
14set DEPS_DIR=%PHP_BUILD_CACHE_BASE_DIR%\deps-%BRANCH%-%PHP_SDK_VC%-%PHP_SDK_ARCH%
15
16rem setup MySQL related exts
17set MYSQL_PWD=Password12!
18set MYSQL_TEST_PASSWD=%MYSQL_PWD%
19set MYSQL_TEST_USER=root
20set MYSQL_TEST_HOST=127.0.0.1
21set MYSQL_TEST_PORT=3306
22set PDO_MYSQL_TEST_USER=%MYSQL_TEST_USER%
23set PDO_MYSQL_TEST_PASS=%MYSQL_PWD%
24set PDO_MYSQL_TEST_HOST=%MYSQL_TEST_HOST%
25set PDO_MYSQL_TEST_PORT=%MYSQL_TEST_PORT%
26set PDO_MYSQL_TEST_DSN=mysql:host=%PDO_MYSQL_TEST_HOST% port=%PDO_MYSQL_TEST_PORT% dbname=test user=%PDO_MYSQL_TEST_USER% password=%MYSQL_PW%
27"C:\Program Files\MySql\MySQL Server 5.7\bin\mysql.exe" --user=%MYSQL_TEST_USER% -e "CREATE DATABASE IF NOT EXISTS test"
28
29rem setup PostgreSQL related exts
30set PGUSER=postgres
31set PGPASSWORD=Password12!
32rem set PGSQL_TEST_CONNSTR=host=127.0.0.1 dbname=test port=5432 user=postgres password=Password12!
33echo ^<?php $conn_str = "host=127.0.0.1 dbname=test port=5432 user=%PGUSER% password=%PGPASSWORD%"; ?^> >> "./ext/pgsql/tests/config.inc"
34set PDO_PGSQL_TEST_DSN=pgsql:host=127.0.0.1 port=5432 dbname=test user=%PGUSER% password=%PGPASSWORD%
35"C:\Program Files\PostgreSQL\9.5\bin\createdb.exe" test
36
37rem prepare for ext/openssl
38if "%APPVEYOR%" equ "True" rmdir /s /q C:\OpenSSL-Win32 >NUL 2>NUL
39if "%APPVEYOR%" equ "True" rmdir /s /q C:\OpenSSL-Win64 >NUL 2>NUL
40mkdir c:\usr\local\ssl
41copy %DEPS_DIR%\template\ssl\openssl.cnf c:\usr\local\ssl
42set OPENSSL_CONF=c:\usr\local\ssl\openssl.cnf
43rem set OPENSSL_CONF=
44rem set SSLEAY_CONF=
45
46rem prepare for Opcache
47if "%OPCACHE%" equ "1" set OPCACHE_OPTS=-d opcache.enabled=1 -d opcache.enable_cli=1
48
49rem prepare for enchant
50mkdir c:\enchant_plugins
51copy %DEPS_DIR%\bin\libenchant_ispell.dll c:\enchant_plugins
52copy %DEPS_DIR%\bin\libenchant_myspell.dll c:\enchant_plugins
53reg add HKEY_CURRENT_USER\SOFTWARE\Enchant\Config /v Module_Dir /t REG_SZ /d c:\enchant_plugins
54set PHP_BUILD_CACHE_ENCHANT_DICT_DIR=%PHP_BUILD_CACHE_BASE_DIR%\enchant_dict
55if not exist "%PHP_BUILD_CACHE_ENCHANT_DICT_DIR%" (
56        echo Creating %PHP_BUILD_CACHE_ENCHANT_DICT_DIR%
57        mkdir "%PHP_BUILD_CACHE_ENCHANT_DICT_DIR%"
58)
59if not exist "%PHP_BUILD_CACHE_ENCHANT_DICT_DIR%\en_US.aff" (
60        echo Fetching enchant dicts
61        pushd %PHP_BUILD_CACHE_ENCHANT_DICT_DIR%
62        del /q *
63        powershell -Command wget http://windows.php.net/downloads/qa/appveyor/ext/enchant/dict.zip -OutFile dict.zip
64        unzip dict.zip
65        del /q dict.zip
66        popd
67)
68mkdir %USERPROFILE%\enchant\myspell
69copy %PHP_BUILD_CACHE_ENCHANT_DICT_DIR%\* %USERPROFILE%\enchant\myspell
70
71mkdir c:\tests_tmp
72
73cd "%APPVEYOR_BUILD_FOLDER%"
74nmake test TESTS="%OPCACHE_OPTS% -q --offline --show-diff --set-timeout 120 -g FAIL,XFAIL,BORK,WARN,LEAK,SKIP --temp-source c:\tests_tmp --temp-target c:\tests_tmp"
75
Note: See TracBrowser for help on using the repository browser.