Skip to content

Commit

Permalink
Merge pull request #4696 from input-output-hk/coot/test-utils-improve…
Browse files Browse the repository at this point in the history
…ments

Improve memory footprint of some test
  • Loading branch information
coot authored Oct 25, 2023
2 parents 1d02d55 + d60f84a commit 3b63ca5
Show file tree
Hide file tree
Showing 29 changed files with 593 additions and 448 deletions.
5 changes: 4 additions & 1 deletion cabal.project
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ index-state:
-- Bump this if you need newer packages from Hackage
, hackage.haskell.org 2023-09-10T00:10:54Z
-- Bump this if you need newer packages from CHaP
, cardano-haskell-packages 2023-08-04T14:05:48Z
, cardano-haskell-packages 2023-10-23T08:59:58Z

packages: ./cardano-ping
./monoidal-synchronisation
Expand All @@ -34,6 +34,9 @@ packages: ./cardano-ping
tests: True
benchmarks: True

package bitvec
flags: -simd

package cardano-ping
flags: +asserts

Expand Down
154 changes: 115 additions & 39 deletions flake.lock

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

12 changes: 10 additions & 2 deletions flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
];

# default compiler used on all systems, also provided within the shell
defaultCompiler = "ghc962";
defaultCompiler = "ghc963";

# the compiler used for cross compilation
# alternative compilers only used on Linux
Expand Down Expand Up @@ -129,13 +129,21 @@
# specific enough, or doesn't allow setting these.
modules = [
({pkgs, ...}: {
# pkgs are instatiated for the host platform
# We impose limit heap size limit when running some of the tests
# to discover space leaks Once #4698 and #4699 are done we can
# further constrain the heap size.
preCheck = lib.mkForce ''
export GHCRTS=-M200M
'';

# pkgs are instantiated for the host platform
packages.ouroboros-network-protocols.components.tests.cddl.build-tools = [ pkgs.cddl pkgs.cbor-diag ];
packages.ouroboros-network-protocols.components.tests.cddl.preCheck = "export HOME=`pwd`";

# don't run checks using Wine when cross compiling
packages.ntp-client.components.tests.test.doCheck = !pkgs.stdenv.hostPlatform.isWindows;
packages.network-mux.components.tests.test.doCheck = !pkgs.stdenv.hostPlatform.isWindows;
packages.network-mux.components.tests.test.preCheck = "export GHCRTS=-M350M";
packages.ouroboros-network-api.components.tests.test.doCheck = !pkgs.stdenv.hostPlatform.isWindows;
packages.ouroboros-network-protocols.components.tests.test.doCheck = !pkgs.stdenv.hostPlatform.isWindows;
packages.ouroboros-network-framework.components.tests.sim-tests.doCheck = !pkgs.stdenv.hostPlatform.isWindows;
Expand Down
1 change: 1 addition & 0 deletions network-mux/network-mux.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -142,6 +142,7 @@ test-suite test
else
build-depends: process
ghc-options: -threaded
-rtsopts
-Wall
-fno-ignore-asserts
-Wcompat
Expand Down
1 change: 1 addition & 0 deletions ntp-client/ntp-client.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@ test-suite test
ghc-options: -Wall
-Wunused-packages
-threaded
-rtsopts

executable demo-ntp-client
hs-source-dirs: demo
Expand Down
2 changes: 1 addition & 1 deletion ouroboros-network-api/ouroboros-network-api.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ library
network-mux ^>=0.4,
strict-stm,
si-timers,
typed-protocols ^>=0.1.0.6,
typed-protocols ^>=0.1.1,

ghc-options: -Wall
-Wno-unticked-promoted-constructors
Expand Down
4 changes: 4 additions & 0 deletions ouroboros-network-framework/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,14 @@

### Breaking changes

* `ResourceException` is now an existential type.

### Non-breaking changes

* Split `test` component into `io-tests` and `sim-tests`.
* `demo-ping-pong`: improved tracer.
* Fixed a bug in `connection-manager` which could result in leaking
a connection.

## 0.9.0.0 -- 2023-08-21

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ library
, ouroboros-network-api
^>=0.5.1
, ouroboros-network-testing
, typed-protocols >=0.1 && < 0.2
, typed-protocols ^>=0.1.1
, typed-protocols-cborg
^>=0.1
, Win32-network ^>=0.1
Expand Down
Loading

0 comments on commit 3b63ca5

Please sign in to comment.