File: fix-tests

package info (click to toggle)
haskell-hjsmin 0.2.1-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 116 kB
  • sloc: haskell: 152; sh: 30; makefile: 3
file content (40 lines) | stat: -rw-r--r-- 1,481 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
Description: Use 'dist-ghc' as builddir
 Use 'dist-ghc' as builddir when running tests, instead of 'dist-newstyle'
Author: Ilias Tsitsimpis <iliastsi@debian.org>

Index: b/test/test-cli.hs
===================================================================
--- a/test/test-cli.hs
+++ b/test/test-cli.hs
@@ -18,13 +18,13 @@ main = do
   IO.hSetBuffering IO.stderr LineBuffering
 
   cwd <- getCurrentDirectory
-  topdir <- canonicalizePath $ cwd </> "dist-newstyle"
+  topdir <- canonicalizePath $ cwd </> "dist-ghc"
 
   -- Set an environment variable for all the exectuables we want to test.
   setExecutableEnvVar "HJSMIN" topdir "hjsmin"
 
   tests <- filter (`notElem` ["core", "data"]) <$> listDirectory "test/cli/"
-  res <- forM tests $ \ t -> rawSystem ("test/cli/" ++ t ++ "/run") []
+  res <- forM tests $ \ t -> rawSystem "/bin/bash" ["test/cli/" ++ t ++ "/run"]
   if all (== ExitSuccess) res
     then exitSuccess
     else exitFailure
Index: b/test/cli/core/runner
===================================================================
--- a/test/cli/core/runner
+++ b/test/cli/core/runner
@@ -1,7 +1,7 @@
-if test -d dist-newstyle ; then
-    HJSMIN=$(find dist-newstyle -type f -name hjsmin)
-elif test -d ../dist-newstyle ; then
-    HJSMIN=$(find ../dist-newstyle -type f -name hjsmin)
+if test -d dist-ghc ; then
+    HJSMIN=$(find dist-ghc -type f -name hjsmin)
+elif test -d ../dist-ghc ; then
+    HJSMIN=$(find ../dist-ghc -type f -name hjsmin)
     fi
 
 echo