From 22d10020c3cd744210b70318abb96a14391eb968 Mon Sep 17 00:00:00 2001 From: Alexey Kuleshevich Date: Fri, 24 Sep 2021 03:34:22 +0300 Subject: [PATCH] Fix module duplication in library, tests and benchmarks --- .../cardano-ledger-shelley-test.cabal | 44 +++++-------------- .../Ledger/Shelley/Address/Bootstrap.hs | 0 .../Ledger/Shelley/Address/CompactAddr.hs | 0 .../Ledger/Shelley/ByronTranslation.hs | 0 .../Cardano/Ledger/Shelley/Examples/Cast.hs | 0 .../Ledger/Shelley/Examples/Federation.hs | 0 .../Cardano/Ledger/Shelley/PropertyTests.hs | 0 .../Ledger/Shelley/Rules/ClassifyTraces.hs | 0 .../Cardano/Ledger/Shelley/Rules/TestChain.hs | 0 .../Cardano/Ledger/Shelley/Rules/TestDeleg.hs | 0 .../Cardano/Ledger/Shelley/Rules/TestPool.hs | 0 .../Ledger/Shelley/Rules/TestPoolreap.hs | 0 .../Ledger/Shelley/ShelleyTranslation.hs | 0 .../{test => src}/Test/TestScenario.hs | 0 14 files changed, 10 insertions(+), 34 deletions(-) rename eras/shelley/test-suite/{test => src}/Test/Cardano/Ledger/Shelley/Address/Bootstrap.hs (100%) rename eras/shelley/test-suite/{test => src}/Test/Cardano/Ledger/Shelley/Address/CompactAddr.hs (100%) rename eras/shelley/test-suite/{test => src}/Test/Cardano/Ledger/Shelley/ByronTranslation.hs (100%) rename eras/shelley/test-suite/{test => src}/Test/Cardano/Ledger/Shelley/Examples/Cast.hs (100%) rename eras/shelley/test-suite/{test => src}/Test/Cardano/Ledger/Shelley/Examples/Federation.hs (100%) rename eras/shelley/test-suite/{test => src}/Test/Cardano/Ledger/Shelley/PropertyTests.hs (100%) rename eras/shelley/test-suite/{test => src}/Test/Cardano/Ledger/Shelley/Rules/ClassifyTraces.hs (100%) rename eras/shelley/test-suite/{test => src}/Test/Cardano/Ledger/Shelley/Rules/TestChain.hs (100%) rename eras/shelley/test-suite/{test => src}/Test/Cardano/Ledger/Shelley/Rules/TestDeleg.hs (100%) rename eras/shelley/test-suite/{test => src}/Test/Cardano/Ledger/Shelley/Rules/TestPool.hs (100%) rename eras/shelley/test-suite/{test => src}/Test/Cardano/Ledger/Shelley/Rules/TestPoolreap.hs (100%) rename eras/shelley/test-suite/{test => src}/Test/Cardano/Ledger/Shelley/ShelleyTranslation.hs (100%) rename eras/shelley/test-suite/{test => src}/Test/TestScenario.hs (100%) diff --git a/eras/shelley/test-suite/cardano-ledger-shelley-test.cabal b/eras/shelley/test-suite/cardano-ledger-shelley-test.cabal index fe6b2a9cfd3..2500d18b678 100644 --- a/eras/shelley/test-suite/cardano-ledger-shelley-test.cabal +++ b/eras/shelley/test-suite/cardano-ledger-shelley-test.cabal @@ -33,13 +33,16 @@ common project-config library import: base, project-config hs-source-dirs: src - test exposed-modules: Test.Cardano.Crypto.VRF.Fake + Test.Cardano.Ledger.Shelley.Address.Bootstrap + Test.Cardano.Ledger.Shelley.Address.CompactAddr Test.Cardano.Ledger.Shelley.BenchmarkFunctions + Test.Cardano.Ledger.Shelley.ByronTranslation Test.Cardano.Ledger.Shelley.ConcreteCryptoTypes Test.Cardano.Ledger.Shelley.Examples.Cast Test.Cardano.Ledger.Shelley.Examples.Consensus + Test.Cardano.Ledger.Shelley.Examples.Federation Test.Cardano.Ledger.Shelley.Generator.Block Test.Cardano.Ledger.Shelley.Generator.Constants Test.Cardano.Ledger.Shelley.Generator.Core @@ -55,27 +58,22 @@ library Test.Cardano.Ledger.Shelley.Generator.ScriptClass Test.Cardano.Ledger.Shelley.Generator.ShelleyEraGen Test.Cardano.Ledger.Shelley.Orphans + Test.Cardano.Ledger.Shelley.PropertyTests Test.Cardano.Ledger.Shelley.Rules.ClassifyTraces + Test.Cardano.Ledger.Shelley.Rules.TestChain + Test.Cardano.Ledger.Shelley.Rules.TestDeleg + Test.Cardano.Ledger.Shelley.Rules.TestPool + Test.Cardano.Ledger.Shelley.Rules.TestPoolreap Test.Cardano.Ledger.Shelley.Serialisation.CDDLUtils Test.Cardano.Ledger.Shelley.Serialisation.Generators Test.Cardano.Ledger.Shelley.Serialisation.EraIndepGenerators Test.Cardano.Ledger.Shelley.Serialisation.Generators.Bootstrap Test.Cardano.Ledger.Shelley.Serialisation.Generators.Genesis Test.Cardano.Ledger.Shelley.Serialisation.GoldenUtils + Test.Cardano.Ledger.Shelley.ShelleyTranslation Test.Cardano.Ledger.Shelley.Shrinkers Test.Cardano.Ledger.Shelley.Utils - Test.Cardano.Ledger.Shelley.PropertyTests - Test.Cardano.Ledger.Shelley.Rules.TestChain Test.TestScenario - other-modules: - Test.Cardano.Ledger.Shelley.Address.Bootstrap - Test.Cardano.Ledger.Shelley.Address.CompactAddr - Test.Cardano.Ledger.Shelley.ByronTranslation - Test.Cardano.Ledger.Shelley.Examples.Federation - Test.Cardano.Ledger.Shelley.Rules.TestDeleg - Test.Cardano.Ledger.Shelley.Rules.TestPool - Test.Cardano.Ledger.Shelley.Rules.TestPoolreap - Test.Cardano.Ledger.Shelley.ShelleyTranslation build-depends: base16-bytestring >= 1, bytestring, @@ -125,14 +123,9 @@ test-suite cardano-ledger-shelley-test main-is: Tests.hs other-modules: Test.Control.Iterate.SetAlgebra - Test.Cardano.Ledger.Shelley.Address.Bootstrap - Test.Cardano.Ledger.Shelley.Address.CompactAddr - Test.Cardano.Ledger.Shelley.ByronTranslation Test.Cardano.Ledger.Shelley.Examples - Test.Cardano.Ledger.Shelley.Examples.Cast Test.Cardano.Ledger.Shelley.Examples.Combinators Test.Cardano.Ledger.Shelley.Examples.EmptyBlock - Test.Cardano.Ledger.Shelley.Examples.Federation Test.Cardano.Ledger.Shelley.Examples.Init Test.Cardano.Ledger.Shelley.Examples.GenesisDelegation Test.Cardano.Ledger.Shelley.Examples.NetworkID @@ -145,13 +138,7 @@ test-suite cardano-ledger-shelley-test Test.Cardano.Ledger.Shelley.Fees Test.Cardano.Ledger.Shelley.MultiSigExamples Test.Cardano.Ledger.Shelley.Pretty - Test.Cardano.Ledger.Shelley.PropertyTests Test.Cardano.Ledger.Shelley.Rewards - Test.Cardano.Ledger.Shelley.Rules.ClassifyTraces - Test.Cardano.Ledger.Shelley.Rules.TestChain - Test.Cardano.Ledger.Shelley.Rules.TestDeleg - Test.Cardano.Ledger.Shelley.Rules.TestPool - Test.Cardano.Ledger.Shelley.Rules.TestPoolreap Test.Cardano.Ledger.Shelley.SafeHash Test.Cardano.Ledger.Shelley.Serialisation Test.Cardano.Ledger.Shelley.Serialisation.CDDL @@ -160,10 +147,8 @@ test-suite cardano-ledger-shelley-test Test.Cardano.Ledger.Shelley.Serialisation.Golden.Genesis Test.Cardano.Ledger.Shelley.Serialisation.Tripping.CBOR Test.Cardano.Ledger.Shelley.Serialisation.Tripping.JSON - Test.Cardano.Ledger.Shelley.ShelleyTranslation Test.Cardano.Ledger.Shelley.RulesTests Test.Cardano.Ledger.Shelley.UnitTests - Test.TestScenario hs-source-dirs: test ghc-options: @@ -184,10 +169,6 @@ test-suite cardano-ledger-shelley-test cardano-binary, cardano-crypto-class, cardano-crypto-praos, - cardano-crypto-test, - cardano-crypto-wrapper, - cardano-crypto, - cardano-ledger-byron-test, cardano-ledger-byron, cardano-ledger-core, cardano-prelude-test, @@ -199,7 +180,6 @@ test-suite cardano-ledger-shelley-test data-default-class, groups, hedgehog >= 1.0.4, - hedgehog-quickcheck, iproute, prettyprinter, QuickCheck, @@ -215,7 +195,6 @@ test-suite cardano-ledger-shelley-test tasty, time, transformers, - tree-diff benchmark mainbench @@ -224,7 +203,6 @@ benchmark mainbench type: exitcode-stdio-1.0 hs-source-dirs: bench - test main-is: Main.hs other-modules: Bench.Control.Iterate.SetAlgebra.Bimap, @@ -232,10 +210,8 @@ benchmark mainbench BenchValidation, Cardano.Ledger.Shelley.Bench.Gen Cardano.Ledger.Shelley.Bench.Rewards - Test.Cardano.Ledger.Shelley.Examples.Cast build-depends: - bytestring, cardano-crypto-class, cardano-crypto-praos, cardano-ledger-core, diff --git a/eras/shelley/test-suite/test/Test/Cardano/Ledger/Shelley/Address/Bootstrap.hs b/eras/shelley/test-suite/src/Test/Cardano/Ledger/Shelley/Address/Bootstrap.hs similarity index 100% rename from eras/shelley/test-suite/test/Test/Cardano/Ledger/Shelley/Address/Bootstrap.hs rename to eras/shelley/test-suite/src/Test/Cardano/Ledger/Shelley/Address/Bootstrap.hs diff --git a/eras/shelley/test-suite/test/Test/Cardano/Ledger/Shelley/Address/CompactAddr.hs b/eras/shelley/test-suite/src/Test/Cardano/Ledger/Shelley/Address/CompactAddr.hs similarity index 100% rename from eras/shelley/test-suite/test/Test/Cardano/Ledger/Shelley/Address/CompactAddr.hs rename to eras/shelley/test-suite/src/Test/Cardano/Ledger/Shelley/Address/CompactAddr.hs diff --git a/eras/shelley/test-suite/test/Test/Cardano/Ledger/Shelley/ByronTranslation.hs b/eras/shelley/test-suite/src/Test/Cardano/Ledger/Shelley/ByronTranslation.hs similarity index 100% rename from eras/shelley/test-suite/test/Test/Cardano/Ledger/Shelley/ByronTranslation.hs rename to eras/shelley/test-suite/src/Test/Cardano/Ledger/Shelley/ByronTranslation.hs diff --git a/eras/shelley/test-suite/test/Test/Cardano/Ledger/Shelley/Examples/Cast.hs b/eras/shelley/test-suite/src/Test/Cardano/Ledger/Shelley/Examples/Cast.hs similarity index 100% rename from eras/shelley/test-suite/test/Test/Cardano/Ledger/Shelley/Examples/Cast.hs rename to eras/shelley/test-suite/src/Test/Cardano/Ledger/Shelley/Examples/Cast.hs diff --git a/eras/shelley/test-suite/test/Test/Cardano/Ledger/Shelley/Examples/Federation.hs b/eras/shelley/test-suite/src/Test/Cardano/Ledger/Shelley/Examples/Federation.hs similarity index 100% rename from eras/shelley/test-suite/test/Test/Cardano/Ledger/Shelley/Examples/Federation.hs rename to eras/shelley/test-suite/src/Test/Cardano/Ledger/Shelley/Examples/Federation.hs diff --git a/eras/shelley/test-suite/test/Test/Cardano/Ledger/Shelley/PropertyTests.hs b/eras/shelley/test-suite/src/Test/Cardano/Ledger/Shelley/PropertyTests.hs similarity index 100% rename from eras/shelley/test-suite/test/Test/Cardano/Ledger/Shelley/PropertyTests.hs rename to eras/shelley/test-suite/src/Test/Cardano/Ledger/Shelley/PropertyTests.hs diff --git a/eras/shelley/test-suite/test/Test/Cardano/Ledger/Shelley/Rules/ClassifyTraces.hs b/eras/shelley/test-suite/src/Test/Cardano/Ledger/Shelley/Rules/ClassifyTraces.hs similarity index 100% rename from eras/shelley/test-suite/test/Test/Cardano/Ledger/Shelley/Rules/ClassifyTraces.hs rename to eras/shelley/test-suite/src/Test/Cardano/Ledger/Shelley/Rules/ClassifyTraces.hs diff --git a/eras/shelley/test-suite/test/Test/Cardano/Ledger/Shelley/Rules/TestChain.hs b/eras/shelley/test-suite/src/Test/Cardano/Ledger/Shelley/Rules/TestChain.hs similarity index 100% rename from eras/shelley/test-suite/test/Test/Cardano/Ledger/Shelley/Rules/TestChain.hs rename to eras/shelley/test-suite/src/Test/Cardano/Ledger/Shelley/Rules/TestChain.hs diff --git a/eras/shelley/test-suite/test/Test/Cardano/Ledger/Shelley/Rules/TestDeleg.hs b/eras/shelley/test-suite/src/Test/Cardano/Ledger/Shelley/Rules/TestDeleg.hs similarity index 100% rename from eras/shelley/test-suite/test/Test/Cardano/Ledger/Shelley/Rules/TestDeleg.hs rename to eras/shelley/test-suite/src/Test/Cardano/Ledger/Shelley/Rules/TestDeleg.hs diff --git a/eras/shelley/test-suite/test/Test/Cardano/Ledger/Shelley/Rules/TestPool.hs b/eras/shelley/test-suite/src/Test/Cardano/Ledger/Shelley/Rules/TestPool.hs similarity index 100% rename from eras/shelley/test-suite/test/Test/Cardano/Ledger/Shelley/Rules/TestPool.hs rename to eras/shelley/test-suite/src/Test/Cardano/Ledger/Shelley/Rules/TestPool.hs diff --git a/eras/shelley/test-suite/test/Test/Cardano/Ledger/Shelley/Rules/TestPoolreap.hs b/eras/shelley/test-suite/src/Test/Cardano/Ledger/Shelley/Rules/TestPoolreap.hs similarity index 100% rename from eras/shelley/test-suite/test/Test/Cardano/Ledger/Shelley/Rules/TestPoolreap.hs rename to eras/shelley/test-suite/src/Test/Cardano/Ledger/Shelley/Rules/TestPoolreap.hs diff --git a/eras/shelley/test-suite/test/Test/Cardano/Ledger/Shelley/ShelleyTranslation.hs b/eras/shelley/test-suite/src/Test/Cardano/Ledger/Shelley/ShelleyTranslation.hs similarity index 100% rename from eras/shelley/test-suite/test/Test/Cardano/Ledger/Shelley/ShelleyTranslation.hs rename to eras/shelley/test-suite/src/Test/Cardano/Ledger/Shelley/ShelleyTranslation.hs diff --git a/eras/shelley/test-suite/test/Test/TestScenario.hs b/eras/shelley/test-suite/src/Test/TestScenario.hs similarity index 100% rename from eras/shelley/test-suite/test/Test/TestScenario.hs rename to eras/shelley/test-suite/src/Test/TestScenario.hs