forked from php/php-src
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathlibmysqlclient_test.yml
53 lines (52 loc) · 1.87 KB
/
libmysqlclient_test.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
parameters:
configurationName: ''
configurationParameters: ''
libmysql: ''
steps:
- script: |
set -e
LIBMYSQL=${{ parameters.libmysql }}
MYSQL_BASE=${LIBMYSQL%%-linux-*}
MYSQL_VERSION=${MYSQL_BASE#*-}
MYSQL_DIR=$HOME/$MYSQL_BASE
mkdir -p $MYSQL_DIR
URL=https://cdn.mysql.com/Downloads/MySQL-${MYSQL_VERSION%.*}/$LIBMYSQL
wget -nv $URL
tar -xf $LIBMYSQL --strip-components=1 -C $MYSQL_DIR
PDO_MYSQL=${MYSQL_DIR}
MYSQLI=${MYSQL_DIR}/bin/mysql_config
./buildconf --force
./configure ${{ parameters.configurationParameters }} \
--enable-option-checking=fatal \
--disable-all \
--enable-pdo \
--with-pdo-mysql=${PDO_MYSQL} \
--with-mysqli=${MYSQLI}
make clean
make -j$(/usr/bin/nproc) >/dev/null
displayName: 'Build ${{ parameters.configurationName }}'
condition: or(succeeded(), failed())
- script: |
export MYSQL_TEST_USER=root
export MYSQL_TEST_PASSWD=root
export PDO_MYSQL_TEST_DSN="mysql:host=127.0.0.1;dbname=test"
export PDO_MYSQL_TEST_HOST=127.0.0.1
export PDO_MYSQL_TEST_USER=root
export PDO_MYSQL_TEST_PASS=root
export TEST_PHP_JUNIT=junit.xml
export REPORT_EXIT_STATUS=no
rm -rf junit.xml | true
sapi/cli/php run-tests.php -P -q \
-g FAIL,XFAIL,BORK,WARN,LEAK,XLEAK,SKIP \
--offline --show-diff --show-slow 1000 --set-timeout 120 \
ext/pdo_mysql
displayName: 'Test ${{ parameters.configurationName }}'
condition: or(succeeded(), failed())
- task: PublishTestResults@2
inputs:
testResultsFormat: 'JUnit'
testResultsFiles: junit.xml
testRunTitle: '${{ parameters.configurationName }}'
failTaskOnFailedTests: true
displayName: 'Export ${{ parameters.configurationName }} Results'
condition: or(succeeded(), failed())