Skip to content

Commit 30f143e

Browse files
committed
Group Plutus tests in a folder
1 parent daa04af commit 30f143e

File tree

4 files changed

+20
-18
lines changed

4 files changed

+20
-18
lines changed

cardano-testnet/cardano-testnet.cabal

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -185,13 +185,13 @@ test-suite cardano-testnet-test
185185

186186
main-is: cardano-testnet-test.hs
187187

188-
other-modules: Cardano.Testnet.Test.Cli.Conway.Plutus
189-
Cardano.Testnet.Test.Cli.Conway.StakeSnapshot
188+
other-modules: Cardano.Testnet.Test.Cli.Conway.StakeSnapshot
190189
Cardano.Testnet.Test.Cli.KesPeriodInfo
191190
Cardano.Testnet.Test.Cli.LeadershipSchedule
192191
Cardano.Testnet.Test.Cli.Query
193192
Cardano.Testnet.Test.Cli.QuerySlotNumber
194-
Cardano.Testnet.Test.Cli.PlutusCostCalculation
193+
Cardano.Testnet.Test.Cli.Plutus.Scripts
194+
Cardano.Testnet.Test.Cli.Plutus.CostCalculation
195195
Cardano.Testnet.Test.Cli.StakeSnapshot
196196
Cardano.Testnet.Test.Cli.Transaction
197197
Cardano.Testnet.Test.Cli.Transaction.RegisterDeregisterStakeAddress
Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
{-# LANGUAGE NamedFieldPuns #-}
22
{-# LANGUAGE NumericUnderscores #-}
33

4-
module Cardano.Testnet.Test.Cli.PlutusCostCalculation
4+
module Cardano.Testnet.Test.Cli.Plutus.CostCalculation
55
( hprop_ref_plutus_cost_calculation
66
, hprop_included_plutus_cost_calculation
77
-- | Execute tests in this module with:
8-
-- @DISABLE_RETRIES=1 cabal run cardano-testnet-test -- -p "/Spec.hs.Spec.CLI.plutus cost calc/"@
8+
-- @DISABLE_RETRIES=1 cabal run cardano-testnet-test -- -p "/Spec.hs.Spec.Ledger Events.Plutus.Cost Calc/"@
99
)
1010
where
1111

@@ -43,6 +43,7 @@ import Testnet.Property.Util (integrationRetryWorkspace)
4343
import Testnet.Start.Types (eraToString)
4444
import Testnet.Types (PaymentKeyInfo (paymentKeyInfoAddr), paymentKeyInfoPair)
4545

46+
-- @DISABLE_RETRIES=1 cabal run cardano-testnet-test -- -p "/Spec.hs.Spec.Ledger Events.Plutus.Cost Calc.Ref Script/"@
4647
hprop_ref_plutus_cost_calculation :: Property
4748
hprop_ref_plutus_cost_calculation = integrationRetryWorkspace 2 "ref plutus script" $ \tempAbsBasePath' -> H.runWithDefaultWatchdog_ $ do
4849
H.note_ SYS.os
@@ -190,6 +191,7 @@ hprop_ref_plutus_cost_calculation = integrationRetryWorkspace 2 "ref plutus scri
190191

191192
H.diffVsGoldenFile output "test/cardano-testnet-test/files/calculatePlutusScriptCost.json"
192193

194+
-- @DISABLE_RETRIES=1 cabal run cardano-testnet-test -- -p "/Spec.hs.Spec.Ledger Events.Plutus.Cost Calc.Normal Script/"@
193195
hprop_included_plutus_cost_calculation :: Property
194196
hprop_included_plutus_cost_calculation = integrationRetryWorkspace 2 "included plutus script" $ \tempAbsBasePath' -> H.runWithDefaultWatchdog_ $ do
195197
H.note_ SYS.os

cardano-testnet/test/cardano-testnet-test/Cardano/Testnet/Test/Cli/Conway/Plutus.hs renamed to cardano-testnet/test/cardano-testnet-test/Cardano/Testnet/Test/Cli/Plutus/Scripts.hs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@
66
{-# LANGUAGE TypeApplications #-}
77

88

9-
module Cardano.Testnet.Test.Cli.Conway.Plutus
10-
( hprop_plutus_v3
9+
module Cardano.Testnet.Test.Cli.Plutus.Scripts
10+
( hprop_plutus_purposes_v3
1111
, hprop_tx_two_script_certs_v2
1212
) where
1313

@@ -44,9 +44,9 @@ import qualified Hedgehog.Extras as H
4444
-- Voting NO
4545
-- Proposing NO
4646
-- Execute me with:
47-
-- @DISABLE_RETRIES=1 cabal test cardano-testnet-test --test-options '-p "/PlutusV3/"'@
48-
hprop_plutus_v3 :: Property
49-
hprop_plutus_v3 = integrationWorkspace "all-plutus-script-purposes" $ \tempAbsBasePath' -> H.runWithDefaultWatchdog_ $ do
47+
-- @DISABLE_RETRIES=1 cabal run cardano-testnet-test -- -p "/Spec.hs.Spec.Ledger Events.Plutus.Scripts/"@
48+
hprop_plutus_purposes_v3 :: Property
49+
hprop_plutus_purposes_v3 = integrationWorkspace "all-plutus-script-purposes" $ \tempAbsBasePath' -> H.runWithDefaultWatchdog_ $ do
5050
conf@Conf { tempAbsPath } <- mkConf tempAbsBasePath'
5151
let tempAbsPath' = unTmpAbsPath tempAbsPath
5252
work <- H.createDirectoryIfMissing $ tempAbsPath' </> "work"

cardano-testnet/test/cardano-testnet-test/cardano-testnet-test.hs

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,11 @@ module Main
55
) where
66

77
import qualified Cardano.Crypto.Init as Crypto
8-
import qualified Cardano.Testnet.Test.Cli.Conway.Plutus
98
import qualified Cardano.Testnet.Test.Cli.KesPeriodInfo
10-
import qualified Cardano.Testnet.Test.Cli.PlutusCostCalculation
119
import qualified Cardano.Testnet.Test.Cli.Query
1210
import qualified Cardano.Testnet.Test.Cli.QuerySlotNumber
11+
import qualified Cardano.Testnet.Test.Cli.Plutus.Scripts
12+
import qualified Cardano.Testnet.Test.Cli.Plutus.CostCalculation
1313
import qualified Cardano.Testnet.Test.Cli.StakeSnapshot
1414
import qualified Cardano.Testnet.Test.Cli.Transaction
1515
import qualified Cardano.Testnet.Test.Cli.Transaction.RegisterDeregisterStakeAddress
@@ -73,8 +73,12 @@ tests = do
7373
, ignoreOnWindows "Transaction Build Wrong Hash" WrongHash.hprop_transaction_build_wrong_hash
7474
]
7575
, T.testGroup "Plutus"
76-
[ ignoreOnWindows "PlutusV3" Cardano.Testnet.Test.Cli.Conway.Plutus.hprop_plutus_v3
77-
, ignoreOnWindows "PlutusV2 transaction with two script certs" Cardano.Testnet.Test.Cli.Conway.Plutus.hprop_tx_two_script_certs_v2
76+
[ ignoreOnWindows "PlutusV3 purposes" Cardano.Testnet.Test.Cli.Plutus.Scripts.hprop_plutus_purposes_v3
77+
, ignoreOnWindows "PlutusV2 transaction with two script certs" Cardano.Testnet.Test.Cli.Plutus.Scripts.hprop_tx_two_script_certs_v2
78+
, T.testGroup "Cost Calc"
79+
[ ignoreOnWindows "Ref Script" Cardano.Testnet.Test.Cli.Plutus.CostCalculation.hprop_ref_plutus_cost_calculation
80+
, ignoreOnWindows "Normal Script" Cardano.Testnet.Test.Cli.Plutus.CostCalculation.hprop_included_plutus_cost_calculation
81+
]
7882
]
7983
]
8084
, T.testGroup "CLI"
@@ -86,10 +90,6 @@ tests = do
8690
, ignoreOnWindows "stake snapshot" Cardano.Testnet.Test.Cli.StakeSnapshot.hprop_stakeSnapshot
8791
, ignoreOnWindows "simple transaction build" Cardano.Testnet.Test.Cli.Transaction.hprop_transaction
8892
, ignoreOnWindows "register deregister stake address in transaction build" Cardano.Testnet.Test.Cli.Transaction.RegisterDeregisterStakeAddress.hprop_tx_register_deregister_stake_address
89-
, T.testGroup "plutus cost calc"
90-
[ ignoreOnWindows "ref script" Cardano.Testnet.Test.Cli.PlutusCostCalculation.hprop_ref_plutus_cost_calculation
91-
, ignoreOnWindows "normal script" Cardano.Testnet.Test.Cli.PlutusCostCalculation.hprop_included_plutus_cost_calculation
92-
]
9393
-- FIXME
9494
-- , ignoreOnMacAndWindows "leadership-schedule" Cardano.Testnet.Test.Cli.LeadershipSchedule.hprop_leadershipSchedule
9595

0 commit comments

Comments
 (0)