Commit 2158e3c9 authored by Christiaan Baaij's avatar Christiaan Baaij
Browse files

Always setup (DY)LD_LIBRARY_PATH for testsuite

Now that Cabal is in charge of RPATH handling on certain OS',
we must always setup a correct (DY)LD_LIBRARY_PATH when
running the testsuite. Not just when we are building relocatable
packages.

The "problem" is, is that Cabal now adds an RPATH pointing
to the installation location of the library. However, during
testing, the library won't be there yet. We much hence setup
a (DY)LD_LIBRARY_PATH that includes the dist/build dir.
parent a4bb2388
...@@ -83,7 +83,7 @@ runTest pkg_descr lbi flags suite = do ...@@ -83,7 +83,7 @@ runTest pkg_descr lbi flags suite = do
shellEnv = [("HPCTIXFILE", tixFile) | isCoverageEnabled] ++ pkgPathEnv shellEnv = [("HPCTIXFILE", tixFile) | isCoverageEnabled] ++ pkgPathEnv
-- Add (DY)LD_LIBRARY_PATH if needed -- Add (DY)LD_LIBRARY_PATH if needed
shellEnv' <- if LBI.relocatable lbi && LBI.withDynExe lbi shellEnv' <- if LBI.withDynExe lbi
then do let (Platform _ os) = LBI.hostPlatform lbi then do let (Platform _ os) = LBI.hostPlatform lbi
clbi = LBI.getComponentLocalBuildInfo lbi clbi = LBI.getComponentLocalBuildInfo lbi
(LBI.CTestName (PD.testName suite)) (LBI.CTestName (PD.testName suite))
......
...@@ -90,7 +90,7 @@ runTest pkg_descr lbi flags suite = do ...@@ -90,7 +90,7 @@ runTest pkg_descr lbi flags suite = do
shellEnv = [("HPCTIXFILE", tixFile) | isCoverageEnabled] shellEnv = [("HPCTIXFILE", tixFile) | isCoverageEnabled]
++ pkgPathEnv ++ pkgPathEnv
-- Add (DY)LD_LIBRARY_PATH if needed -- Add (DY)LD_LIBRARY_PATH if needed
shellEnv' <- if LBI.relocatable lbi && LBI.withDynExe lbi shellEnv' <- if LBI.withDynExe lbi
then do then do
let (Platform _ os) = LBI.hostPlatform lbi let (Platform _ os) = LBI.hostPlatform lbi
clbi = LBI.getComponentLocalBuildInfo clbi = LBI.getComponentLocalBuildInfo
......
...@@ -81,7 +81,7 @@ run verbosity lbi exe exeArgs = do ...@@ -81,7 +81,7 @@ run verbosity lbi exe exeArgs = do
env <- (dataDirEnvVar:) <$> getEnvironment env <- (dataDirEnvVar:) <$> getEnvironment
-- Add (DY)LD_LIBRARY_PATH if needed -- Add (DY)LD_LIBRARY_PATH if needed
env' <- if relocatable lbi && withDynExe lbi env' <- if withDynExe lbi
then do let (Platform _ os) = hostPlatform lbi then do let (Platform _ os) = hostPlatform lbi
clbi = getComponentLocalBuildInfo lbi clbi = getComponentLocalBuildInfo lbi
(CExeName (exeName exe)) (CExeName (exeName exe))
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment