Fix BuildTestSuiteDetailedV09 on GHC <7.6#1297
Conversation
Does this mean that they actually test the system version of Cabal? |
|
@23Skidoo No, all the other tests correctly test the in-place Cabal. There are two places that the system Cabal can accidentally get involved: when Setup.hs is compiled, and when the |
|
@ttuegel Can you please put this info in, say, |
|
You have commit access. Go ahead and commit. |
Fix BuildTestSuiteDetailedV09 on GHC <7.6
I will investigate further. |
|
It seems to be somehow caused by this: If I collect some debug info from: PackageTester.hs I can see this command being executed: For some reason there are two package-dbs and one of them refers to a relative path. Given we are in then there is no package-db in dist and the command fails. On the other hand, if we remove |
|
@idontgetoutmuch Strange, the test suite passes fine on Johan's build bot: http://ci.johantibell.com/job/cabal/ |
|
You must run the build phase first. The test suite is only designed to test the in-tree version of Cabal being built. |
|
I am not entirely clear what you mean. I first followed the build and test instructions and got test failures (see below). I am now trying to isolate the failure. What is the best way of doing this without having to run all the tests?
On 3 May 2013, at 15:22, Thomas Tuegel notifications@github.com wrote:
|
|
Sorry, that was unclear from the error you posted. It looked to me like you were trying to build and run the test without building Cabal. |
|
@23Skidoo: Yes the only difference is that I am on a Mac but it will no doubt turn out to be something annoying with my configuration. |
|
@idontgetoutmuch You can take a look at his build script: https://gist.github.com/tibbe/5470453 |
|
@idontgetoutmuch There should be a |
|
Here you go. It seems to be creating a package.conf.inplace but still failing. |
|
It's creating |
|
No Dummy.o afaics: |
|
Do we need a main-is directive in the .cabal file? |
|
Ok I see we don't. |
|
@idontgetoutmuch Does the last GHC command before the failure produce |
|
@tteugel: I'll have to add some code to check but it's now 19:18 at odhac and we are going to the pub so it will have to wait until tomorrow. |
|
Simon Meier couldn't reproduce the build error so I did a completely fresh install. And I can now reproduce the error more easily: But if I build the Setup in tests by hand, it works! |
|
The latter success was red herring. Here is a simple reproduction of the problem. I created a mini package and get the same problem in 1.17. If I use 1.16 I don't get the problem. |
|
It seems to be something to do with names. If I change the name of the test-suite from "dummy" to "Urk" then it works. I also tested changing "dummy" to "Dummy" on linux and this fails also. It looks like cabal uses the name of the test-suite for purposes it probably should not. |
|
Why you ask yourself did this problem show itself initially on a Mac (although it can now be reproduced on linux)? "HFS+ (the Mac filesystem) is usually configured to be case insensitive but case preserving. This means that the file system will consider foo and FoO to be the same, but when you create a new file it will remember which letters where capitalized and which were not." See http://apple.stackexchange.com/questions/22297/is-bash-in-osx-case-insensitive for more details. So this is a real problem even for linux users. It's not clear how to fix it though. |
Fixes haskell#1297 (again). Compiled object files are deleted before the detailed test suite library is built. This is a workaround until the underlying cause is known.
|
The immediate fix is to rename the test suite so it doesn't match the source file. The underlying issue is that (for reasons that are not yet clear to me) you cannot have detailed test suites with the same name as their exported module. I will open a new issue for this because we need to know if this problem affects other types of components. |
|
@idontgetoutmuch #1310 should take care of it for now. Let me know if you continue to have trouble. |
This commit fixes the new test case so that it is always built with the in-place version of Cabal. The problem was that the test package itself depends on Cabal, so build would fail with a sufficiently old version of Cabal installed. No other package tests currently do this, but I tried to make it easy to extend this behavior in case another package test needs to in the future.