From 3c4999f3b4a4ba15b9846540b155f6fd0a70cd51 Mon Sep 17 00:00:00 2001 From: Jenny Tam Date: Tue, 21 Nov 2017 16:37:25 -0800 Subject: [PATCH] Reverted the changes to output to log files --- appveyor.yml | 19 ++++++------------- 1 file changed, 6 insertions(+), 13 deletions(-) diff --git a/appveyor.yml b/appveyor.yml index f8e74851..bf54bd78 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -179,19 +179,12 @@ test_script: If ($env:SQL_INSTANCE -Match "SQL2016") { Write-Host "Running phpt tests via OpenCppCoverage..." $ext_dir = ${env:PHP_SDK_DIR} + "\php-" + ${env:PHP_VERSION} + "-src\ext"; - OpenCppCoverage.exe --sources $ext_dir\sqlsrv --modules php_sqlsrv.dll --export_type=binary:sqlsrv.cov --quiet --cover_children --optimized_build -- php.exe run-tests.php -P ${env:APPVEYOR_BUILD_FOLDER}\test\functional\sqlsrv\*.phpt | out-file -filePath ${env:APPVEYOR_BUILD_FOLDER}\test\functional\sqlsrv.log -encoding UTF8; - type ${env:APPVEYOR_BUILD_FOLDER}\test\functional\sqlsrv.log; - OpenCppCoverage.exe --sources $ext_dir\pdo_sqlsrv --modules php_pdo_sqlsrv.dll --export_type=cobertura:.\coverage.xml --input_coverage=sqlsrv.cov --quiet --cover_children --optimized_build -- php.exe run-tests.php -P ${env:APPVEYOR_BUILD_FOLDER}\test\functional\pdo_sqlsrv\*.phpt | out-file -filePath ${env:APPVEYOR_BUILD_FOLDER}\test\functional\pdo_sqlsrv.log -encoding UTF8; - type ${env:APPVEYOR_BUILD_FOLDER}\test\functional\pdo_sqlsrv.log; - ls *.xml - } Else { - Write-Host "Running phpt tests the regular way..." - .\php.exe run-tests.php -P ${env:APPVEYOR_BUILD_FOLDER}\test\functional\sqlsrv\*.phpt | out-file -filePath ${env:APPVEYOR_BUILD_FOLDER}\test\functional\sqlsrv.log -encoding UTF8; - type ${env:APPVEYOR_BUILD_FOLDER}\test\functional\sqlsrv.log; - .\php.exe run-tests.php -P ${env:APPVEYOR_BUILD_FOLDER}\test\functional\pdo_sqlsrv\*.phpt | out-file -filePath ${env:APPVEYOR_BUILD_FOLDER}\test\functional\pdo_sqlsrv.log -encoding UTF8; - type ${env:APPVEYOR_BUILD_FOLDER}\test\functional\pdo_sqlsrv.log; + OpenCppCoverage.exe --sources $ext_dir\sqlsrv --sources $ext_dir\pdo_sqlsrv --modules php_sqlsrv.dll --modules php_pdo_sqlsrv.dll --export_type=cobertura:.\coverage.xml --quiet --cover_children --optimized_build -- php.exe run-tests.php -P ${env:APPVEYOR_BUILD_FOLDER}\test\functional\ } - - python %APPVEYOR_BUILD_FOLDER%\test\functional\setup\cleanup_dbs.py -dbname %SQLSRV_DBNAME% + - php run-tests.php -p php.exe %APPVEYOR_BUILD_FOLDER%\test\functional\sqlsrv\*.phpt > %APPVEYOR_BUILD_FOLDER%\test\functional\sqlsrv.log 2>&1 + - type %APPVEYOR_BUILD_FOLDER%\test\functional\sqlsrv.log + - php run-tests.php -p php.exe %APPVEYOR_BUILD_FOLDER%\test\functional\pdo_sqlsrv\*.phpt > %APPVEYOR_BUILD_FOLDER%\test\functional\pdo_sqlsrv.log 2>&1 + - type %APPVEYOR_BUILD_FOLDER%\test\functional\pdo_sqlsrv.log - python %APPVEYOR_BUILD_FOLDER%\test\functional\setup\cleanup_dbs.py -dbname %SQLSRV_DBNAME% - python %APPVEYOR_BUILD_FOLDER%\test\functional\setup\cleanup_dbs.py -dbname %PDOSQLSRV_DBNAME% - cd %PHP_INSTALL_DIR% - ps: $fileExists = Test-Path "coverage.xml" @@ -218,7 +211,7 @@ after_test: - cd %APPVEYOR_BUILD_FOLDER%\test\functional\ - ps: $xmlfiles = Get-ChildItem *.xml - ps: foreach($file in $xmlfiles){(new-object net.webclient).UploadFile("https://ci.appveyor.com/api/testresults/junit/$($env:APPVEYOR_JOB_ID)", (Resolve-Path $file))} - - ps: >- + - ps: >- If ($difffiles -ne $null -Or $diff2files -ne $null) { $host.SetShouldExit(1); Write-Host "Forcing build failure due to phpt unit test failure(s)";