GNOME Bugzilla – Bug 752468
make check fails for gobject-introspection 1.44.0 on OS X 10.10.4.
Last modified: 2018-02-08 12:37:13 UTC
make check fails for gobject-introspection 1.44.0 on OS X 10.10.4. In test_transformer, there are several failures of the form: - shared-library="libsletter.so" + shared-library="/unused/libsletter.dylib" since OS X uses .dylib for shared libraries instead of .so. I'm not sure about the significance of "unused". test_underscore_t_sed_filter also fails because of a stray newline. The test-suite.log is posted here: https://gist.github.com/anonymous/45a725625ab84e24cbab Python is version 2.7.10. Xcode is version 6.4.
*** Bug 754011 has been marked as a duplicate of this bug. ***
Created attachment 316645 [details] [review] tests: Ignore platform-dependent field in test results The "shared-library" field of the GIR is platform-dependent, since shared libraries have different names on different platforms. For example, on OS X, the field refers to a .dylib rather than a .so. We ignore this field when comparing the expected output with the generated output.
Above is a patch which fixes all but the stray newline.
Created attachment 316646 [details] [review] transformer: Strip whitespace from filter commands On OS X, the output of sed as reported back to Python has a newline at the end. It seems like a good idea to strip whitespace from the symbol and identifier filter commands anyhow, so strip() the result.
Above patch fixes the stray newline, but there is still one failure: OS X doesn't have GNU sed by default, so \u isn't supported. I'd suggest rewriting the test so that it uses awk for its filter command, or skipping some of the assertions if the sed implementation is determined not to be GNU sed. I'd probably be able to prepare a patch for either one of those, let me know what you think.
Created attachment 316689 [details] [review] scanner test: Cross-platform identifier filter The sed filter in this test used \U which is GNU sed only. In order to be able to run the tests on OS X, which doesn't have GNU sed by default, we reimplement the same filter in awk. It's a bit unwieldy, but works.
OK, these three patches together make all the tests pass on OS X.
*** Bug 777393 has been marked as a duplicate of this bug. ***
Created attachment 356001 [details] [review] tests: Ignore platform-dependent field in test results The "shared-library" field of the GIR is platform-dependent, since shared libraries have different names on different platforms. For example, on OS X, the field refers to a .dylib rather than a .so. We ignore this field when comparing the expected output with the generated output.
Created attachment 356002 [details] [review] transformer: Strip whitespace from filter commands On OS X, the output of sed as reported back to Python has a newline at the end. It seems like a good idea to strip whitespace from the symbol and identifier filter commands anyhow, so strip() the result.
Still happening on 1.53.x - two of the patches needed rebasing, so here are new versions.
-- GitLab Migration Automatic Message -- This bug has been migrated to GNOME's GitLab instance and has been closed from further activity. You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.gnome.org/GNOME/gobject-introspection/issues/139.