1
0
mirror of https://github.com/php/php-src.git synced 2026-04-12 10:33:11 +02:00
Files
archived-php-src/azure/libmysqlclient_test.yml
Ilija Tovilo 0028c242f0 Add --[no-]progress option to run-tests.php (#9255)
Previously, adding the -g argument would disable progress, even locally.
Now it needs to be disabled explicitly.
2022-08-11 20:58:15 +02:00

51 lines
1.7 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}
./buildconf --force
./configure ${{ parameters.configurationParameters }} \
--enable-option-checking=fatal \
--disable-all \
--enable-pdo \
--with-pdo-mysql=${PDO_MYSQL}
make clean
make -j$(/usr/bin/nproc) >/dev/null
displayName: 'Build ${{ parameters.configurationName }}'
condition: or(succeeded(), failed())
- script: |
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,BORK,LEAK,XLEAK \
--no-progress \
--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())