Skip to content

Commit b624b9f

Browse files
committed
wip
1 parent fe21d90 commit b624b9f

File tree

11 files changed

+32
-32
lines changed

11 files changed

+32
-32
lines changed

cardano-constitution/test/Cardano/Constitution/Validator/Data/GoldenTests.hs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ import Data.Maybe
2222
import Data.String
2323
import System.FilePath
2424
import Test.Tasty
25-
import Test.Tasty.Extras (ignoreThisTestIfHpcIsEnabled)
25+
import Test.Tasty.Extras (ignoreTestWhenHpcEnabled)
2626
import Test.Tasty.Golden
2727

2828
import Helpers.Guardrail
@@ -68,11 +68,11 @@ test_readable_uplc = testGroup "ReadableUplc" $ M.elems $
6868

6969
tests :: TestTreeWithTestState
7070
tests = testGroup' "Golden" $ fmap const
71-
[ ignoreThisTestIfHpcIsEnabled test_cbor
72-
, ignoreThisTestIfHpcIsEnabled test_budget_large
73-
, ignoreThisTestIfHpcIsEnabled test_budget_small
71+
[ ignoreTestWhenHpcEnabled test_cbor
72+
, ignoreTestWhenHpcEnabled test_budget_large
73+
, ignoreTestWhenHpcEnabled test_budget_small
7474
, test_readable_pir
75-
, ignoreThisTestIfHpcIsEnabled test_readable_uplc
75+
, ignoreTestWhenHpcEnabled test_readable_uplc
7676
]
7777

7878
-- HELPERS

cardano-constitution/test/Cardano/Constitution/Validator/GoldenTests.hs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ import Data.Maybe
2222
import Data.String
2323
import System.FilePath
2424
import Test.Tasty
25-
import Test.Tasty.Extras (ignoreThisTestIfHpcIsEnabled)
25+
import Test.Tasty.Extras (ignoreTestWhenHpcEnabled)
2626
import Test.Tasty.Golden
2727

2828
import Helpers.Guardrail
@@ -68,11 +68,11 @@ test_readable_uplc = testGroup "ReadableUplc" $ M.elems $
6868

6969
tests :: TestTreeWithTestState
7070
tests = testGroup' "Golden" $ fmap const
71-
[ ignoreThisTestIfHpcIsEnabled test_cbor
72-
, ignoreThisTestIfHpcIsEnabled test_budget_large
73-
, ignoreThisTestIfHpcIsEnabled test_budget_small
71+
[ ignoreTestWhenHpcEnabled test_cbor
72+
, ignoreTestWhenHpcEnabled test_budget_large
73+
, ignoreTestWhenHpcEnabled test_budget_small
7474
, test_readable_pir
75-
, ignoreThisTestIfHpcIsEnabled test_readable_uplc
75+
, ignoreTestWhenHpcEnabled test_readable_uplc
7676
]
7777

7878
-- HELPERS

nix/project.nix

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,12 +24,12 @@ let
2424
# below represent the largest subset that can be enabled without
2525
# breaking tests.
2626
# packages.cardano-constitution.doCoverage = true;
27+
# packages.plutus-tx.doCoverage = true;
2728
packages.plutus-conformance.doCoverage = true;
2829
packages.plutus-core.doCoverage = true;
2930
packages.plutus-executables.doCoverage = true;
3031
packages.plutus-tx-test-util.doCoverage = true;
3132
packages.plutus-ledger-api.doCoverage = true;
32-
# packages.plutus-tx.doCoverage = true;
3333

3434
packages.plutus-core.configureFlags = [ "--ghc-option=-D__HPC_ENABLED__" ];
3535
# plutus-benchmark

plutus-benchmark/marlowe/test/Spec.hs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ import PlutusLedgerApi.V3 (ExCPU (..), ExMemory (..))
1919
import System.FilePath ((</>))
2020
import System.IO (hPutStrLn)
2121
import Test.Tasty (defaultMain, testGroup)
22-
import Test.Tasty.Extras (ignoreThisTestIfHpcIsEnabled)
22+
import Test.Tasty.Extras (ignoreTestWhenHpcEnabled)
2323
import UntypedPlutusCore.Size qualified as UPLC
2424

2525
main :: IO ()
@@ -82,4 +82,4 @@ main = withUtf8 $ do
8282
]
8383

8484
-- Write the measures to the actual file
85-
defaultMain $ ignoreThisTestIfHpcIsEnabled marloweTests
85+
defaultMain $ ignoreTestWhenHpcEnabled marloweTests

plutus-benchmark/script-contexts/test/V1/Spec.hs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ module V1.Spec (allTests) where
55
import Data.Text qualified as Text
66

77
import Test.Tasty
8-
import Test.Tasty.Extras (TestNested, ignoreThisTestIfHpcIsEnabled, runTestNested, testNestedGhc)
8+
import Test.Tasty.Extras (TestNested, ignoreTestWhenHpcEnabled, runTestNested, testNestedGhc)
99
import Test.Tasty.HUnit
1010

1111
import PlutusBenchmark.Common (Term, compiledCodeToTerm, runTermCek, unsafeRunTermCek)
@@ -47,7 +47,7 @@ testCheckSOPSc1 = testGroup "checkScriptContext1"
4747
compiledCodeToTerm $ SOP.SC.mkCheckScriptContext1Code (SOP.SC.mkScriptContext 4)
4848
, testCase "fails on 5" . assertFailed $
4949
compiledCodeToTerm $ SOP.SC.mkCheckScriptContext1Code (SOP.SC.mkScriptContext 5)
50-
, ignoreThisTestIfHpcIsEnabled $
50+
, ignoreTestWhenHpcEnabled $
5151
runTestGhcSOP
5252
[
5353
Tx.goldenSize "checkScriptContext1" $
@@ -92,7 +92,7 @@ testCheckSOPSc2 = testGroup "checkScriptContext2"
9292
compiledCodeToTerm $ SOP.SC.mkCheckScriptContext2Code (SOP.SC.mkScriptContext 4)
9393
, testCase "succeed on 5" . assertSucceeded $
9494
compiledCodeToTerm $ SOP.SC.mkCheckScriptContext2Code (SOP.SC.mkScriptContext 5)
95-
, ignoreThisTestIfHpcIsEnabled $
95+
, ignoreTestWhenHpcEnabled $
9696
runTestGhcSOP
9797
[ Tx.goldenSize "checkScriptContext2" $
9898
SOP.SC.mkCheckScriptContext2Code (SOP.SC.mkScriptContext 1)

plutus-benchmark/script-contexts/test/V2/Spec.hs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ module V2.Spec (allTests) where
77
import Data.Text qualified as Text
88

99
import Test.Tasty
10-
import Test.Tasty.Extras (TestNested, ignoreThisTestIfHpcIsEnabled, runTestNested, testNestedGhc)
10+
import Test.Tasty.Extras (TestNested, ignoreTestWhenHpcEnabled, runTestNested, testNestedGhc)
1111
import Test.Tasty.HUnit
1212

1313
import PlutusBenchmark.Common (Term, compiledCodeToTerm, runTermCek, unsafeRunTermCek)
@@ -51,7 +51,7 @@ testCheckSOPSc1 = testGroup "checkScriptContext1"
5151
compiledCodeToTerm $ SOP.SC.mkCheckScriptContext1Code (SOP.SC.mkScriptContext 4)
5252
, testCase "fails on 5" . assertFailed $
5353
compiledCodeToTerm $ SOP.SC.mkCheckScriptContext1Code (SOP.SC.mkScriptContext 5)
54-
, ignoreThisTestIfHpcIsEnabled $
54+
, ignoreTestWhenHpcEnabled $
5555
runTestGhcSOP
5656
[
5757
Tx.goldenSize "checkScriptContext1" $
@@ -96,7 +96,7 @@ testCheckSOPSc2 = testGroup "checkScriptContext2"
9696
compiledCodeToTerm $ SOP.SC.mkCheckScriptContext2Code (SOP.SC.mkScriptContext 4)
9797
, testCase "succeed on 5" . assertSucceeded $
9898
compiledCodeToTerm $ SOP.SC.mkCheckScriptContext2Code (SOP.SC.mkScriptContext 5)
99-
, ignoreThisTestIfHpcIsEnabled $
99+
, ignoreTestWhenHpcEnabled $
100100
runTestGhcSOP
101101
[
102102
Tx.goldenSize "checkScriptContext2" $
@@ -163,7 +163,7 @@ testCheckDataScEquality = testGroup "checkScriptContextEquality"
163163

164164
testSOPFwdStakeTrick :: TestTree
165165
testSOPFwdStakeTrick =
166-
ignoreThisTestIfHpcIsEnabled $
166+
ignoreTestWhenHpcEnabled $
167167
runTestGhcSOP
168168
[ Tx.goldenSize "sopFwdStakeTrick" testCode
169169
, Tx.goldenPirReadable "sopFwdStakeTrick" testAbsCode

plutus-benchmark/script-contexts/test/V3/Spec.hs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ module V3.Spec (allTests) where
55
import Data.Text qualified as Text
66

77
import Test.Tasty
8-
import Test.Tasty.Extras (TestNested, ignoreThisTestIfHpcIsEnabled, runTestNested, testNestedGhc)
8+
import Test.Tasty.Extras (TestNested, ignoreTestWhenHpcEnabled, runTestNested, testNestedGhc)
99
import Test.Tasty.HUnit
1010

1111
import PlutusBenchmark.Common (Term, compiledCodeToTerm, runTermCek, unsafeRunTermCek)
@@ -47,7 +47,7 @@ testCheckSOPSc1 = testGroup "checkScriptContext1"
4747
compiledCodeToTerm $ SOP.SC.mkCheckScriptContext1Code (SOP.SC.mkScriptContext 4)
4848
, testCase "fails on 5" . assertFailed $
4949
compiledCodeToTerm $ SOP.SC.mkCheckScriptContext1Code (SOP.SC.mkScriptContext 5)
50-
, ignoreThisTestIfHpcIsEnabled $
50+
, ignoreTestWhenHpcEnabled $
5151
runTestGhcSOP
5252
[
5353
Tx.goldenSize "checkScriptContext1" $
@@ -92,7 +92,7 @@ testCheckSOPSc2 = testGroup "checkScriptContext2"
9292
compiledCodeToTerm $ SOP.SC.mkCheckScriptContext2Code (SOP.SC.mkScriptContext 4)
9393
, testCase "succeed on 5" . assertSucceeded $
9494
compiledCodeToTerm $ SOP.SC.mkCheckScriptContext2Code (SOP.SC.mkScriptContext 5)
95-
, ignoreThisTestIfHpcIsEnabled $
95+
, ignoreTestWhenHpcEnabled $
9696
runTestGhcSOP
9797
[ Tx.goldenSize "checkScriptContext2" $
9898
SOP.SC.mkCheckScriptContext2Code (SOP.SC.mkScriptContext 1)
@@ -157,7 +157,7 @@ testCheckDataScEquality = testGroup "checkScriptContextEquality"
157157
]
158158

159159
testPurposeIsWellFormed :: TestTree
160-
testPurposeIsWellFormed = ignoreThisTestIfHpcIsEnabled $ testGroup "purposeIsWellFormed"
160+
testPurposeIsWellFormed = ignoreTestWhenHpcEnabled $ testGroup "purposeIsWellFormed"
161161
[ runTestGhcData [ Tx.goldenPirReadable "purposeIsWellFormed" $
162162
Data.SC.compiledPurposeIsWellFormed
163163
, Tx.goldenSize "purposeIsWellFormed" $

plutus-core/testlib/Test/Tasty/Extras.hs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ module Test.Tasty.Extras
3434
, assertEqualPretty
3535
, (%=?)
3636
, (%?=)
37-
, ignoreThisTestIfHpcIsEnabled
37+
, ignoreTestWhenHpcEnabled
3838
) where
3939

4040
import PlutusPrelude hiding (toList)
@@ -322,8 +322,8 @@ Some tests inspect GHC code, but GHC code gets instrumented when using HPC
322322
(Haskell Program Coverage), which causes those tests to fail.
323323
This function disables those tests when the custom __HPC_ENABLED__ flag is defined.
324324
-}
325-
ignoreThisTestIfHpcIsEnabled :: TestTree -> TestTree
326-
ignoreThisTestIfHpcIsEnabled t =
325+
ignoreTestWhenHpcEnabled :: TestTree -> TestTree
326+
ignoreTestWhenHpcEnabled t =
327327
#ifdef __HPC_ENABLED__
328328
ignoreTest t
329329
#else

plutus-core/untyped-plutus-core/testlib/Evaluation/Builtins/Definition.hs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1248,7 +1248,7 @@ test_definition =
12481248
, test_SwapEls
12491249
, test_IdBuiltinData
12501250
, test_TrackCostsRestricting
1251-
, ignoreThisTestIfHpcIsEnabled test_TrackCostsRetaining
1251+
, ignoreTestWhenHpcEnabled test_TrackCostsRetaining
12521252
, test_SerialiseDataImpossible
12531253
, test_fixId
12541254
, runTestNestedHere

plutus-ledger-api/test/Spec/Data/Eval.hs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ import Data.Maybe (fromJust)
3232
import Data.Set qualified as Set
3333
import NoThunks.Class
3434
import Test.Tasty
35-
import Test.Tasty.Extras (ignoreThisTestIfHpcIsEnabled)
35+
import Test.Tasty.Extras (ignoreTestWhenHpcEnabled)
3636
import Test.Tasty.HUnit
3737

3838
{- Note [Direct UPLC code]
@@ -132,6 +132,6 @@ tests = testGroup "eval"
132132
[ testAPI
133133
-- , testUnlifting
134134
, evaluationContextCacheIsComplete
135-
, ignoreThisTestIfHpcIsEnabled evaluationContextNoThunks
135+
, ignoreTestWhenHpcEnabled evaluationContextNoThunks
136136
]
137137

plutus-ledger-api/test/Spec/Eval.hs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ import Data.Maybe (fromJust)
3232
import Data.Set qualified as Set
3333
import NoThunks.Class
3434
import Test.Tasty
35-
import Test.Tasty.Extras (ignoreThisTestIfHpcIsEnabled)
35+
import Test.Tasty.Extras (ignoreTestWhenHpcEnabled)
3636
import Test.Tasty.HUnit
3737

3838
{- Note [Direct UPLC code]
@@ -132,6 +132,6 @@ tests = testGroup "eval"
132132
[ testAPI
133133
-- , testUnlifting
134134
, evaluationContextCacheIsComplete
135-
, ignoreThisTestIfHpcIsEnabled evaluationContextNoThunks
135+
, ignoreTestWhenHpcEnabled evaluationContextNoThunks
136136
]
137137

0 commit comments

Comments
 (0)