Skip to content

Commit d4a5e5b

Browse files
committed
Make test suite build minimally for wasm
1 parent 4986b03 commit d4a5e5b

File tree

2 files changed

+29
-17
lines changed

2 files changed

+29
-17
lines changed

cardano-wasm/cardano-wasm.cabal

Lines changed: 22 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -63,24 +63,29 @@ executable cardano-wasm
6363
utf8-string,
6464

6565
test-suite cardano-wasm-golden
66-
import: project-config
67-
hs-source-dirs: test
68-
main-is: cardano-wasm-golden.hs
6966
type: exitcode-stdio-1.0
70-
build-depends:
71-
hedgehog >=1.1,
72-
hedgehog-extras ^>=0.8,
73-
tasty,
74-
tasty-hedgehog,
67+
main-is: cardano-wasm-golden.hs
68+
hs-source-dirs: test
7569

76-
ghc-options:
77-
-threaded
78-
-rtsopts
79-
"-with-rtsopts=-N -T"
70+
if !arch(wasm32)
71+
import: project-config
72+
build-depends:
73+
hedgehog >=1.1,
74+
hedgehog-extras ^>=0.8,
75+
tasty,
76+
tasty-hedgehog,
77+
78+
ghc-options:
79+
-threaded
80+
-rtsopts
81+
"-with-rtsopts=-N -T"
8082

81-
build-tool-depends:
82-
cardano-wasm:cardano-wasm,
83-
tasty-discover:tasty-discover,
83+
build-tool-depends:
84+
cardano-wasm:cardano-wasm,
85+
tasty-discover:tasty-discover,
8486

85-
other-modules:
86-
Test.Golden.Cardano.Wasm.TypeScript
87+
other-modules:
88+
Test.Golden.Cardano.Wasm.TypeScript
89+
else
90+
build-depends:
91+
base
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,8 @@
1+
{-# LANGUAGE CPP #-}
2+
3+
#if !defined(wasm32_HOST_ARCH)
14
{-# OPTIONS_GHC -F -pgmF tasty-discover -optF --hide-successes #-}
5+
#else
6+
main = return ()
7+
#endif
8+

0 commit comments

Comments
 (0)