Commit e76c4820 authored by Benno Fünfstück's avatar Benno Fünfstück Committed by Edward Z. Yang
Browse files

Fix #4270: make detailed-0.9 test suites work with dynamic exes

The detailed-0.9 test suite type compiles the test module into a shared library,
so for running the tests, we need to include the directory where the shared
library is stored in LD_LIBRARY_PATH.
parent 2112cfd5
......@@ -37,7 +37,7 @@ import qualified Control.Exception as CE
import System.Directory
( createDirectoryIfMissing, doesDirectoryExist, doesFileExist
, getCurrentDirectory, removeDirectoryRecursive, removeFile
, setCurrentDirectory )
, setCurrentDirectory, makeAbsolute )
import System.Exit ( ExitCode(..), exitWith )
import System.FilePath ( (</>), (<.>) )
import System.IO ( hClose, hGetContents, hPutStr )
......@@ -94,7 +94,8 @@ runTest pkg_descr lbi clbi flags suite = do
let (Platform _ os) = LBI.hostPlatform lbi
paths <- LBI.depLibraryPaths
True False lbi clbi
return (addLibraryPath os paths shellEnv)
cpath <- makeAbsolute $ LBI.componentBuildDir lbi clbi
return (addLibraryPath os (cpath : paths) shellEnv)
else return shellEnv
createProcessWithEnv verbosity cmd opts Nothing (Just shellEnv')
-- these handles are closed automatically
......
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