mirror of
https://github.com/osm-search/Nominatim.git
synced 2026-03-10 21:04:07 +00:00
In tests for PHP 8 disable Just-in-time, it conflicts with tools that determine coverage
This commit is contained in:
1
.github/workflows/ci-tests.yml
vendored
1
.github/workflows/ci-tests.yml
vendored
@@ -70,6 +70,7 @@ jobs:
|
|||||||
with:
|
with:
|
||||||
php-version: ${{ matrix.php }}
|
php-version: ${{ matrix.php }}
|
||||||
tools: phpunit, phpcs, composer
|
tools: phpunit, phpcs, composer
|
||||||
|
ini-values: opcache.jit=disable
|
||||||
|
|
||||||
- uses: actions/setup-python@v2
|
- uses: actions/setup-python@v2
|
||||||
with:
|
with:
|
||||||
|
|||||||
@@ -122,7 +122,13 @@ class TestRunApiScript:
|
|||||||
|
|
||||||
@staticmethod
|
@staticmethod
|
||||||
def test_fail_on_error_output(tmp_path):
|
def test_fail_on_error_output(tmp_path):
|
||||||
(tmp_path / 'website' / 'bad.php').write_text("<?php\nfwrite(STDERR, 'WARNING'.PHP_EOL);")
|
# Starting PHP 8 the PHP CLI no longer has STDERR defined as constant
|
||||||
|
php = """
|
||||||
|
<?php
|
||||||
|
if(!defined('STDERR')) define('STDERR', fopen('php://stderr', 'wb'));
|
||||||
|
fwrite(STDERR, 'WARNING'.PHP_EOL);
|
||||||
|
"""
|
||||||
|
(tmp_path / 'website' / 'bad.php').write_text(php)
|
||||||
|
|
||||||
assert exec_utils.run_api_script('bad', tmp_path) == 1
|
assert exec_utils.run_api_script('bad', tmp_path) == 1
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user