Hi, I'm working on updating the Geany package in nixpkgs from 1.38 to 2.0: 
https://github.com/NixOS/nixpkgs/pull/265362.

With Geany 2.0, 
[`tests/test_sidebar.c`](https://github.com/geany/geany/blob/2.0.0/tests/test_sidebar.c)
 fails on nixpkgs' automatic PR builder (ofborg) on macOS, but not on macOS 
locally - presumably due to the environment being headless in the former case. 
On Linux, `test_sidebar` succeeds both locally and on the builder. The issue 
would likely show up on Hydra as well, our central CI service, and would cause 
us to introduce workarounds that are probably avoidable.

The return value of [`gtk_init_check` 
here](https://github.com/geany/geany/blob/2.0.0/tests/test_sidebar.c#L145) is 
never examined. https://docs.gtk.org/gtk3/func.init_check.html says:

_"Note that calling any GTK function or instantiating any GTK type after this 
function returns FALSE results in undefined behavior."_

Could you please take a look at this? I can't really gauge what it would take 
to make the test run properly on Darwin in a headless environment (if 
possible). Worst case the test could skip itself and emit an appropriate 
message if GTK can't initialize, which would still be better than downstream 
having to explicitly work around it.

---

The build log for `x86_64-darwin` with the failing test can be viewed 
[here](https://logs.ofborg.org/?key=nixos/nixpkgs.265362&attempt_id=2ac562f8-6359-4695-b467-d58823b037e5).
 I attached it here in case that link becomes inaccessible: 
[geany_2.0_x86_64-darwin_ofborg_buildlog.txt](https://github.com/geany/geany/files/13258067/geany_2.0_x86_64-darwin_ofborg_buildlog.txt)

-- 
Reply to this email directly or view it on GitHub:
https://github.com/geany/geany/issues/3674
You are receiving this because you are subscribed to this thread.

Message ID: <geany/geany/issues/[email protected]>

Reply via email to