1parameters:
2  runTestsName: ''
3  runTestsParameters: ''
4
5steps:
6  - script: |
7      export MYSQL_TEST_USER=root
8      export MYSQL_TEST_PASSWD=root
9      export PDO_MYSQL_TEST_DSN="mysql:host=localhost;dbname=test"
10      export PDO_MYSQL_TEST_USER=root
11      export PDO_MYSQL_TEST_PASS=root
12      export PDO_DBLIB_TEST_DSN="dblib:host=127.0.0.1;dbname=master;version=7.0"
13      export PDO_DBLIB_TEST_USER="pdo_test"
14      export PDO_DBLIB_TEST_PASS="password"
15      export TEST_PHP_JUNIT=junit.xml
16      export REPORT_EXIT_STATUS=no
17      export SKIP_IO_CAPTURE_TESTS=1
18      rm -rf junit.xml | true
19      sapi/cli/php run-tests.php -P -q \
20          -j$(/usr/bin/nproc) \
21          -g FAIL,XFAIL,BORK,WARN,LEAK,XLEAK,SKIP \
22          --offline \
23          --show-diff \
24          --show-slow 1000 \
25          --set-timeout 120 \
26          ${{ parameters.runTestsParameters }}
27    displayName: 'Test ${{ parameters.configurationName }} ${{ parameters.runTestsName }}'
28    condition: or(succeeded(), failed())
29  - task: PublishTestResults@2
30    inputs:
31      testResultsFormat: 'JUnit'
32      testResultsFiles: junit.xml
33      testRunTitle: '${{ parameters.configurationName }} ${{ parameters.runTestsName }}'
34      failTaskOnFailedTests: true
35    displayName: 'Export ${{ parameters.configurationName }} ${{ parameters.runTestsName }} Results'
36    condition: or(succeeded(), failed())
37