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

cabal test fails when detailed-0.9 tests change current directory #1366

Closed
NovaDenizen opened this issue Jun 9, 2013 · 2 comments
Closed

Comments

@NovaDenizen
Copy link
Contributor

The cabal binary passes a relative log pathname to Distribution.Simple.Test.stubMain via stdin, stubMain runs the tests, then Test.stubWriteLog fails to write the results because the relative path is no longer valid. Cabal fails to read the log and gives the "no parse" error as below.

In this example, tests contains the setCurrentDirectory call, but it could just as easily be within a returned TestInstance.

module Fail where

import System.Directory
import Distribution.TestSuite

tests :: IO [Test]
tests = do
    setCurrentDirectory ".."
    return []

$ cabal test
Running 1 test suites...
Test suite fail: RUNNING...
cabal: Prelude.read: no parse
$ cabal -V
cabal-install version 1.16.0.2
using version 1.16.0.3 of the Cabal library

@23Skidoo
Copy link
Member

/cc @ttuegel

@NovaDenizen
Copy link
Contributor Author

Submitted pull request 8aacf2b

@ttuegel ttuegel closed this as completed Jun 12, 2013
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

No branches or pull requests

3 participants