Skip to content

Commit

Permalink
Fix rtsopts for tests
Browse files Browse the repository at this point in the history
  • Loading branch information
carbolymer committed Feb 29, 2024
1 parent c0de5bd commit a082b9c
Show file tree
Hide file tree
Showing 7 changed files with 25 additions and 23 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/haskell.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ jobs:

env:
# Modify this value to "invalidate" the cabal cache.
CABAL_CACHE_VERSION: "2024-02-26-4"
CABAL_CACHE_VERSION: "2024-02-28"

concurrency:
group: >
Expand Down
2 changes: 1 addition & 1 deletion bench/locli/locli.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -170,7 +170,7 @@ test-suite test-locli
hs-source-dirs: test
main-is: test-locli.hs
type: exitcode-stdio-1.0
ghc-options: -threaded -rtsopts -with-rtsopts=-N -with-rtsopts=-T
ghc-options: -threaded -rtsopts "-with-rtsopts=-N -T"

build-depends: cardano-prelude
, containers
Expand Down
4 changes: 2 additions & 2 deletions bench/tx-generator/tx-generator.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -238,7 +238,7 @@ test-suite tx-generator-test
-fno-warn-missing-import-lists
-fno-warn-safe
-fno-warn-unsafe
-threaded -rtsopts -with-rtsopts=-N -with-rtsopts=-T
-threaded -rtsopts "-with-rtsopts=-N -T"

benchmark tx-generator-bench
import: project-config
Expand All @@ -256,4 +256,4 @@ benchmark tx-generator-bench
-fno-warn-missing-import-lists
-fno-warn-safe
-fno-warn-unsafe
-threaded -rtsopts -with-rtsopts=-N -with-rtsopts=-T
-threaded -rtsopts "-with-rtsopts=-N -T"
2 changes: 1 addition & 1 deletion cardano-node-chairman/cardano-node-chairman.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ test-suite chairman-tests
Spec.Chairman.Cardano
Spec.Network

ghc-options: -threaded -rtsopts -with-rtsopts=-N -with-rtsopts=-T
ghc-options: -threaded -rtsopts "-with-rtsopts=-N -T"

build-tool-depends: cardano-node:cardano-node
, cardano-cli:cardano-cli ^>= 8.20.2.0
Expand Down
2 changes: 1 addition & 1 deletion cardano-node/cardano-node.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -276,4 +276,4 @@ test-suite cardano-node-test
Test.Cardano.Tracing.NewTracing.Consistency
Test.Cardano.Tracing.OrphanInstances.HardFork

ghc-options: -threaded -rtsopts -with-rtsopts=-N -with-rtsopts=-T
ghc-options: -threaded -rtsopts "-with-rtsopts=-N -T"
6 changes: 3 additions & 3 deletions cardano-testnet/cardano-testnet.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ executable cardano-testnet
, cardano-testnet
, optparse-applicative-fork

ghc-options: -threaded -rtsopts -with-rtsopts=-N -with-rtsopts=-T
ghc-options: -threaded -rtsopts "-with-rtsopts=-N -T"

test-suite cardano-testnet-golden
import: project-config
Expand Down Expand Up @@ -153,7 +153,7 @@ test-suite cardano-testnet-golden
, tasty-hedgehog
, text

ghc-options: -threaded -rtsopts -with-rtsopts=-N -with-rtsopts=-T
ghc-options: -threaded -rtsopts "-with-rtsopts=-N -T"

build-tool-depends: cardano-node:cardano-node
, cardano-cli:cardano-cli
Expand Down Expand Up @@ -215,7 +215,7 @@ test-suite cardano-testnet-test
, time
, transformers

ghc-options: -threaded -rtsopts -with-rtsopts=-N -with-rtsopts=-T
ghc-options: -threaded -rtsopts "-with-rtsopts=-N -T"

build-tool-depends: cardano-node:cardano-node
, cardano-cli:cardano-cli
Expand Down
30 changes: 16 additions & 14 deletions cardano-testnet/test/cardano-testnet-test/cardano-testnet-test.hs
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,6 @@ import qualified Cardano.Testnet.Test.Cli.Conway.Plutus
import qualified Cardano.Testnet.Test.Cli.KesPeriodInfo
import qualified Cardano.Testnet.Test.Cli.QuerySlotNumber
import qualified Cardano.Testnet.Test.FoldBlocks
import qualified Cardano.Testnet.Test.LedgerEvents.Gov.InfoAction as LedgerEvents
import qualified Cardano.Testnet.Test.LedgerEvents.Gov.ProposeNewConstitution as LedgerEvents
import qualified Cardano.Testnet.Test.LedgerEvents.Gov.ProposeNewConstitutionSPO as LedgerEvents
import qualified Cardano.Testnet.Test.LedgerEvents.SanityCheck as LedgerEvents
import qualified Cardano.Testnet.Test.Node.Shutdown
Expand All @@ -31,38 +29,38 @@ import qualified Test.Tasty as T
import Test.Tasty (TestTree)
import qualified Test.Tasty.Ingredients as T


tests :: IO TestTree
tests = pure $ T.testGroup "test/Spec.hs"
[ T.testGroup "Spec"
[ T.testGroup "Ledger Events"
tests = pure $ sequentialTestGroup "test/Spec.hs"
[ sequentialTestGroup "Spec"
[ sequentialTestGroup "Ledger Events"
[ H.ignoreOnWindows "Sanity Check" LedgerEvents.hprop_ledger_events_sanity_check
-- TODO: Replace foldBlocks with checkLedgerStateCondition
, T.testGroup "Governance"
[ H.ignoreOnMacAndWindows "ProposeAndRatifyNewConstitution" LedgerEvents.hprop_ledger_events_propose_new_constitution
, H.ignoreOnWindows "InfoAction" LedgerEvents.hprop_ledger_events_info_action
, H.ignoreOnWindows "ProposeNewConstitutionSPO" LedgerEvents.hprop_ledger_events_propose_new_constitution_spo
-- FIXME Those tests are flaky
[ -- H.ignoreOnMacAndWindows "ProposeAndRatifyNewConstitution" LedgerEvents.hprop_ledger_events_propose_new_constitution
-- , H.ignoreOnWindows "InfoAction" LedgerEvents.hprop_ledger_events_info_action
H.ignoreOnWindows "ProposeNewConstitutionSPO" LedgerEvents.hprop_ledger_events_propose_new_constitution_spo
, H.ignoreOnWindows "DRepRetirement" DRepRetirement.hprop_drep_retirement
]
, T.testGroup "Plutus"
[ H.ignoreOnWindows "PlutusV3" Cardano.Testnet.Test.Cli.Conway.Plutus.hprop_plutus_v3]
]
, T.testGroup "CLI"
, sequentialTestGroup "CLI"
[ H.ignoreOnWindows "Shutdown" Cardano.Testnet.Test.Node.Shutdown.hprop_shutdown
-- ShutdownOnSigint fails on Mac with
-- "Log file: /private/tmp/tmp.JqcjW7sLKS/kes-period-info-2-test-30c2d0d8eb042a37/logs/test-spo.stdout.log had no logs indicating the relevant node has minted blocks."
, H.ignoreOnMacAndWindows "ShutdownOnSigint" Cardano.Testnet.Test.Node.Shutdown.hprop_shutdownOnSigint
-- ShutdownOnSlotSynced FAILS Still. The node times out and it seems the "shutdown-on-slot-synced" flag does nothing
-- , H.ignoreOnWindows "ShutdownOnSlotSynced" Cardano.Testnet.Test.Node.Shutdown.hprop_shutdownOnSlotSynced
, T.testGroup "Babbage"
, sequentialTestGroup "Babbage"
-- TODO: Babbage --next leadership schedule still fails. Once this fix is propagated to the cli (https://github.com/input-output-hk/cardano-api/pull/274)
-- this should remedy. Double check and make sure we have re-enabled it and remove this comment.
[ H.ignoreOnMacAndWindows "leadership-schedule" Cardano.Testnet.Test.Cli.Babbage.LeadershipSchedule.hprop_leadershipSchedule -- FAILS
, H.ignoreOnWindows "stake-snapshot" Cardano.Testnet.Test.Cli.Babbage.StakeSnapshot.hprop_stakeSnapshot
, H.ignoreOnWindows "transaction" Cardano.Testnet.Test.Cli.Babbage.Transaction.hprop_transaction
]
-- TODO: Conway - Re-enable when create-staked is working in conway again
--, T.testGroup "Conway"
--, sequentialTestGroup "Conway"
-- [ H.ignoreOnWindows "stake-snapshot" Cardano.Testnet.Test.Cli.Conway.StakeSnapshot.hprop_stakeSnapshot
-- ]
-- Ignored on Windows due to <stdout>: cosmmitBuffer: invalid argument (invalid character)
Expand All @@ -73,13 +71,17 @@ tests = pure $ T.testGroup "test/Spec.hs"
]

]
, T.testGroup "SubmitApi"
[ T.testGroup "Babbage"
, sequentialTestGroup "SubmitApi"
[ sequentialTestGroup "Babbage"
[ H.ignoreOnWindows "transaction" Cardano.Testnet.Test.SubmitApi.Babbage.Transaction.hprop_transaction
]
]
]

-- FIXME Right now when running tests concurrently it makes tests flaky and sometimes stuck
sequentialTestGroup :: T.TestName -> [TestTree] -> TestTree
sequentialTestGroup name = T.sequentialTestGroup name T.AllFinish

ingredients :: [T.Ingredient]
ingredients = T.defaultIngredients

Expand Down

0 comments on commit a082b9c

Please sign in to comment.