OPAM not installing test dependencies?




I’m trying to build and test my package on Travis and I am trying to get the integration test to run. I can’t run the integration test as part of run-test because the sandboxing prevents me from talking to the server (that also took me a while to figure out), so I’m using the post install hooks from the Travis CI scripts.

So when I try to build it it failed because it didn’t install Alcotest, fair enough, that’s a test dependency. So I added opam install <mypackage> --yes --with-test --deps-only to the command to install the dependencies declared in the opam file. When I remove alcotest and run the command locally it correctly picks up on it and installs alcotest again.

But when I run it on Travis it decides to synchronize the pinned package and… not do anything thus failing the build again.

I am probably missing something trivial, so if someone could point me at what is happening here I’d be grateful.