Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Run tests on Travis #24

Merged
merged 4 commits into from
Oct 25, 2016
Merged

Run tests on Travis #24

merged 4 commits into from
Oct 25, 2016

Conversation

RyanGlScott
Copy link
Member

@RyanGlScott RyanGlScott commented Oct 20, 2016

Currently, the test suite isn't run on Travis builds. This PR aims to fix that. I had to make some modifications to make this happen:

  • Unfortunately, HUnit (which we depend on for the test suite) depends on deepseq, so trying to naïvely run cabal install --only-dependencies --enable-tests will result in a dependency cycle. To get around this, I have to manually specify the dependencies in .travis.yml à la binary.
  • Also unfortunately, there's a Safe Haskell bug in GHC 7.2.1 that prevents it from installing transformers without running sudo ghc-pkg trust base. But in order to use sudo, I have to disable the containerized Travis builds. (This isn't true anymore, see Run tests on Travis #24 (comment))
  • I needed to bump the upper version bounds on HUnit to < 1.6 to accommodate the HUnit-1.5 release on Hackage. Also, the test suite failed to build without an explicit ghc-prim dependency.

@RyanGlScott
Copy link
Member Author

An addendum to the second point: I opted to keep the containerized Travis builds (which are faster) by simply not running the test suite on GHC 7.2.1, which I think is an acceptable sacrifice.

@hvr
Copy link
Member

hvr commented Oct 21, 2016

@RyanGlScott hrm... this is a bit awkward... I was about to convert deepseq to the new-style .travis scripts as the old scripts are too fragile and too complicated. However, new-build has one open issue regarding cyclic dependencies involving the package under test, so we wouldn't be able to build & run the testsuites :-/

@RyanGlScott
Copy link
Member Author

I was about to convert deepseq to the new-style .travis scripts as the old scripts are too fragile and too complicated.

Ah! Well if there's a cleaner way to do this, I'd vastly prefer it over this approach.

However, new-build has one open issue regarding cyclic dependencies involving the package under test, so we wouldn't be able to build & run the testsuites :-/

What issue is that?

@hvr
Copy link
Member

hvr commented Oct 21, 2016

What issue is that?

haskell/cabal#3422

(and more discussion can be found at haskell/cabal#3232)

That being said, maybe we should just merge this one, and hope that new-build will become capable of cyclic deps before old-build is killed off for good

@RyanGlScott
Copy link
Member Author

That being said, maybe we should just merge this one, and hope that new-build will become capable of cyclic deps before old-build is killed off for good

That sounds reasonable to me.

Other than the whole cyclic dependency hullabaloo, do you have any objections to bumping the cabal-install versions used in the Travis script for old GHCs? I simply lack the knowledge about old cabal-installs to figure out how to diagnose bugs like these. :\

@hvr
Copy link
Member

hvr commented Oct 21, 2016

do you have any objections to bumping the cabal-install versions used in the Travis script for old GHCs?

nope, no objection; with older cabals there were issues requiring us to test with matching cabal versions, but with modern cabal versions this shouldn't be a problem anymore to use the latest cabal release.

@hvr hvr merged commit b01f808 into master Oct 25, 2016
@hvr hvr deleted the travis-tests branch October 25, 2016 17:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants