Hi, When hacking on Haskell projects with tests, the tests ofter depend on the project itself: that is, test-suite blocks will have itself in dependencies. This works fine with cabal and such. However, if I run:
eval "$configurePhase" && eval "$buildPhase" && eval "$checkPhase" in Haddock which does this, I get: In-place registering haddock-2.15.0... Preprocessing executable 'haddock' for haddock-2.15.0... [1 of 1] Compiling Main ( driver/Main.hs, dist/build/haddock/haddock-tmp/Main.dyn_o ) Linking dist/build/haddock/haddock ... Preprocessing test suite 'html-test' for haddock-2.15.0... [1 of 1] Compiling Main ( html-test/run.lhs, dist/build/html-test/html-test-tmp/Main.dyn_o ) Linking dist/build/html-test/html-test ... Preprocessing test suite 'latex-test' for haddock-2.15.0... [1 of 1] Compiling Main ( latex-test/run.lhs, dist/build/latex-test/latex-test-tmp/Main.dyn_o ) Linking dist/build/latex-test/latex-test ... Running 2 test suites... Test suite html-test: RUNNING... Haddock version 2.15.0, (c) Simon Marlow 2006 Ported to use the GHC API by David Waern 2006-2008 7.9.20140624 Haddock version: GHC version: html-test: user error (Use of GHC's environment variable GHC_PACKAGE_PATH is incompatible with Cabal. Use the flag --package-db to specify a package database (it can be used multiple times).) Test suite html-test: FAIL Test suite logged to: dist/test/haddock-2.15.0-html-test.log Test suite latex-test: RUNNING... Haddock version 2.15.0, (c) Simon Marlow 2006 Ported to use the GHC API by David Waern 2006-2008 7.9.20140624 Haddock version: GHC version: latex-test: user error (Use of GHC's environment variable GHC_PACKAGE_PATH is incompatible with Cabal. Use the flag --package-db to specify a package database (it can be used multiple times).) Test suite latex-test: FAIL Test suite logged to: dist/test/haddock-2.15.0-latex-test.log 0 of 2 test suites (0 of 2 test cases) passed. Now if I quit out of the nix-shell and re-enter: [nix-shell:~/programming/haddock]$ exit [shana@lenalee:~/programming/haddock]$ nix-shell --pure [nix-shell:~/programming/haddock]$ eval "$checkPhase" Running 2 test suites... Test suite html-test: RUNNING... Test suite html-test: PASS Test suite logged to: dist/test/haddock-2.15.0-html-test.log Test suite latex-test: RUNNING... Test suite latex-test: PASS Test suite logged to: dist/test/haddock-2.15.0-latex-test.log 2 of 2 test suites (2 of 2 test cases) passed. Needless to say, this is really annoying during development and if any tools rely on test output then those can't work either. Looking at nixpkgs, it seems that the packages that do this kind of testing (Haddock, Yi) have tests disabled by default even though I know the tests for both those projects pass. It seems like someone disabled the tests in favour of finding out what actually needs to happen… Does anyone have any insight on how to get this to work properly? It seems that this should be fixed on nix/nixpkgs side. -- Mateusz K. _______________________________________________ nix-dev mailing list [email protected] http://lists.science.uu.nl/mailman/listinfo/nix-dev
