[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: alternative dependencies

Hi Ralf,

On 06-05-18 12:52, Ralf Treinen wrote:
> can we rely on the fact that alternative dependencies of test cases are
> resolved with priority from left to right?

I am not totally sure, but I think so. If I am correct, the dependencies
are just added to a dummy package and apt-get is asked to resolve all
dependencies. So as long as apt is resolving from left to right, then, yes.

> My use case is as follows: package why3 has a test case for testing
> interaction with cvc4. The latter, however, is not available on all
> architectures, and the test case should not fail if that is the case
> [1]. So the idea is to have in the test case a dependency "cvc4|why3",
> with the intention that cvc4 will be installed whenever it is available.
> Then, the test script checks whether cvc4 is indeed installed, and
> just does "exit 0" when this is not the case.
> Would this work? If not, is there a recommended way to make a test
> case not fail when a dependency is not satisfiable?

Does the package have more tests? If not, I would just let it fail on
that arch and don't bother as this is fragile as well. You want it to
fail on archs were this dependency suddenly becoming unsatisfiable. If
you want to be fully in control, you could instead don't specify the
test dependency, install it yourself on all arches except on a
blacklisted set. This would require more code than you would typically
like though.


Attachment: signature.asc
Description: OpenPGP digital signature

Reply to: