xmltooling, wheezy and skipping tests

Ferenc Wágner wferi at niif.hu
Wed Sep 21 09:14:37 UTC 2016


Etienne Dysli-Metref <etienne.dysli-metref at switch.ch> writes:

> I've hit a nastier obstacle while backporting xmltooling for wheezy:
> tests that use the network are skipped, but skipping tests is only
> supported since cxxtest 4.2 and wheezy has 4.0 (jessie has 4.3). So the
> code in Enable-skipping-tests-which-require-network-access.patch cannot
> use the TS_SKIP macro.
>
> The following workarounds come to my mind:
> - Backport cxxtest to wheezy, but this is walking straight into
> dependency hell.
> - Undo Enable-skipping-tests-which-require-network-access.patch, but the
> tests will then likely fail on the build servers, preventing the package
> from building.
> - Fake the tests passing with something like:
>     void skipNetworked() {
>         if (getenv("XMLTOOLINGTEST_SKIP_NETWORKED")) {
>             TS_WARN("requires network access");
>             TS_ASSERT(1);
>         }
>     }
>   but I don't like lying in unit tests...
>
> What do you guys think?

I don't think TS_ASSERT(1) short-circuits the rest of the test code, so
the above won't work.  If it actually does, then I'm OK with the above,
because it's a workaround only for a specific software environment.
Otherwise, I'd recommend skipping the whole check phase by removing the
dh_auto_test call from debian/rules.
-- 
Feri



More information about the Pkg-shibboleth-devel mailing list