File tree Expand file tree Collapse file tree 4 files changed +19
-5
lines changed Expand file tree Collapse file tree 4 files changed +19
-5
lines changed Original file line number Diff line number Diff line change @@ -155,8 +155,6 @@ install:
155155 echo "packages: ." >> cabal.project
156156 echo "packages: testsuite" >> cabal.project
157157 - |
158- echo "package testsuite" >> cabal.project
159- echo " tests: true" >> cabal.project
160158 - " for pkg in $($HCPKG list --simple-output); do echo $pkg | sed 's/-[^-]*$//' | (grep -vE -- '^(random|stm|testsuite)$' || true) | sed 's/^/constraints: /' | sed 's/$/ installed/' >> cabal.project.local; done"
161159 - cat cabal.project || true
162160 - cat cabal.project.local || true
@@ -185,8 +183,6 @@ script:
185183 echo "packages: ${PKGDIR_stm}" >> cabal.project
186184 echo "packages: ${PKGDIR_testsuite}" >> cabal.project
187185 - |
188- echo "package testsuite" >> cabal.project
189- echo " tests: true" >> cabal.project
190186 - " for pkg in $($HCPKG list --simple-output); do echo $pkg | sed 's/-[^-]*$//' | (grep -vE -- '^(random|stm|testsuite)$' || true) | sed 's/^/constraints: /' | sed 's/$/ installed/' >> cabal.project.local; done"
191187 - cat cabal.project || true
192188 - cat cabal.project.local || true
Original file line number Diff line number Diff line change 1- copy-fields: all
21tests: <7.2.1 || >=7.2.2
32installed: +all -random
Original file line number Diff line number Diff line change 1+ {-# LANGUAGE CPP #-}
2+
3+ {- NB: This one fails for GHC 7.6.1 in particular due to GHC#7493.
4+
5+ This was fixed in GHC via
6+ a006ecdfd381fa75ab16ddb66c3a2b247f359eb8
7+ -}
8+
19module Stm065 (main ) where
210
311import Control.Concurrent.STM
412import Control.Monad (unless )
513
614main :: IO ()
15+ #if defined(GHC_7_6_1)
16+ main = putStrLn " Warning: test disabled for GHC 7.6.1"
17+ #else
718main = do
819 x <- atomically $ do
920 r <- newTVar []
@@ -13,3 +24,4 @@ main = do
1324
1425 unless (null x) $ do
1526 fail (show x)
27+ #endif
Original file line number Diff line number Diff line change @@ -47,5 +47,12 @@ test-suite stm
4747 , array ^>= 0.3.0.2 || ^>= 0.4.0.0 || ^>= 0.5.0.0
4848 , random ^>= 1.1
4949
50+ -- The __GLASGOW_HASKELL_PATCHLEVEL1__ macro wasn't available until GHC 7.10.1,
51+ -- so we must use the .cabal file to detect if we're compiling with GHC 7.6.1
52+ -- in particular. See the comments in Stm065 for more information about why we
53+ -- must single out this version of GHC.
54+ if impl(ghc== 7.6.1 )
55+ cpp-options : "-DGHC_7_6_1"
56+
5057 ghc-options : -Wall -fno-warn-unused-imports
5158 ghc-options : -threaded
You can’t perform that action at this time.
0 commit comments