From f16b012116d6c015632741a3caada5b30ef8a699 Mon Sep 17 00:00:00 2001 From: Joe Watkins Date: Thu, 13 Jun 2019 11:28:46 +0200 Subject: [PATCH] fix mac tests on azure --- azure/macos/brew.yml | 19 ++--- azure/macos/job.yml | 11 +-- azure/macos/test.yml | 3 +- ext/ffi/tests/100.phpt | 4 ++ ext/pcntl/tests/001.phpt | 2 +- ext/sockets/tests/ipv6_skipif.inc | 3 +- ext/sockets/tests/mcast_ipv6_send.phpt | 2 +- .../tests/socket_create_listen-nobind.phpt | 5 +- ext/standard/tests/file/flock_basic.phpt | 14 ++-- ext/standard/tests/file/flock_error.phpt | 2 +- ext/standard/tests/file/flock_variation.phpt | 3 +- .../streams/stream_socket_enable_crypto.phpt | 66 ------------------ ext/zlib/tests/bug55544.phpt | Bin 430 -> 487 bytes ext/zlib/tests/gzencode_variation1.phpt | 4 ++ ext/zlib/tests/gzencode_variation2.phpt | 4 ++ sapi/cli/php_cli.c | 6 ++ .../tests/cli_get_process_title_basic.phpt | 4 +- sapi/cli/tests/cli_process_title_unix.phpt | 4 ++ .../tests/cli_set_process_title_basic.phpt | 4 +- 19 files changed, 64 insertions(+), 96 deletions(-) delete mode 100644 ext/standard/tests/streams/stream_socket_enable_crypto.phpt diff --git a/azure/macos/brew.yml b/azure/macos/brew.yml index f4a23ef3de..5c0592086b 100644 --- a/azure/macos/brew.yml +++ b/azure/macos/brew.yml @@ -4,13 +4,17 @@ parameters: steps: - script: | /usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)" - # see https://formulae.brew.sh/ for package names - brew install autoconf \ + displayName: 'Install Homebrew' + - script: | + brew install pkg-config \ + autoconf \ automake \ libtool \ bison \ - re2c \ - pkg-config \ + re2c + displayName: 'Install Build Tools' + - script: | + brew install openssl@1.1 \ krb5 \ bzip2 \ enchant \ @@ -20,7 +24,6 @@ steps: freetype \ intltool \ icu4c \ - readline \ libiconv \ zlib \ t1lib \ @@ -28,8 +31,8 @@ steps: libzip \ gmp \ tidyp \ - libxml2\ - openssl@1.1 \ + libxml2 \ + libxslt \ postgresql brew link icu4c gettext --force - displayName: 'brew' + displayName: 'Install Build Dependencies' diff --git a/azure/macos/job.yml b/azure/macos/job.yml index cbfc54ef92..56f34fbb41 100644 --- a/azure/macos/job.yml +++ b/azure/macos/job.yml @@ -14,6 +14,8 @@ jobs: export PKG_CONFIG_PATH="$PKG_CONFIG_PATH:/usr/local/opt/krb5/lib/pkgconfig" export PKG_CONFIG_PATH="$PKG_CONFIG_PATH:/usr/local/opt/libffi/lib/pkgconfig" export PKG_CONFIG_PATH="$PKG_CONFIG_PATH:/usr/local/opt/libxml2/lib/pkgconfig" + export PKG_CONFIG_PATH="$PKG_CONFIG_PATH:/usr/local/opt/libxslt/lib/pkgconfig" + export PKG_CONFIG_PATH="$PKG_CONFIG_PATH:/usr/local/opt/zlib/lib/pkgconfig" ./buildconf --force ./configure ${{ parameters.configurationParameters }} \ --prefix=/usr/local \ @@ -32,7 +34,6 @@ jobs: --enable-exif \ --with-zip \ --with-zlib \ - --with-zlib-dir=/usr \ --enable-soap \ --enable-xmlreader \ --with-xsl \ @@ -46,7 +47,7 @@ jobs: --with-readline=/usr/local/opt/readline \ --enable-mbstring \ --with-curl \ - --with-gettext==/usr/local/opt/gettext \ + --with-gettext=/usr/local/opt/gettext \ --enable-sockets \ --with-bz2=/usr/local/opt/bzip2 \ --with-openssl \ @@ -79,9 +80,3 @@ jobs: configurationName: ${{ parameters.configurationName }} runTestsName: 'OpCache' runTestsParameters: -d zend_extension=opcache.so -d opcache.enable_cli=1 - - ${{ if ne(variables['Build.SourceBranch'], 'refs/heads/PHP-7.4') }}: - - template: test.yml - parameters: - configurationName: ${{ parameters.configurationName }} - runTestsName: 'JIT' - runTestsParameters: -d zend_extension=opcache.so -d opcache.enable_cli=1 -d opcache.jit_buffer_size=16M diff --git a/azure/macos/test.yml b/azure/macos/test.yml index edaa68fa6d..4eacf86aad 100644 --- a/azure/macos/test.yml +++ b/azure/macos/test.yml @@ -7,6 +7,7 @@ steps: export TEST_PHP_JUNIT=junit.xml export REPORT_EXIT_STATUS=no export SKIP_IO_CAPTURE_TESTS=1 + export CI_NO_IPV6=1 rm -rf junit.xml | true /usr/local/bin/php run-tests.php -P -q \ -j$(sysctl -n hw.ncpu) \ @@ -22,6 +23,6 @@ steps: testResultsFormat: 'JUnit' testResultsFiles: junit.xml testRunTitle: '${{ parameters.configurationName }} ${{ parameters.runTestsName }}' - failTaskOnFailedTests: false + failTaskOnFailedTests: true displayName: 'Export ${{ parameters.configurationName }} ${{ parameters.runTestsName }} Results' condition: or(succeeded(), failed()) diff --git a/ext/ffi/tests/100.phpt b/ext/ffi/tests/100.phpt index 63fae8c215..85a6bcc668 100644 --- a/ext/ffi/tests/100.phpt +++ b/ext/ffi/tests/100.phpt @@ -8,6 +8,10 @@ try { } catch (Throwable $e) { die('skip PHP symbols not available'); } + +if (PHP_OS == "Darwin") { + die("xfail there is a known leak here"); +} ?> --INI-- ffi.enable=1 diff --git a/ext/pcntl/tests/001.phpt b/ext/pcntl/tests/001.phpt index 6aedbaf33b..3674af0a20 100644 --- a/ext/pcntl/tests/001.phpt +++ b/ext/pcntl/tests/001.phpt @@ -27,7 +27,7 @@ function test_exit_signal(){ $pid=pcntl_fork(); if ($pid==0) { - sleep(10); + while(1); exit; } else { $options=0; diff --git a/ext/sockets/tests/ipv6_skipif.inc b/ext/sockets/tests/ipv6_skipif.inc index 1f824630cb..8c723a0b20 100644 --- a/ext/sockets/tests/ipv6_skipif.inc +++ b/ext/sockets/tests/ipv6_skipif.inc @@ -1,6 +1,7 @@ diff --git a/ext/standard/tests/file/flock_error.phpt b/ext/standard/tests/file/flock_error.phpt index 9f64dd0531..eaf141d573 100644 --- a/ext/standard/tests/file/flock_error.phpt +++ b/ext/standard/tests/file/flock_error.phpt @@ -10,7 +10,7 @@ Description: PHP supports a portable way of locking complete files echo "*** Testing error conditions ***\n"; -$file = __DIR__."/flock.tmp"; +$file = preg_replace("~\.phpt?$~", null, __FILE__); $fp = fopen($file, "w"); /* array of operatons */ diff --git a/ext/standard/tests/file/flock_variation.phpt b/ext/standard/tests/file/flock_variation.phpt index 1f7880ec0c..0c66fca7fb 100644 --- a/ext/standard/tests/file/flock_variation.phpt +++ b/ext/standard/tests/file/flock_variation.phpt @@ -10,7 +10,8 @@ Description: PHP supports a portable way of locking complete files echo "*** Testing flock() fun with the various operation and wouldblock values ***\n"; -$file = __DIR__."/flock.tmp"; + +$file = preg_replace("~\.phpt?$~", null, __FILE__); $fp = fopen($file, "w"); /* array of operatons */ diff --git a/ext/standard/tests/streams/stream_socket_enable_crypto.phpt b/ext/standard/tests/streams/stream_socket_enable_crypto.phpt deleted file mode 100644 index 4b0d9a1923..0000000000 --- a/ext/standard/tests/streams/stream_socket_enable_crypto.phpt +++ /dev/null @@ -1,66 +0,0 @@ ---TEST-- -mixed stream_socket_enable_crypto(resource $stream , bool $enable [, int $crypto_type [, resource $session_stream ]] ) ; ---CREDITS-- -marcosptf - - #phparty7 - @phpsp - novatec/2015 - sao paulo - br ---SKIPIF-- - ---FILE-- - ---CLEAN-- - ---EXPECTF-- -bool(false) - -Warning: stream_socket_enable_crypto(): When enabling encryption you must specify the crypto type in %s on line %d -bool(false) - -Warning: stream_socket_enable_crypto(): SSL: %a in %s on line %d -bool(false) - -Warning: stream_socket_enable_crypto(): SSL/TLS already set-up for this stream in %s on line %d -bool(false) - -Warning: stream_socket_enable_crypto(): SSL/TLS already set-up for this stream in %s on line %d -bool(false) - -Warning: stream_socket_enable_crypto(): SSL/TLS already set-up for this stream in %s on line %d -bool(false) - -Warning: stream_socket_enable_crypto(): SSL/TLS already set-up for this stream in %s on line %d -bool(false) - -Warning: stream_socket_enable_crypto(): SSL/TLS already set-up for this stream in %s on line %d -bool(false) - -Warning: stream_socket_enable_crypto(): SSL/TLS already set-up for this stream in %s on line %d -bool(false) - -Warning: stream_socket_enable_crypto(): SSL/TLS already set-up for this stream in %s on line %d -bool(false) diff --git a/ext/zlib/tests/bug55544.phpt b/ext/zlib/tests/bug55544.phpt index a0d22f4fcebf4846da6781f424f87821626de5ea..e650fe6909f555d04834f4c08f7fd0d354b783e2 100644 GIT binary patch delta 61 zcmZ3-{G55h1>?*#1&siYfO!941zTGMC6~ma^2|IXO@(SM&Xmkl4W;7j%mRhH{1Sz< N{33-Eu --FILE-- --FILE-- --FILE-- diff --git a/sapi/cli/tests/cli_set_process_title_basic.phpt b/sapi/cli/tests/cli_set_process_title_basic.phpt index 9899f3456b..32b8f85a82 100644 --- a/sapi/cli/tests/cli_set_process_title_basic.phpt +++ b/sapi/cli/tests/cli_set_process_title_basic.phpt @@ -6,7 +6,9 @@ Patrick Allaert patrickallaert@php.net --SKIPIF-- --FILE--