use domain from phpunix.xml and output Apache error.log so diagnose PHP errors in requests

This commit is contained in:
Ralf Becker 2020-03-05 11:23:58 +01:00
parent 5cedd472f9
commit afacffa69b
2 changed files with 7 additions and 0 deletions

View File

@ -71,6 +71,8 @@ script:
# --source_dir `pwd` --start_db '' --autostart_db '' --start_webserver '' --webserver_user ''
# Ubuntu has problems with #!/usr/bin/env php -dapc.enable=1, it stalls forever
- vendor/bin/phpunit -c doc -dapc.enable_cli=1
# output Apache error.log to diagnose PHP errors in requests send by unit-tests
- sudo cat /var/log/apache2/error.log
# do not run syntax check for hhvm, as it always fails / get terminated after 10m
- test $(phpenv version-name) = 'hhvm' || ./doc/php_syntax_check.sh

View File

@ -30,6 +30,11 @@ if (ini_get('session.save_handler') === 'files' && !is_writable(ini_get('session
{
ini_set('session.save_path','/tmp'); // regular users may have no rights to apache's session dir
}
// set domain from doc/phpunit.xml
if (!isset($_SERVER['HTTP_HOST']) && $GLOBALS['EGW_DOMAIN'] !== 'default')
{
$_SERVER['HTTP_HOST'] = $GLOBALS['EGW_DOMAIN'];
}
// Symlink api/src/fixtures/apps/* to root
foreach(scandir($path=__DIR__.'/../api/tests/fixtures/apps') as $app)