Skip to content

Commit

Permalink
Provide bless_tests.patch for failing tests on AppVeyor
Browse files Browse the repository at this point in the history
In case any tests are failing with the `--bless` option, we provide the
resulting `git diff` as artifact.  This is particularly helpful for PR
authors who don't have a Windows environment at hand.

Closes GH-7204.
  • Loading branch information
cmb69 committed Jul 17, 2021
1 parent 9e1c961 commit dff3219
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion appveyor/test_task.bat
Expand Up @@ -112,10 +112,16 @@ mkdir c:\tests_tmp
set TEST_PHP_JUNIT=c:\junit.out.xml

cd "%APPVEYOR_BUILD_FOLDER%"
nmake test TESTS="%OPCACHE_OPTS% -q --offline --show-diff --show-slow 1000 --set-timeout 120 --temp-source c:\tests_tmp --temp-target c:\tests_tmp %PARALLEL%"
nmake test TESTS="%OPCACHE_OPTS% -q --offline --show-diff --show-slow 1000 --set-timeout 120 --temp-source c:\tests_tmp --temp-target c:\tests_tmp --bless %PARALLEL%"

set EXIT_CODE=%errorlevel%

appveyor PushArtifact %TEST_PHP_JUNIT%

if %EXIT_CODE% GEQ 1 (
git checkout ext\pgsql\tests\config.inc
git diff > bless_tests.patch
appveyor PushArtifact bless_tests.patch
)

exit /b %EXIT_CODE%

0 comments on commit dff3219

Please sign in to comment.