-
Notifications
You must be signed in to change notification settings - Fork 20
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
Unit tests fail on my machine #61
Comments
Are you using cabal-dev test or cabal test? In haskell-awk.cabal file we expose three modules: Representable, Runtime and IO. So IO must be installed. You can check inside the lib directory if it has been installed. For instance, inside my cabal-dev dir I have |
You were right, the issue was with cabal-dev! With
|
Seems like my doctest section is failing. |
Wrong button :) |
That's the current state of tests...no one fails but we have this error on parseStaticFlags due to GHC limitations. Have a look here and search parseStaticFlags. It has been fixed in new GHC versions, in future we could try to move to the next GHC version. |
Aha! |
In fact, this test suite isn't supposed to pass at all! Even without sandboxes, if you use I think we should switch to a Makefile-based system, in which |
Plus, the Makefile would run the doctest tool separately, so we wouldn't have the problem with |
I don't like Make too much...and I think this will add complexity to our build system. I would prefer to find a solution using cabal maybe by having a look to other Haskell project. How do they manage this kind of situations? The problem with doctest will be fixed in future and is not really affecting the testing. All the tests pass and we just have an error that is reported. I think we can live with it for a while, no? |
Well, it doesn't need to be Make, but if we want the tests to pass when using cabal-sandbox, something will need to get more complicated. It can be the build system, which would need to install the test suite before running it, or it can be the sandbox detection code, which would need to detect that we're running the test suite and change it's sandbox-detection strategy accordingly. |
Let's use Make, I don't see other solutions using cabal and Make can solve a lot of problems that we have now. My only wish is to use it as little as possible. |
the test suite runs inside ./dist instead of the folder in which hawk is installed, so we need to make a few educated guesses as to the install location of the hawk executable.
Really? Because I've just implemented the other solution (tweaking the sandbox detection code) in branch test-suite-sandbox. |
Good! I really prefer this solution, thank you! |
I have now merged test-suite-sandbox into develop, but before closing this issue, I want to see if I can also fix the doctest error... |
Do you want to wait for this before the release of 1.0? Because in that case maybe we should merge it into release-1.0 (and master when we do the release). Ok for the doctest error, there should be a lot of haskell project having the same problems... |
I don't think test-suite-sandbox is important enough to be merged into 1.0, but I think sandbox-support certainly is! Let's merge both. |
I use doctest on all my projects, and none of them have this error. We must be doing something different... Maybe the fact that we're using the doctest library instead of the doctest executable? |
I don't know. We can remove the doctest call from |
I don't understand why we have that error: apart for the |
Wait, the doctest bug you referenced was fixed two years ago! They even say that "ghc 7.4.1 works well with doctest 0.6.0.1", but I'm using ghc 7.6.3 and doctest 0.9.10! |
I wasn't planning on telling cabal that there are two different test suites, I was planning to change the way we currently call doctest to call the binary instead of the library. See branch doctest-workaround. |
Ops you are right on the versions! Didn't check well, sorry. Ok on using the executable instead of the library, but maybe we should submit a issue report? |
While preparing a minimal test case for the report, I noticed that the doctest library didn't fail when it was the only test in the list. Digging further, I discovered it wasn't failing when it was called first! Thus, we now have an even better fix: continue to call the library, but call it before hspec. I'll file the report. |
Merged into develop, closing. |
Tested 06cbdf6, it fixes the problem. |
I can see that
src/System/Console/Hawk/IO.hs
exists, why can't HUnit find it? Assuming this is HUnit.The text was updated successfully, but these errors were encountered: