Debian Codegraph @

debian/patches/fix-tests

raw
1 Description: Use 'dist-ghc' as builddir
2 Use 'dist-ghc' as builddir when running tests, instead of 'dist-newstyle'
3 Author: Ilias Tsitsimpis <[email protected]>
4
5 Index: b/test/test-cli.hs
6 ===================================================================
7 --- a/test/test-cli.hs
8 +++ b/test/test-cli.hs
9 @@ -18,13 +18,13 @@ main = do
10 IO.hSetBuffering IO.stderr LineBuffering
11
12 cwd <- getCurrentDirectory
13 - topdir <- canonicalizePath $ cwd </> "dist-newstyle"
14 + topdir <- canonicalizePath $ cwd </> "dist-ghc"
15
16 -- Set an environment variable for all the exectuables we want to test.
17 setExecutableEnvVar "HJSMIN" topdir "hjsmin"
18
19 tests <- filter (`notElem` ["core", "data"]) <$> listDirectory "test/cli/"
20 - res <- forM tests $ \ t -> rawSystem ("test/cli/" ++ t ++ "/run") []
21 + res <- forM tests $ \ t -> rawSystem "/bin/bash" ["test/cli/" ++ t ++ "/run"]
22 if all (== ExitSuccess) res
23 then exitSuccess
24 else exitFailure
25 Index: b/test/cli/core/runner
26 ===================================================================
27 --- a/test/cli/core/runner
28 +++ b/test/cli/core/runner
29 @@ -1,7 +1,7 @@
30 -if test -d dist-newstyle ; then
31 - HJSMIN=$(find dist-newstyle -type f -name hjsmin)
32 -elif test -d ../dist-newstyle ; then
33 - HJSMIN=$(find ../dist-newstyle -type f -name hjsmin)
34 +if test -d dist-ghc ; then
35 + HJSMIN=$(find dist-ghc -type f -name hjsmin)
36 +elif test -d ../dist-ghc ; then
37 + HJSMIN=$(find ../dist-ghc -type f -name hjsmin)
38 fi
39
40 echo