Skip to content

Commit

Permalink
Merge pull request #3887 from input-output-hk/constraint-tests-by-pla…
Browse files Browse the repository at this point in the history
…tform

Constrain tests by platform
  • Loading branch information
silky committed Sep 10, 2021
2 parents 7afd219 + c2ae0f5 commit 9839104
Show file tree
Hide file tree
Showing 16 changed files with 426 additions and 17 deletions.
43 changes: 42 additions & 1 deletion marlowe/marlowe.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,48 @@ library
Language.Marlowe.Analysis.FSSemantics
other-modules:

test-suite marlowe-test-long-running
import: lang
hs-source-dirs:
test
pab
type: exitcode-stdio-1.0
main-is: SpecLongRunning.hs
other-modules:
Spec.PAB.Workflow
MarloweContract
build-depends:
aeson -any,
base >=4.9 && <5,
containers -any,
data-default -any,
hint -any,
lens -any,
bytestring -any,
freer-simple -any,
tasty -any,
tasty-hunit -any,
tasty-quickcheck,
text -any,
serialise,
cborg,
plutus-chain-index -any,
plutus-contract -any,
plutus-ledger -any,
marlowe,
plutus-tx -any,
QuickCheck,
template-haskell -any,
streaming -any,
plutus-pab -any,
async -any,
prettyprinter -any,
purescript-bridge -any,
servant-client -any,
http-client -any,
websockets -any,
network -any,

test-suite marlowe-test
import: lang
hs-source-dirs:
Expand All @@ -94,7 +136,6 @@ test-suite marlowe-test
Spec.Marlowe.Common
Spec.Marlowe.Marlowe
Spec.Marlowe.AutoExecute
Spec.PAB.Workflow
MarloweContract
build-depends:
aeson -any,
Expand Down
7 changes: 0 additions & 7 deletions marlowe/test/Spec.hs
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,13 @@ module Main(main) where

import qualified Spec.Marlowe.AutoExecute
import qualified Spec.Marlowe.Marlowe
-- import qualified Spec.PAB.Workflow

import Test.Tasty
import Test.Tasty.QuickCheck

main :: IO ()
main = defaultMain tests


tests :: TestTree
tests = testGroup "Marlowe"
[ testGroup "Contracts" [ Spec.Marlowe.Marlowe.tests
Expand All @@ -26,9 +24,4 @@ tests = testGroup "Marlowe"
, testGroup "Marlowe JSON"
[ testProperty "Serialise deserialise loops" Spec.Marlowe.Marlowe.prop_jsonLoops
]
-- TODO: Will be reinstated very soon; have to comment out so that the
-- mac-mini tests don't time out :(
-- , testGroup "PAB Workflow"
-- [ Spec.PAB.Workflow.tests
-- ]
]
15 changes: 15 additions & 0 deletions marlowe/test/SpecLongRunning.hs
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
{-# LANGUAGE OverloadedStrings #-}
module Main(main) where

import qualified Spec.PAB.Workflow
import Test.Tasty

main :: IO ()
main = defaultMain tests

tests :: TestTree
tests = testGroup "Marlowe"
[ testGroup "PAB Workflow"
[ Spec.PAB.Workflow.tests
]
]
16 changes: 16 additions & 0 deletions nix/pkgs/haskell/haskell.nix
Original file line number Diff line number Diff line change
Expand Up @@ -202,6 +202,22 @@ let
export ACTUS_TEST_DATA_DIR=${actus-tests}/tests/
'';


# Note: The following two statements say that these tests should
# _only_ run on linux. In actual fact we just don't want them
# running on the 'mac-mini' instances, because these tests time out
# there. In an ideal world this would be reflected here more
# accurately.
# TODO: Resolve this situation in a better way.
marlowe.components.tests.marlowe-test-long-running = {
platforms = lib.platforms.linux;
};

plutus-pab.components.tests.plutus-pab-test-full-long-running = {
platforms = lib.platforms.linux;
};


# Broken due to warnings, unclear why the setting that fixes this for the build doesn't work here.
iohk-monitoring.doHaddock = false;

Expand Down
39 changes: 38 additions & 1 deletion nix/pkgs/haskell/materialized-darwin/.plan.nix/marlowe.nix

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

54 changes: 54 additions & 0 deletions nix/pkgs/haskell/materialized-darwin/.plan.nix/plutus-pab.nix

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 2 additions & 0 deletions nix/pkgs/haskell/materialized-darwin/default.nix

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

39 changes: 38 additions & 1 deletion nix/pkgs/haskell/materialized-linux/.plan.nix/marlowe.nix

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

54 changes: 54 additions & 0 deletions nix/pkgs/haskell/materialized-linux/.plan.nix/plutus-pab.nix

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 2 additions & 0 deletions nix/pkgs/haskell/materialized-linux/default.nix

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 9839104

Please sign in to comment.