mirror of
https://github.com/php/php-src.git
synced 2024-11-27 20:03:40 +08:00
7a5cc7aa67
This tests that mysqli and pdo_mysql build against libmysqlclient, and that tests pass for pdo_mysql. mysqli has too many test failures. This is not an officially supported configuration.
54 lines
1.9 KiB
YAML
54 lines
1.9 KiB
YAML
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())
|