Skip to content

Commit 32fe148

Browse files
psumberailuuu1994
authored andcommitted
Fix Solaris tests and enable CI
1 parent 4b0a4f4 commit 32fe148

File tree

88 files changed

+609
-370
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

88 files changed

+609
-370
lines changed

.github/actions/solaris/action.yml

Lines changed: 87 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,87 @@
1+
name: Solaris
2+
inputs:
3+
configurationParameters:
4+
default: ''
5+
required: false
6+
runExtraTests:
7+
default: false
8+
required: false
9+
runs:
10+
using: composite
11+
steps:
12+
- name: Solaris
13+
uses: vmactions/solaris-vm@v1
14+
with:
15+
release: "11.4-gcc"
16+
usesh: true
17+
copyback: false
18+
disable-cache: true
19+
prepare: |
20+
cd $GITHUB_WORKSPACE
21+
pkg install bison developer/icu libzip oniguruma re2c
22+
23+
./buildconf -f
24+
CC=gcc CXX=g++ \
25+
PATH=/usr/gnu/bin:/usr/bin \
26+
PKG_CONFIG_PATH=/usr/lib/amd64/pkgconfig \
27+
./configure \
28+
--prefix=/usr/local \
29+
--enable-debug \
30+
--enable-option-checking=fatal \
31+
--enable-fpm \
32+
--without-pear \
33+
--with-bz2 \
34+
--with-jpeg \
35+
--with-webp \
36+
--with-freetype \
37+
--enable-gd \
38+
--enable-exif \
39+
--with-zip \
40+
--with-zlib \
41+
--enable-soap \
42+
--enable-xmlreader \
43+
--with-xsl \
44+
--with-libxml \
45+
--enable-shmop \
46+
--enable-pcntl \
47+
--enable-mbstring \
48+
--with-curl \
49+
--enable-sockets \
50+
--with-openssl \
51+
--enable-bcmath \
52+
--enable-calendar \
53+
--enable-ftp \
54+
--enable-zend-test \
55+
--enable-dl-test=shared \
56+
--enable-intl \
57+
--with-mhash \
58+
--with-config-file-path=/etc \
59+
--with-config-file-scan-dir=/etc/php.d \
60+
${{ inputs.configurationParameters }}
61+
62+
gmake -j2
63+
mkdir /etc/php.d
64+
gmake install > /dev/null
65+
echo opcache.enable_cli=1 > /etc/php.d/opcache.ini
66+
echo opcache.protect_memory=1 >> /etc/php.d/opcache.ini
67+
echo opcache.preload_user=root >> /etc/php.d/opcache.ini
68+
run: |
69+
cd $GITHUB_WORKSPACE
70+
71+
export SKIP_BROKEN_PSET_CREATE=1
72+
export SKIP_IO_CAPTURE_TESTS=1
73+
export CI_NO_IPV6=1
74+
export STACK_LIMIT_DEFAULTS_CHECK=1
75+
PATH=/usr/gnu/bin:/usr/bin \
76+
sapi/cli/php run-tests.php \
77+
-P -q -j1 \
78+
-g FAIL,BORK,LEAK,XLEAK \
79+
--no-progress \
80+
--offline \
81+
--show-diff \
82+
--show-slow 1000 \
83+
--set-timeout 120
84+
85+
if test "${{ inputs.runExtraTests }}" = "true"; then
86+
sapi/cli/php run-extra-tests.php
87+
fi

.github/matrix.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,7 @@ function select_jobs($repository, $trigger, $nightly, $labels, $php_version, $re
6262
$test_msan = in_array('CI: MSAN', $labels, true);
6363
$test_opcache_variation = in_array('CI: Opcache Variation', $labels, true);
6464
$test_pecl = in_array('CI: PECL', $labels, true);
65+
$test_solaris = in_array('CI: Solaris', $labels, true);
6566
$test_windows = in_array('CI: Windows', $labels, true);
6667

6768
$jobs = [];
@@ -132,6 +133,9 @@ function select_jobs($repository, $trigger, $nightly, $labels, $php_version, $re
132133
if (($all_jobs && $ref === 'master') || $test_pecl) {
133134
$jobs['PECL'] = true;
134135
}
136+
if (version_compare($php_version, '8.6', '>=') && ($all_jobs || $test_solaris)) {
137+
$jobs['SOLARIS'] = true;
138+
}
135139
if ($all_jobs || !$no_jobs || $test_windows) {
136140
$jobs['WINDOWS']['matrix'] = $all_variations
137141
? ['include' => [

.github/workflows/test-suite.yml

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -979,6 +979,21 @@ jobs:
979979
configurationParameters: >-
980980
--${{ matrix.zts && 'enable' || 'disable' }}-zts
981981
runExtraTests: true
982+
SOLARIS:
983+
if: ${{ fromJson(inputs.branch).jobs.SOLARIS }}
984+
name: "SOLARIS"
985+
runs-on: ubuntu-latest
986+
timeout-minutes: 50
987+
steps:
988+
- name: git checkout
989+
uses: actions/checkout@v5
990+
with:
991+
ref: ${{ inputs.branch }}
992+
- name: Solaris
993+
uses: ./.github/actions/solaris
994+
with:
995+
configurationParameters: --disable-zts
996+
runExtraTests: true
982997
BENCHMARKING:
983998
name: BENCHMARKING
984999
if: ${{ fromJson(inputs.branch).jobs.BENCHMARKING }}

Zend/tests/stack_limit/stack_limit_010.phpt

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,9 @@ $expectedMaxSize = match(php_uname('s')) {
2727
'true' => 16*1024*1024, // https://github.com/actions/runner-images/pull/3328
2828
default => 8*1024*1024,
2929
},
30-
'SunOS' => 10 * 1024 * 1024,
30+
'SunOS' => preg_match('/(omnios|illumos|smartos|oi-|openindiana|joyent)/i', php_uname('v'))
31+
? 10 * 1024 * 1024
32+
: 8 * 1024 * 1024,
3133
'Windows NT' => 67108864 - 4*4096, // Set by sapi/cli/config.w32
3234
};
3335

ext/calendar/tests/unixtojd.phpt

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,11 @@
11
--TEST--
22
unixtojd()
3+
--SKIPIF--
4+
<?php
5+
if (PHP_OS_FAMILY === 'Solaris') {
6+
die("skip Solaris localtime() produces different Julian day");
7+
}
8+
?>
39
--EXTENSIONS--
410
calendar
511
--ENV--

ext/ctype/tests/bug25745.phpt

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,12 @@
22
Bug #25745 (ctype functions fail with non-ascii characters)
33
--EXTENSIONS--
44
ctype
5+
--SKIPIF--
6+
<?php
7+
if (PHP_OS_FAMILY === 'Solaris') {
8+
die("skip not valid fo Solaris");
9+
}
10+
?>
511
--INI--
612
error_reporting=E_ALL&~E_DEPRECATED
713
--FILE--

ext/date/tests/bug33532.phpt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ error_reporting=2047
55
date.timezone=UTC
66
--SKIPIF--
77
<?php
8-
if(PHP_OS == 'Darwin' || defined('PHP_WINDOWS_VERSION_MAJOR')) die("skip strftime uses system TZ on Darwin and Windows");
8+
if(PHP_OS == 'Darwin' || PHP_OS_FAMILY === 'Solaris' || defined('PHP_WINDOWS_VERSION_MAJOR')) die("skip strftime uses system TZ on Darwin, Solaris and Windows");
99
if (!@strftime('%Z')) die('skip strftime does not support %Z');
1010
?>
1111
--FILE--

ext/date/tests/gmstrftime_variation16.phpt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,9 @@ Test gmstrftime() function : usage variation - Checking time related formats whi
55
if (strtoupper(substr(PHP_OS, 0, 3)) == 'WIN') {
66
die("skip Test is not valid for Windows");
77
}
8+
if (PHP_OS_FAMILY === 'Solaris') {
9+
die("skip Solaris uses ' 8:08:08 AM' for %r (time format differs)");
10+
}
811
?>
912
--FILE--
1013
<?php

ext/date/tests/strftime_variation16.phpt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,9 @@ Test strftime() function : usage variation - Checking time related formats which
55
if (strtoupper(substr(PHP_OS, 0, 3)) == 'WIN') {
66
die("skip Test is not valid for Windows");
77
}
8+
if (PHP_OS_FAMILY === 'Solaris') {
9+
die("skip Solaris uses ' 8:08:08 AM' for %r (time format differs)");
10+
}
811
?>
912
--FILE--
1013
<?php

ext/fileinfo/tests/finfo_upstream.phpt

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,12 @@
22
Fileinfo run upstream tests
33
--EXTENSIONS--
44
fileinfo
5+
--SKIPIF--
6+
<?php
7+
if (PHP_OS_FAMILY === 'Solaris') {
8+
die("skip timezone-dependent libmagic output differs on Solaris");
9+
}
10+
?>
511
--ENV--
612
TZ=UTC
713
--FILE--

0 commit comments

Comments
 (0)