For the cppunit tests there's a wrinkle in that to be able to use
symbols which have been visibility marked up to be *private* the .o
files with those symbols need to be linked into the test shared lib.
e.g. sc's ucalc an sw'd swdoc-test cppunit tests are these
When the visibility of the symbols required by a test are public the
test shared lib can just be linked to the shared lib in which the
symbols live, e.g. sc's and sw's filters-test are these, as are most
tests.
There's a gotcha if you have e.g. the sw swdoc-test test which is linked
together from the same .o's which go into libsw and then get your test
to dlopen something which links to the *real* libsw, i.e. duplicate
symbols and "weird things happen".
i.e. the .doc and .rtf filters in sw are implemented by a libmsword.so
which links to libsw. *If* the .doc and .rtf filter tests were in
swdoc-test then they will fail in some very odd and hard-to-debug ways
seeing as libswdoctest.so would end up dlopening indirectly libmsword.so
which is linked to libsw.so which comprises of copies of the same .os as
comprise libswdoctest.so
Anyway, that's why the filters-test in sw and sc are separate from the
"fat" test of the internal apis.
C.
Context
- [Libreoffice] visibility markup and tests, gotchas · Caolán McNamara
Privacy Policy |
Impressum (Legal Info) |
Copyright information: Unless otherwise specified, all text and images
on this website are licensed under the
Creative Commons Attribution-Share Alike 3.0 License.
This does not include the source code of LibreOffice, which is
licensed under the Mozilla Public License (
MPLv2).
"LibreOffice" and "The Document Foundation" are
registered trademarks of their corresponding registered owners or are
in actual use as trademarks in one or more countries. Their respective
logos and icons are also subject to international copyright laws. Use
thereof is explained in our
trademark policy.