GNOME Bugzilla – Bug 782410
XMLRPC tests get skipped when PHP extension is present but not loaded
Last modified: 2018-04-17 08:50:36 UTC
Created attachment 351482 [details] [review] [PATCH] Configure PHP to load the XMLRPC extension if present The attached patch configures PHP to load the XMLRPC extension if present. This is needed when the system PHP configuration does not already load the extension.
Ping? I humbly request a review.
We're currently in the process of moving to Meson. Is there any chance that you could make sure that with Meson this is also handled properly? Autotools are going away soon.
Created attachment 370904 [details] [review] meson: Unbreak VAPI generation It referenced a nonexistent variable.
Created attachment 370905 [details] [review] meson: Don't install soup-tests resources This was installed into the builddir on 'ninja install', especially noticable if DESTDIR was set for packaging.
Created attachment 370906 [details] [review] meson: Move HAVE_CONFIG_H define to global args Resolves missing config in examples and tests.
Created attachment 370907 [details] [review] meson: Unbreak PHP XMLRPC existence check If the function is missing, the command will succeed but contain "does not exist".
Created attachment 370908 [details] [review] tests: Adjust apache_cmd to better match Makefile.am Unbreaks httpd launching in meson.
Created attachment 370909 [details] [review] tests: Configure PHP to load the XMLRPC extension if present This is needed when the system PHP configuration does not already load the extension.
Here. Unfortunately, I had to touch a lot of other stuff to get the meson build into an acceptable state.
Tomáš, could you review this?
Review of attachment 370904 [details] [review]: This was already reviewed in https://bugzilla.gnome.org/review?bug=795233&attachment=370888 and will be committed soon.
Review of attachment 370905 [details] [review]: Makes sense..
Review of attachment 370906 [details] [review]: Good catch!
Review of attachment 370907 [details] [review]: ::: meson.build @@ +144,3 @@ have_php = true php_xmlrpc = run_command(php, '--rf', 'xmlrpc_server_create') + if php_xmlrpc.returncode() == 0 and not php_xmlrpc.stdout().contains('does not exist') How will this work when the locale won't be set to en_*? It's strange that it's returning 0, but it actually failed.
Review of attachment 370908 [details] [review]: Apache is starting fine for me (when using 'ninja test'). What exact error do you see?
Review of attachment 370909 [details] [review]: I'm not an Apache expert, but the change looks sane.
(In reply to Tomas Popela from comment #16) >Apache is starting fine for me (when using 'ninja test'). What exact error do you see? I'm not sure. The tests seem to be fine without this patch now.
Created attachment 370997 [details] [review] meson: Unbreak build of pull-api-test The #if HAVE_APACHE checks caused compiler errors after HAVE_APACHE was turned into an empty macro. Unbreak by replacing #if with #ifdef.
Created attachment 370998 [details] [review] build: Check php-xmlrpc in a more robust way The old way was dependent on parsing PHP's output, which might depend on the locale (but does not seem to at this time). The check was completely broken in meson, which was missing the output parsing.
Created attachment 370999 [details] [review] tests: Configure PHP to load the XMLRPC extension if present This is needed when the system PHP configuration does not already load the extension.
Review of attachment 370997 [details] [review]: LGTM
Review of attachment 370998 [details] [review]: This is a way better! Thanks!
Review of attachment 370999 [details] [review]: As I already said, I'm not an Apache expert, but the change looks sane to me.
Created attachment 371018 [details] [review] tests: Configure PHP to load the XMLRPC extension if present This is needed when the system PHP configuration does not already load the extension.
Review of attachment 371018 [details] [review]: LGTM (thank you for rebase)
Attachment 370905 [details] pushed as bc489c3 - meson: Don't install soup-tests resources Attachment 370906 [details] pushed as b03ff4e - meson: Move HAVE_CONFIG_H define to global args Attachment 370997 [details] pushed as fed0e93 - meson: Unbreak build of pull-api-test Attachment 370998 [details] pushed as 4d9a148 - build: Check php-xmlrpc in a more robust way Attachment 371018 [details] pushed as 6d28d98 - tests: Configure PHP to load the XMLRPC extension if present