Skip to content

Commit 1f38c7e

Browse files
tbidneBodigrim
authored andcommitted
Fix windows CI
1 parent 101c632 commit 1f38c7e

File tree

5 files changed

+37
-2
lines changed

5 files changed

+37
-2
lines changed

test/functional/Main.hs

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ import CLC.Stackage.Builder.Package (Package (name))
66
import CLC.Stackage.Runner qualified as Runner
77
import CLC.Stackage.Utils.IO qualified as IO
88
import CLC.Stackage.Utils.Logging qualified as Logging
9+
import CLC.Stackage.Utils.OS (Os (Windows), currentOs)
910
import CLC.Stackage.Utils.Paths qualified as Paths
1011
import Data.ByteString (ByteString)
1112
import Data.ByteString.Char8 qualified as C8
@@ -152,9 +153,14 @@ runGolden getNoCleanup params =
152153
-- test w/ color off since CI can't handle it, apparently
153154
args' = "--color-logs" : "off" : params.args
154155

155-
actualOsPath = goldensDir </> params.testName <> [osp|.actual|]
156+
baseTestPath =
157+
goldensDir
158+
</> params.testName
159+
<> ext
160+
161+
actualOsPath = baseTestPath <> [osp|.actual|]
156162
actualFilePath = Paths.unsafeDecodeUtf actualOsPath
157-
goldenFilePath = Paths.unsafeDecodeUtf $ goldensDir </> params.testName <> [osp|.golden|]
163+
goldenFilePath = Paths.unsafeDecodeUtf $ baseTestPath <> [osp|.golden|]
158164

159165
toBS = C8.unlines
160166

@@ -163,3 +169,8 @@ runGolden getNoCleanup params =
163169

164170
goldensDir :: OsPath
165171
goldensDir = [osp|test|] </> [osp|functional|] </> [osp|goldens|]
172+
173+
ext :: OsPath
174+
ext = case currentOs of
175+
Windows -> [osp|_windows|]
176+
_ -> [osp|_posix|]
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
[2020-05-31 12:00:00][Info] Cached results do not exist: output\cache.json
2+
[2020-05-31 12:00:00][Success] 3: cborg ==0.2.10.0, clock ==0.8.4
3+
[2020-05-31 12:00:00][Success] 2: mtl ==2.3.1, optics-core ==0.4.1.1
4+
[2020-05-31 12:00:00][Success] 1: profunctors ==5.6.2
5+
6+
7+
- Successes: 5 (100%)
8+
- Failures: 0 (0%)
9+
- Untested: 0 (0%)
10+
11+
- Start: 2020-05-31 12:00:00
12+
- End: 2020-05-31 12:00:00
13+
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
[2020-05-31 12:00:00][Info] Cached results do not exist: output\cache.json
2+
[2020-05-31 12:00:00][Success] 1: cborg ==0.2.10.0, clock ==0.8.4, mtl ==2.3...
3+
4+
5+
- Successes: 5 (100%)
6+
- Failures: 0 (0%)
7+
- Untested: 0 (0%)
8+
9+
- Start: 2020-05-31 12:00:00
10+
- End: 2020-05-31 12:00:00
11+

0 commit comments

Comments
 (0)