You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Cabal-1.23.0.0: test (suite: package-tests)
package-tests: dist: canonicalizePath: does not exist (No such file or directory)
OK, so let's set CABAL_BUILDDIR explicitly, like env CABAL_BUILDDIR=.stack-work/dist/x86_64-linux/Cabal-1.22.2.0/ stack test. Then we get:
expected: 'setup install' should succeed
output: "/home/hs01/ezyang/cabal-edge/Cabal/tests/Setup configure --user -w /bin/ghc" in
PackageTests/BuildDeps/InternalLibrary2/to-install
Configuring InternalLibrary2-0.1...
Setup: 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).
An adequate workaround is to call the test executable directly with CABAL_BUILDDIR, e.g. env CABAL_BUILDDIR=.stack-work/dist/x86_64-linux/Cabal-1.22.2.0/ .stack-work/dist/x86_64-linux/Cabal-1.22.2.0/build/package-tests/package-tests
Activity
23Skidoo commentedon Jul 7, 2015
Patches welcome.
ezyang commentedon Aug 27, 2015
An adequate workaround is to call the test executable directly with
CABAL_BUILDDIR, e.g.env CABAL_BUILDDIR=.stack-work/dist/x86_64-linux/Cabal-1.22.2.0/ .stack-work/dist/x86_64-linux/Cabal-1.22.2.0/build/package-tests/package-testsezyang commentedon Dec 25, 2015
I have a better idea, which is to use the executable name of the package tests to infer the build directory.
ttuegel commentedon Aug 29, 2016
@ezyang You can work around this by running
stack exec --no-ghc-package-path stack test.Respect GHC_PACKAGE_PATH
Respect GHC_PACKAGE_PATH