Skip to content

Commit 9457ad3

Browse files
committed
Integration test improvements on Windows
And it caught a bug already! I'll fix that next
1 parent 905b4ea commit 9457ad3

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

test/integration/Spec.hs

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
{-# LANGUAGE DeriveDataTypeable #-}
2+
{-# LANGUAGE ScopedTypeVariables #-}
23

34
import Control.Applicative
45
import Control.Arrow
@@ -113,14 +114,15 @@ copyStackRoot src dst =
113114
Just suffix <- return $ stripPrefix src srcfp
114115
let dstfp = dst ++ "/" ++ suffix
115116
createDirectoryIfMissing True $ takeDirectory dstfp
116-
createSymbolicLink srcfp dstfp
117+
createSymbolicLink srcfp dstfp `catch` \(_ :: IOException) ->
118+
copyFile srcfp dstfp -- for Windows
117119
where
118120
toCopy = any (`isSuffixOf` srcfp)
119121
-- FIXME command line parameters to control how many of these get
120122
-- copied, trade-off of runtime/bandwidth vs isolation of tests
121123
[ ".tar"
122124
, ".xz"
123-
, ".gz"
125+
-- , ".gz"
124126
, ".7z.exe"
125127
, "00-index.cache"
126128
]

test/integration/stack-integration-tests.cabal

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ executable stack-integration-dummy
2121
test-suite stack-integration-tests
2222
type: exitcode-stdio-1.0
2323
main-is: Spec.hs
24+
ghc-options: -Wall -threaded -rtsopts -with-rtsopts=-N
2425

2526
build-depends: base >= 4.7 && < 10
2627
, temporary

0 commit comments

Comments
 (0)